All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] VTD/Intremap: Disable Intremap on Chipset 5500/5520/X58 due to errata
@ 2013-03-01 13:46 Malcolm Crossley
  2013-03-05  7:45 ` Jan Beulich
  0 siblings, 1 reply; 7+ messages in thread
From: Malcolm Crossley @ 2013-03-01 13:46 UTC (permalink / raw)
  To: xen-devel; +Cc: andrew.cooper3, keir, tim, xiantao.zhang, JBeulich

http://www.intel.com/content/www/us/en/chipsets/5520-and-5500-chipset-ioh-specification-update.html

Stepping B-3 has two errata (#47 and #53) related to Interrupt
remapping, to which the workaround is for the BIOS to completely disable
interrupt remapping.  These errata are fixed in stepping C-2.

Unfortunately this chipset stepping is very common and many BIOSes are
not disabling interrupt remapping on this stepping .  We can detect this in
Xen and prevent Xen from using the problematic interrupt remapping feature.

The Intel 5500/5520/X58 chipset does not support VT-d
Extended Interrupt Mode(EIM). This means the iommu_supports_eim() check
always fails and so x2apic mode cannot be enabled in Xen before this quirk
disables the interrupt remapping feature.

Signed-off-by: Malcolm Crossley <malcolm.crossley@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

diff -r 94ece33caae2 -r 8f4d9b330e19 xen/drivers/passthrough/vtd/quirks.c
--- a/xen/drivers/passthrough/vtd/quirks.c
+++ b/xen/drivers/passthrough/vtd/quirks.c
@@ -244,6 +244,29 @@ void vtd_ops_postamble_quirk(struct iomm
     }
 }
 
+/* 5500/5520/X58 Chipset Interrupt remapping errata, for stepping B-3.
+ * Fixed in stepping C-2. */
+void __init tylersburg_intremap_quirk(void)
+{
+    uint32_t bus, device;
+    uint8_t rev;
+
+    for ( bus = 0; bus < 0x100; bus++ )
+    {
+        /* Match on System Management Registers on Device 20 Function 0 */
+        device = pci_conf_read32(0, bus, 20, 0, PCI_VENDOR_ID);
+        rev = pci_conf_read8(0, bus, 20, 0, PCI_REVISION_ID);
+
+        if ( rev == 0x13 && device == 0x342e8086 )
+        {
+            dprintk(XENLOG_INFO VTDPREFIX,
+                    "Disabling Interrupt Remapping due to Intel 5500/5520/X58 Chipset errata #47, #53\n");
+            iommu_intremap = 0;
+            break;
+        }
+    }
+}
+
 /* initialize platform identification flags */
 void __init platform_quirks_init(void)
 {
@@ -264,6 +287,9 @@ void __init platform_quirks_init(void)
 
     /* ioremap IGD MMIO+0x2000 page */
     map_igd_reg();
+
+    /* Tylersburg interrupt remap quirk */
+    tylersburg_intremap_quirk();
 }
 
 /*

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-03-13 11:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 13:46 [PATCH v2] VTD/Intremap: Disable Intremap on Chipset 5500/5520/X58 due to errata Malcolm Crossley
2013-03-05  7:45 ` Jan Beulich
2013-03-05 11:59   ` Andrew Cooper
2013-03-05 13:44     ` Jan Beulich
2013-03-12 21:55       ` Zhang, Xiantao
2013-03-13  8:48         ` Jan Beulich
2013-03-13 11:02           ` Malcolm Crossley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.