summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-02-13 12:02:56 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 14:01:17 +0100
commit1dfb37ec8f012a8466b2e624b35d1b411dd10b01 (patch)
tree1a597786a4724f030220cabd23b1d7f56b48dbc1 /arch
parent9f15a8df542c0f08732a67d1a14ee7c22948fb97 (diff)
downloadlinux-1dfb37ec8f012a8466b2e624b35d1b411dd10b01.tar.gz
linux-1dfb37ec8f012a8466b2e624b35d1b411dd10b01.tar.bz2
linux-1dfb37ec8f012a8466b2e624b35d1b411dd10b01.zip
LoongArch: KVM: Fix typo issue about GCFG feature detection
[ Upstream commit bdb13252e5d1518823b81f458d9975c85d5240c2 ] This is typo issue and misusage about GCFG feature macro. The code is wrong, only that it does not cause obvious problem since GCFG is set again on vCPU context switch. Fixes: 0d0df3c99d4f ("LoongArch: KVM: Implement kvm hardware enable, disable interface") Signed-off-by: Bibo Mao <maobibo@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/loongarch/kvm/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/loongarch/kvm/main.c b/arch/loongarch/kvm/main.c
index 27e9b94c0a0b..7e8f5d6829ef 100644
--- a/arch/loongarch/kvm/main.c
+++ b/arch/loongarch/kvm/main.c
@@ -283,9 +283,9 @@ int kvm_arch_enable_virtualization_cpu(void)
* TOE=0: Trap on Exception.
* TIT=0: Trap on Timer.
*/
- if (env & CSR_GCFG_GCIP_ALL)
+ if (env & CSR_GCFG_GCIP_SECURE)
gcfg |= CSR_GCFG_GCI_SECURE;
- if (env & CSR_GCFG_MATC_ROOT)
+ if (env & CSR_GCFG_MATP_ROOT)
gcfg |= CSR_GCFG_MATC_ROOT;
write_csr_gcfg(gcfg);