Re: [Xen-devel] [PATCH v2] AMD IOMMU: Support IOAPIC IDs larger than 128

2016-12-12 Thread Suravee Suthikulpanit
On 12/12/16 21:46, Jan Beulich wrote: On 05.12.16 at 20:36, wrote: +unsigned int ioapic_id_to_index(unsigned int apic_id) +{ +unsigned int idx; + +if ( !nr_ioapic_sbdf ) +return MAX_IO_APICS; This is pointless (redundant with ... +for ( idx = 0 ; idx < nr_ioapic_sbdf;

Re: [Xen-devel] [PATCH v2] AMD IOMMU: Support IOAPIC IDs larger than 128

2016-12-12 Thread Jan Beulich
>>> On 05.12.16 at 20:36, wrote: > Currently, the driver uses the APIC ID to index into the ioapic_sbdf array. > The current MAX_IO_APICS is 128, which causes the driver initialization > to fail on the system with IOAPIC ID >= 128. > > Instead, this patch adds APIC ID in the struct ioapic_sbdf, >

Re: [Xen-devel] [PATCH v2] AMD IOMMU: Support IOAPIC IDs larger than 128

2016-12-12 Thread Jan Beulich
>>> On 05.12.16 at 20:36, wrote: > +unsigned int ioapic_id_to_index(unsigned int apic_id) > +{ > +unsigned int idx; > + > +if ( !nr_ioapic_sbdf ) > +return MAX_IO_APICS; This is pointless (redundant with ... > +for ( idx = 0 ; idx < nr_ioapic_sbdf; idx++ ) > +if ( ioa

[Xen-devel] [PATCH v2] AMD IOMMU: Support IOAPIC IDs larger than 128

2016-12-05 Thread Suravee Suthikulpanit
Currently, the driver uses the APIC ID to index into the ioapic_sbdf array. The current MAX_IO_APICS is 128, which causes the driver initialization to fail on the system with IOAPIC ID >= 128. Instead, this patch adds APIC ID in the struct ioapic_sbdf, which is used to match the entry when searchi