Fixes: 12013e3d4695 ("KVM: powerpc: Use generic xfer to guest work function") Reported-by: Christian Zigotzky Closes: https://lore.kernel.org/all/b8f82519-9ae5-c247-e020-e79c627e57df@xenosoft.de/ Signed-off-by: Shrikanth Hegde --- arch/powerpc/kvm/powerpc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 9194cf492d1c..847ff07c364b 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -147,6 +147,19 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) continue; } +#ifdef CONFIG_PPC64 + /* + * Interrupt arrived between the soft and hard + * disable. Replay it and retry guest entry. + */ + if (unlikely(local_paca->irq_happened != PACA_IRQ_HARD_DIS)) { + local_irq_enable(); + local_irq_disable(); + hard_irq_disable(); + continue; + } +#endif + guest_enter_irqoff(); return 1; }