Skip to content

Commit 382bb85

Browse files
bibo-maomehmetb0
authored andcommitted
LoongArch: KVM: Fix typo issue about GCFG feature detection
BugLink: https://bugs.launchpad.net/bugs/2104873 [ Upstream commit bdb1325 ] 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: 0d0df3c ("LoongArch: KVM: Implement kvm hardware enable, disable interface") Signed-off-by: Bibo Mao <[email protected]> Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Noah Wager <[email protected]> Signed-off-by: Mehmet Basaran <[email protected]>
1 parent 1e45d60 commit 382bb85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/loongarch/kvm/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ int kvm_arch_hardware_enable(void)
283283
* TOE=0: Trap on Exception.
284284
* TIT=0: Trap on Timer.
285285
*/
286-
if (env & CSR_GCFG_GCIP_ALL)
286+
if (env & CSR_GCFG_GCIP_SECURE)
287287
gcfg |= CSR_GCFG_GCI_SECURE;
288-
if (env & CSR_GCFG_MATC_ROOT)
288+
if (env & CSR_GCFG_MATP_ROOT)
289289
gcfg |= CSR_GCFG_MATC_ROOT;
290290

291291
write_csr_gcfg(gcfg);

0 commit comments

Comments
 (0)