From: Greg Kroah-Hartman Date: Tue, 1 Oct 2024 10:13:00 +0000 (+0200) Subject: 6.10-stable patches X-Git-Tag: v6.6.54~78 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=92b803fea1e2e8f09203f34c84a29fe0ab2c62d1;p=thirdparty%2Fkernel%2Fstable-queue.git 6.10-stable patches added patches: revert-loongarch-kvm-invalidate-guest-steal-time-address-on-vcpu-reset.patch --- diff --git a/queue-6.10/revert-loongarch-kvm-invalidate-guest-steal-time-address-on-vcpu-reset.patch b/queue-6.10/revert-loongarch-kvm-invalidate-guest-steal-time-address-on-vcpu-reset.patch new file mode 100644 index 00000000000..afab5702c68 --- /dev/null +++ b/queue-6.10/revert-loongarch-kvm-invalidate-guest-steal-time-address-on-vcpu-reset.patch @@ -0,0 +1,58 @@ +From chenhuacai@loongson.cn Tue Oct 1 12:11:38 2024 +From: Huacai Chen +Date: Tue, 1 Oct 2024 16:55:21 +0800 +Subject: Revert "LoongArch: KVM: Invalidate guest steal time address on vCPU reset" +To: Paolo Bonzini , Huacai Chen , Greg KH , Sasha Levin +Cc: Bibo Mao , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Xuerui Wang , stable@vger.kernel.org, Huacai Chen +Message-ID: <20241001085521.102817-1-chenhuacai@loongson.cn> + +From: Huacai Chen + +This reverts commit 05969a6944713f159e8f28be2388500174521818 which is +commit 4956e07f05e239b274d042618a250c9fa3e92629 upstream. + +LoongArch's PV steal time support is add after 6.10, so 6.10.y doesn't +need this fix. + +Signed-off-by: Huacai Chen +Signed-off-by: Greg Kroah-Hartman +--- + arch/loongarch/include/asm/kvm_vcpu.h | 1 + + arch/loongarch/kvm/timer.c | 7 +++++++ + arch/loongarch/kvm/vcpu.c | 2 +- + 3 files changed, 9 insertions(+), 1 deletion(-) + +--- a/arch/loongarch/include/asm/kvm_vcpu.h ++++ b/arch/loongarch/include/asm/kvm_vcpu.h +@@ -76,6 +76,7 @@ static inline void kvm_restore_lasx(stru + #endif + + void kvm_init_timer(struct kvm_vcpu *vcpu, unsigned long hz); ++void kvm_reset_timer(struct kvm_vcpu *vcpu); + void kvm_save_timer(struct kvm_vcpu *vcpu); + void kvm_restore_timer(struct kvm_vcpu *vcpu); + +--- a/arch/loongarch/kvm/timer.c ++++ b/arch/loongarch/kvm/timer.c +@@ -188,3 +188,10 @@ void kvm_save_timer(struct kvm_vcpu *vcp + kvm_save_hw_gcsr(csr, LOONGARCH_CSR_ESTAT); + preempt_enable(); + } ++ ++void kvm_reset_timer(struct kvm_vcpu *vcpu) ++{ ++ write_gcsr_timercfg(0); ++ kvm_write_sw_gcsr(vcpu->arch.csr, LOONGARCH_CSR_TCFG, 0); ++ hrtimer_cancel(&vcpu->arch.swtimer); ++} +--- a/arch/loongarch/kvm/vcpu.c ++++ b/arch/loongarch/kvm/vcpu.c +@@ -572,7 +572,7 @@ static int kvm_set_one_reg(struct kvm_vc + vcpu->kvm->arch.time_offset = (signed long)(v - drdtime()); + break; + case KVM_REG_LOONGARCH_VCPU_RESET: +- vcpu->arch.st.guest_addr = 0; ++ kvm_reset_timer(vcpu); + memset(&vcpu->arch.irq_pending, 0, sizeof(vcpu->arch.irq_pending)); + memset(&vcpu->arch.irq_clear, 0, sizeof(vcpu->arch.irq_clear)); + break; diff --git a/queue-6.10/series b/queue-6.10/series index 9206e5b1178..46df29e5b37 100644 --- a/queue-6.10/series +++ b/queue-6.10/series @@ -504,3 +504,4 @@ drm-amd-display-disable-symclk32_le-root-clock-gating.patch drm-amd-display-block-dynamic-ips2-on-dcn35-for-incompatible-fw-versions.patch drm-amd-display-enable-dml2-override_det_buffer_size_kbytes.patch drm-amd-display-skip-to-enable-dsc-if-it-has-been-off.patch +revert-loongarch-kvm-invalidate-guest-steal-time-address-on-vcpu-reset.patch