Skip to content

Commit bdb1325

Browse files
bibo-maochenhuacai
authored andcommitted
LoongArch: KVM: Fix typo issue about GCFG feature detection
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]>
1 parent 6287f1a commit bdb1325

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
@@ -303,9 +303,9 @@ int kvm_arch_enable_virtualization_cpu(void)
303303
* TOE=0: Trap on Exception.
304304
* TIT=0: Trap on Timer.
305305
*/
306-
if (env & CSR_GCFG_GCIP_ALL)
306+
if (env & CSR_GCFG_GCIP_SECURE)
307307
gcfg |= CSR_GCFG_GCI_SECURE;
308-
if (env & CSR_GCFG_MATC_ROOT)
308+
if (env & CSR_GCFG_MATP_ROOT)
309309
gcfg |= CSR_GCFG_MATC_ROOT;
310310

311311
write_csr_gcfg(gcfg);

0 commit comments

Comments
 (0)