Thread (9 messages) 9 messages, 4 authors, 9d ago

Re: [PATCH 2/2] KVM: PPC: Replay pending interrupts before entering the guest

flat view

From: Shrikanth Hegde <sshegde@linux.ibm.com>
Date: 2026-10-01 11:57:26
Also in: lkml

Hi Narayana,
quoted
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;
      }
It look good to me.
Thanks.
Thanks,
Narayana
Do you want me to consider the above as rwb tag? If yes, I prefer to see explicit tag.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help