From 4ee46bda67bffd60f1162c796b4800acff4a6026 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 21 Jul 2023 17:11:24 +0200 Subject: [PATCH] 5.15-stable patches added patches: mips-kvm-fix-build-error-with-kvm_mips_debug_cop0_counters-enabled.patch --- ...kvm_mips_debug_cop0_counters-enabled.patch | 43 +++++++++++++++++++ queue-5.15/series | 1 + 2 files changed, 44 insertions(+) create mode 100644 queue-5.15/mips-kvm-fix-build-error-with-kvm_mips_debug_cop0_counters-enabled.patch diff --git a/queue-5.15/mips-kvm-fix-build-error-with-kvm_mips_debug_cop0_counters-enabled.patch b/queue-5.15/mips-kvm-fix-build-error-with-kvm_mips_debug_cop0_counters-enabled.patch new file mode 100644 index 00000000000..fbe30e409c5 --- /dev/null +++ b/queue-5.15/mips-kvm-fix-build-error-with-kvm_mips_debug_cop0_counters-enabled.patch @@ -0,0 +1,43 @@ +From 3a6dbb691782e88e07e5c70b327495dbd58a2e7f Mon Sep 17 00:00:00 2001 +From: Thomas Bogendoerfer +Date: Thu, 6 Jul 2023 18:36:10 +0200 +Subject: MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Thomas Bogendoerfer + +commit 3a6dbb691782e88e07e5c70b327495dbd58a2e7f upstream. + +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 +Reviewed-by: Philippe Mathieu-Daudé +Signed-off-by: Greg Kroah-Hartman +--- + arch/mips/kvm/stats.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/kvm/stats.c b/arch/mips/kvm/stats.c +index 53f851a61554..3e6682018fbe 100644 +--- a/arch/mips/kvm/stats.c ++++ b/arch/mips/kvm/stats.c +@@ -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 +-- +2.41.0 + diff --git a/queue-5.15/series b/queue-5.15/series index ccce3c5f555..fa6c5d2068e 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -528,3 +528,4 @@ scsi-qla2xxx-check-valid-rport-returned-by-fc_bsg_to_rport.patch scsi-qla2xxx-correct-the-index-of-array.patch scsi-qla2xxx-pointer-may-be-dereferenced.patch scsi-qla2xxx-remove-unused-nvme_ls_waitq-wait-queue.patch +mips-kvm-fix-build-error-with-kvm_mips_debug_cop0_counters-enabled.patch -- 2.47.3