[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2] AMD/IO-APIC: Use old IO-APIC ack method if AMD 813{1, 2} PCI-X tunnel is present
References at time of patch: AMD 8132 PCI-X HyperTransport Tunnel http://support.amd.com/us/ChipsetMotherboard_TechDocs/30801.pdf AMD 8131 PCI-X HyperTransport Tunnel http://support.amd.com/us/ChipsetMotherboard_TechDocs/26310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf The IO-APICs on the above two PCI-X HyperTransport Tunnels will issue illegal HT packets if an interrupt gets masked while active. This is sadly exactly what the "new" IO-APIC ack mode does. The "old" ack mode does however avoid this bad behaviour, and stabilises an affected system belonging to a customer. Original patch: Signed-off-by: Malcolm Crossley <malcolm.crossley@xxxxxxxxxx> Forward ported and tweaked for upstream: Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> -- Changes since v1: * In the case that ioapic_ack_mode is specified on the command line, warn if instability will ensue. diff -r 2d37d2d652a8 -r 115069a50a65 xen/arch/x86/io_apic.c --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2016,8 +2016,76 @@ static void __init ioapic_pm_state_alloc BUG_ON(ioapic_pm_state == NULL); } +/* AMD 8131 and 8132 PCI-X HyperTransport Tunnel IO-APICs will issue illegal + * HyperTransport packets if an interrupt is masked while active. This leads + * to system instability and crashes with no obvious cause. + * + * This is sadly the exact behaviour of the "new" IO-APIC ack mode, but using + * "old" mode works around the issue. + */ +void __init amd813x_errata_quirks(void) +{ + unsigned i, found = 0; + uint32_t bus, dev, vendor_id; + + if ( boot_cpu_data.x86_vendor != X86_VENDOR_AMD ) + return; + + /* Check for the affected IO-APIC version (0x11) to save scanning the PCI + * bus on most systems. */ + for ( i = 0; i < nr_ioapics; ++i ) + { + if ( mp_ioapics[i].mpc_apicver == 0x11 ) + { + found = 1; + break; + } + } + + if ( !found ) + return; + + for ( bus = 0; bus < 256; ++bus ) + { + for ( dev = 0; dev < 32; ++dev ) + { + /* IO-APIC is always Function 1. Check for Multifunction. */ + if ( !( pci_conf_read8(0, bus, dev, 0, PCI_HEADER_TYPE ) & 0x80 ) ) + continue; + + vendor_id = pci_conf_read32(0, bus, dev, 1, PCI_VENDOR_ID); + + /* 0x7451 is AMD-8131 PCI-X IO-APIC */ + if ( vendor_id == 0x74511022 ) + printk(XENLOG_WARNING "Found AMD 8131 PCI-X tunnel, erraturm #63: "); + /* 0x7459 is AMD-8132 PCI-X IO-APIC */ + else if ( vendor_id == 0x74591022 ) + printk(XENLOG_WARNING "Found AMD 8132 PCI-X tunnel, erraturm #81: "); + else + continue; + + if ( ioapic_ack_forced ) + { + if ( ioapic_ack_new != 0 ) + printk("Not overriding command line. System will be unstable. " + "Use ioapic_ack_mode=old\n"); + else + printk("Command line is ok for system stability\n"); + } + else + { + printk("Forcing 'old' IO-APIC ack method\n"); + ioapic_ack_new = 0; + } + return; + } + } +} + void __init setup_IO_APIC(void) { + amd813x_errata_quirks(); + enable_IO_APIC(); if (acpi_ioapic) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |