Patch "KVM: PPC: Book3S HV P9: Fix irq disabling in tick accounting" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    KVM: PPC: Book3S HV P9: Fix irq disabling in tick accounting

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-ppc-book3s-hv-p9-fix-irq-disabling-in-tick-accou.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5d52e92c4206869cc55d9336d147dc0ed9e6b857
Author: Nicholas Piggin <npiggin@xxxxxxxxx>
Date:   Thu Sep 8 23:25:42 2022 +1000

    KVM: PPC: Book3S HV P9: Fix irq disabling in tick accounting
    
    [ Upstream commit c953f7500b65f2b157d1eb468ca8b86328834cce ]
    
    kvmhv_run_single_vcpu() disables PMIs as well as Linux irqs,
    however the tick time accounting code enables and disables irqs and
    not PMIs within this region. By chance this might not actually cause
    a bug, but it is clearly an incorrect use of the APIs.
    
    Fixes: 2251fbe76395e ("KVM: PPC: Book3S HV P9: Improve mtmsrd scheduling by delaying MSR[EE] disable")
    Signed-off-by: Nicholas Piggin <npiggin@xxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220908132545.4085849-2-npiggin@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 917abda9e5ce..d72df696837d 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -4631,7 +4631,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,
 
 	context_tracking_guest_exit();
 	if (!vtime_accounting_enabled_this_cpu()) {
-		local_irq_enable();
+		powerpc_local_irq_pmu_restore(flags);
 		/*
 		 * Service IRQs here before vtime_account_guest_exit() so any
 		 * ticks that occurred while running the guest are accounted to
@@ -4640,7 +4640,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,
 		 * interrupts here, which has the problem that it accounts
 		 * interrupt processing overhead to the host.
 		 */
-		local_irq_disable();
+		powerpc_local_irq_pmu_save(flags);
 	}
 	vtime_account_guest_exit();
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux