|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.13 2/2] x86/ioapic: don't use raw entry reads/writes in clear_IO_APIC_pin
clear_IO_APIC_pin can be called after the iommu has been enabled, and
using raw entry reads and writes will result in a misconfiguration of
the entries already setup to use the interrupt remapping table. This
fixes the following panic seen on AMD Rome boxes:
(XEN) [ 10.082154] ENABLING IO-APIC IRQs
(XEN) [ 10.087789] -> Using new ACK method
(XEN) [ 10.093738] Assertion 'get_rte_index(rte) == offset' failed at
iommu_intr.c:328
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Cc: Juergen Gross <jgross@xxxxxxxx>
---
xen/arch/x86/io_apic.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c
index b9c66acdb3..13b41b46a3 100644
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -514,13 +514,13 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned
int pin)
entry.mask = 1;
__ioapic_write_entry(apic, pin, false, entry);
}
- entry = __ioapic_read_entry(apic, pin, true);
+ entry = __ioapic_read_entry(apic, pin, false);
if (entry.irr) {
/* Make sure the trigger mode is set to level. */
if (!entry.trigger) {
entry.trigger = 1;
- __ioapic_write_entry(apic, pin, true, entry);
+ __ioapic_write_entry(apic, pin, false, entry);
}
__io_apic_eoi(apic, entry.vector, pin);
}
@@ -530,9 +530,9 @@ static void clear_IO_APIC_pin(unsigned int apic, unsigned
int pin)
*/
memset(&entry, 0, sizeof(entry));
entry.mask = 1;
- __ioapic_write_entry(apic, pin, true, entry);
+ __ioapic_write_entry(apic, pin, false, entry);
- entry = __ioapic_read_entry(apic, pin, true);
+ entry = __ioapic_read_entry(apic, pin, false);
if (entry.irr)
printk(KERN_ERR "IO-APIC%02x-%u: Unable to reset IRR\n",
IO_APIC_ID(apic), pin);
--
2.23.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |