]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 6 Jul 2023 16:36:10 +0000 (18:36 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 7 Jul 2023 12:43:01 +0000 (14:43 +0200)
Commit e4de20576986 ("MIPS: KVM: Fix NULL pointer dereference") missed
converting one place accessing cop0 registers, which results in a build
error, if KVM_MIPS_DEBUG_COP0_COUNTERS is enabled.

Fixes: e4de20576986 ("MIPS: KVM: Fix NULL pointer dereference")
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
arch/mips/kvm/stats.c

index 53f851a615542ae049383a252af326218bff412a..3e6682018fbe68d298f79832861a92c550fb17ca 100644 (file)
@@ -54,9 +54,9 @@ void kvm_mips_dump_stats(struct kvm_vcpu *vcpu)
        kvm_info("\nKVM VCPU[%d] COP0 Access Profile:\n", vcpu->vcpu_id);
        for (i = 0; i < N_MIPS_COPROC_REGS; i++) {
                for (j = 0; j < N_MIPS_COPROC_SEL; j++) {
-                       if (vcpu->arch.cop0->stat[i][j])
+                       if (vcpu->arch.cop0.stat[i][j])
                                kvm_info("%s[%d]: %lu\n", kvm_cop0_str[i], j,
-                                        vcpu->arch.cop0->stat[i][j]);
+                                        vcpu->arch.cop0.stat[i][j]);
                }
        }
 #endif