|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] pci: apply workaround for Intel errata HSE43 and BDF2
>>> On 04.12.18 at 11:42, <roger.pau@xxxxxxxxxx> wrote:
> @@ -298,6 +299,45 @@ static void check_pdev(const struct pci_dev *pdev)
> #undef PCI_STATUS_CHECK
> }
>
> +static void apply_quirks(struct pci_dev *pdev)
> +{
> + uint16_t vendor = pci_conf_read16(pdev->seg, pdev->bus,
> + PCI_SLOT(pdev->devfn),
> + PCI_FUNC(pdev->devfn), PCI_VENDOR_ID);
> + uint16_t device = pci_conf_read16(pdev->seg, pdev->bus,
> + PCI_SLOT(pdev->devfn),
> + PCI_FUNC(pdev->devfn), PCI_DEVICE_ID);
> + const static struct {
> + uint16_t vendor, device;
> + } quirks[] = {
Since this is now a special purpose array, I'd prefer it to have a more
specific name. Would you mind if I rename it to ignore_bars[] while
committing? I'd perhaps also take the liberty and swap "const" and
"static" into their more conventional order.
> + /*
> + * Device [8086:2fc0]
> + * Erratum HSE43
> + * CONFIG_TDP_NOMINAL CSR Implemented at Incorrect Offset
> + *
> http://www.intel.com/content/www/us/en/processors/xeon/xeon-e5-v3-spec-update.html
> + */
> + { PCI_VENDOR_ID_INTEL, 0x2fc0 },
> + /*
> + * Devices [8086:6f60,6fa0,6fc0]
> + * Erratum BDF2
.../BDX2
> + * PCI BARs in the Home Agent Will Return Non-Zero Values During
> Enumeration
> + *
> http://www.intel.com/content/www/us/en/processors/xeon/xeon-e5-v4-spec-update.html
> + */
> + { PCI_VENDOR_ID_INTEL, 0x6f60 },
> + { PCI_VENDOR_ID_INTEL, 0x6fa0 },
> + { PCI_VENDOR_ID_INTEL, 0x6fc0 },
> + };
> + unsigned int i;
> +
> + for ( i = 0; i < ARRAY_SIZE(quirks); i++)
> + if ( vendor == quirks[i].vendor && device == quirks[i].device )
> + /*
> + * For both erratas force ignoring the BARs, this prevents vPCI
"errata" is plural already afaik.
With this
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |