|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] pci: apply workaround for Intel errata HSE43 and BDF2
>>> On 03.12.18 at 18:36, <roger.pau@xxxxxxxxxx> wrote:
> On Fri, Nov 30, 2018 at 03:53:29AM -0700, Jan Beulich wrote:
>> >>> On 29.11.18 at 18:11, <roger.pau@xxxxxxxxxx> wrote:
>> > @@ -298,6 +299,34 @@ 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);
>> > +
>> > + if ( vendor == PCI_VENDOR_ID_INTEL && (device == 0x2fc0 ||
>> > + device == 0x6f60 || device == 0x6fa0 || device == 0x6fc0) )
>>
>> Instead of such an ever growing if(), could we make this table based?
>
> Sure, I guess using something similar to Linux's would be fine, so a
> table with the vendor ID, device ID and a pointer to a function to be
> called in case of match?
You could go this far, but I wouldn't: For now a table of (vendor,device)
tuples would suffice. Once we need to deal with further quirks, we could
then decide whether we want something callback-based.
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 |