|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 06/12] x86/i8259: redo workaround for AMD spurious PIC interrupts
Do not set legacy IRQs target CPU mask to all CPUs, as the interrupt is
strictly targeting a single CPU, even if a spurious interrupt can be
delivered to other CPUs.
Instead set the target CPU mask correctly, as do_IRQ() will always deal
with spurious interrupts generated on AMD hardware. Otherwise fixup_irqs()
would assume the IRQ is targeting all CPUs, and would simply not perform
the required affinity move if the target CPU goes offline.
Most of this is unlikely to make any difference in practice, the IO-APIC
setup will take over those entries and set the proper destination as part
of startup setup.
Fixes: 87f37449d586 ("x86/i8259: do not assume interrupts always target CPU0")
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/arch/x86/i8259.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/xen/arch/x86/i8259.c b/xen/arch/x86/i8259.c
index 5c7e21a7515c..41f949a36531 100644
--- a/xen/arch/x86/i8259.c
+++ b/xen/arch/x86/i8259.c
@@ -407,21 +407,14 @@ void __init init_IRQ(void)
per_cpu(vector_irq, cpu)[LEGACY_VECTOR(irq)] = irq;
/*
- * The interrupt affinity logic never targets interrupts to offline
- * CPUs, hence it's safe to use cpumask_all here.
- *
* Legacy PIC interrupts are only targeted to CPU0, but depending on
* the platform they can be distributed to any online CPU in hardware.
- * Note this behavior has only been observed on AMD hardware. In order
- * to cope install all active legacy vectors on all CPUs.
- *
- * IO-APIC will change the destination mask if/when taking ownership of
- * the interrupt.
+ * Note this behavior has only been observed on AMD hardware. Set the
+ * target CPU as expected here, and cope with the possibly spurious
+ * interrupts in do_IRQ(). This behavior has only been observed
+ * during AP bringup.
*/
- cpumask_copy(desc->arch.cpu_mask,
- (boot_cpu_data.x86_vendor &
- (X86_VENDOR_AMD | X86_VENDOR_HYGON) ? &cpumask_all
- : cpumask_of(cpu)));
+ cpumask_copy(desc->arch.cpu_mask, cpumask_of(cpu));
desc->arch.vector = LEGACY_VECTOR(irq);
}
--
2.51.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |