[PATCH v2 1/4] x86/vPMU: move APIC ack past the handling of the interrupt

Jan Beulich posted 4 patches 2 weeks, 5 days ago
[PATCH v2 1/4] x86/vPMU: move APIC ack past the handling of the interrupt
Posted by Jan Beulich 2 weeks, 5 days ago
While benign as long as it's using a direct-APIC-vector (handlers for
which are called with IRQs off), follow the more usual pattern of ack-ing
the IRQ only after handling it.

Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: New.

--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -1319,8 +1319,8 @@ static void cf_check error_interrupt(voi
 
 static void cf_check pmu_interrupt(void)
 {
-    ack_APIC_irq();
     vpmu_do_interrupt();
+    ack_APIC_irq();
 }
 
 void __init apic_intr_init(void)
Re: [PATCH v2 1/4] x86/vPMU: move APIC ack past the handling of the interrupt
Posted by Andrew Cooper 2 weeks, 5 days ago
On 24/11/2025 12:29 pm, Jan Beulich wrote:
> While benign as long as it's using a direct-APIC-vector (handlers for
> which are called with IRQs off), follow the more usual pattern of ack-ing
> the IRQ only after handling it.
>
> Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>