xen/26743-VT-d-deal-with-5500-5520-X58-errata.patch
Charles Arnold 387129caad - bnc#797014 - no way to control live migrations
- bnc#803712 - after live migration rcu_sched_state detected stalls
  xen.migrate.tools-xend_move_assert_to_exception_block.patch
  xen.migrate.tools-libxc_print_stats_if_migration_is_aborted.patch
  xen.migrate.tools_set_number_of_dirty_pages_during_migration.patch
  xen.migrate.tools_notify_restore_to_hangup_during_migration_--abort_if_busy.patch

- bnc#811764 - XEN (hypervisor or kernel) has a problem with EFI
  variable services
  x86-EFI-set-variable-permit-attrs.patch
- Upstream patches from Jan
  26060-ACPI-ERST-table-size-checks.patch
  26692-x86-fully-protect-MSI-X-table-from-PV-guest-accesses.patch
  26702-powernow-add-fixups-for-AMD-P-state-figures.patch
  26704-x86-MCA-suppress-bank-clearing-for-certain-injected-events.patch (bnc#805579)
  26731-AMD-IOMMU-Process-softirqs-while-building-dom0-iommu-mappings.patch
  26733-VT-d-Enumerate-IOMMUs-when-listing-capabilities.patch
  26734-ACPI-ERST-Name-table-in-otherwise-opaque-error-messages.patch
  26736-ACPI-APEI-Unlock-apei_iomaps_lock-on-error-path.patch
  26737-ACPI-APEI-Add-apei_exec_run_optional.patch
  26742-IOMMU-properly-check-whether-interrupt-remapping-is-enabled.patch
  26743-VT-d-deal-with-5500-5520-X58-errata.patch (bnc#801910)
  26744-AMD-IOMMU-allow-disabling-only-interrupt-remapping.patch 
- PVonHVM: __devinit was removed in linux-3.8

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=234
2013-04-04 17:05:57 +00:00

91 lines
3.0 KiB
Diff

References: bnc#801910
# Commit 6890cebc6a987d0e896f5d23a8de11a3934101cf
# Date 2013-03-25 14:31:27 +0100
# Author Malcolm Crossley <malcolm.crossley@citrix.com>
# Committer Jan Beulich <jbeulich@suse.com>
VT-d: deal with 5500/5520/X58 errata
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>
Gate the function call to check the quirk on interrupt remapping being
requested to get enabled, and upon failure disable the IOMMU to be in
line with what the changes for XSA-36 (plus follow-ups) did.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: "Zhang, Xiantao" <xiantao.zhang@intel.com>
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -2129,6 +2129,11 @@ int __init intel_vtd_setup(void)
}
platform_quirks_init();
+ if ( !iommu_enabled )
+ {
+ ret = -ENODEV;
+ goto error;
+ }
/* We enable the following features only if they are supported by all VT-d
* engines: Snoop Control, DMA passthrough, Queued Invalidation and
--- a/xen/drivers/passthrough/vtd/quirks.c
+++ b/xen/drivers/passthrough/vtd/quirks.c
@@ -248,6 +248,29 @@ void vtd_ops_postamble_quirk(struct iomm
}
}
+/* 5500/5520/X58 Chipset Interrupt remapping errata, for stepping B-3.
+ * Fixed in stepping C-2. */
+static 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 )
+ {
+ printk(XENLOG_WARNING VTDPREFIX
+ "Disabling IOMMU due to Intel 5500/5520/X58 Chipset errata #47, #53\n");
+ iommu_enabled = 0;
+ break;
+ }
+ }
+}
+
/* initialize platform identification flags */
void __init platform_quirks_init(void)
{
@@ -268,6 +291,10 @@ void __init platform_quirks_init(void)
/* ioremap IGD MMIO+0x2000 page */
map_igd_reg();
+
+ /* Tylersburg interrupt remap quirk */
+ if ( iommu_intremap )
+ tylersburg_intremap_quirk();
}
/*