[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] VTD/Intremap: Disable Intremap on Chipset 5500/5520/X58 due to errata



Thanks!
Acked-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
Xiantao
> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxx [mailto:xen-devel-
> bounces@xxxxxxxxxxxxx] On Behalf Of Malcolm Crossley
> Sent: Wednesday, January 16, 2013 7:27 AM
> To: xen-devel@xxxxxxxxxxxxxxxxxxx
> Cc: andrew.cooper3@xxxxxxxxxx; Zhang, Xiantao
> Subject: [Xen-devel] [PATCH] VTD/Intremap: Disable Intremap on Chipset
> 5500/5520/X58 due to 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 is very common and many BIOSes are not
> disabling remapping.  We can detect this in Xen and prevent turning on
> remapping in the first place.  However, this will turn VT-d off on many
> systems by default.
> 
> Users who still wish to use VT-d can use iommu=force if they are happy
> exposing the associated security risk.
> 
> Signed-off-by: Malcolm Crossley <malcolm.crossley@xxxxxxxxxx>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> diff -r 35a0556a7f76 -r ee475f0e6aeb 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();
>  }
> 
>  /*
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.