[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V2] x86/AMD-Vi: Add additional check for invalid special->handle
>>> On 12.09.13 at 00:31, Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> wrote: > On 9/5/2013 2:14 AM, Jan Beulich wrote: >>>>> On 05.09.13 at 00:48, Suravee Suthikulpanit >>>>> <suravee.suthikulpanit@xxxxxxx> > wrote: >>> On 9/4/2013 4:57 AM, Jan Beulich wrote: >>>> It would, btw, be possible to get along with a single command line >>>> option, just having two alternating forms: >>>> >>>> ivrs_ioapic[id]=<sbdf> >>>> ivrs_ioapic[<sbdf>]=<id> >>> After looking through the examples above, I still think we only need the >>> "ivrs_ioapic[<sbdf>]=<id>" version. >> Perhaps, but then could you talk to your Linux side colleagues to >> find out why they picked (only) the other alternative? I'd really >> like to keep such workarounds largely in sync (a superset is fine, >> but a subset, not to speak of a disjoint set, are not) with Linux... >> > At this point, I think it's mainly syntax. Since the implementation is > different. If you want to keep the syntax the same (i.e. > ivrs_ioapic[id]=<sdbf>), we can do that. I don't think Linux tries to > interpret as "pin id" or "pin sdbf". All it does is just ties both > values together. So how about the below then? Jan AMD IOMMU: also match IVRS overrides on device ID Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/xen/drivers/passthrough/amd/iommu_acpi.c +++ b/xen/drivers/passthrough/amd/iommu_acpi.c @@ -713,6 +713,24 @@ static u16 __init parse_ivhd_device_spec * consistency here --- whether entry's IOAPIC ID is valid and * whether there are conflicting/duplicated entries. */ + apic = find_first_bit(ioapic_cmdline, ARRAY_SIZE(ioapic_sbdf)); + while ( apic < ARRAY_SIZE(ioapic_sbdf) ) + { + if ( ioapic_sbdf[apic].bdf == bdf && + ioapic_sbdf[apic].seg == seg ) + break; + apic = find_next_bit(ioapic_cmdline, ARRAY_SIZE(ioapic_sbdf), + apic + 1); + } + if ( apic < ARRAY_SIZE(ioapic_sbdf) ) + { + AMD_IOMMU_DEBUG("IVHD: Command line override present for IO-APIC %#x" + "(IVRS: %#x devID %04x:%02x:%02x.%u)\n", + apic, special->handle, seg, PCI_BUS(bdf), + PCI_SLOT(bdf), PCI_FUNC(bdf)); + break; + } + for ( apic = 0; apic < nr_ioapics; apic++ ) { if ( IO_APIC_ID(apic) != special->handle ) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |