[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3] AMD IOMMU: Introduce support for IVHD block type 11h
On 26/05/16 03:50, suravee.suthikulpanit@xxxxxxx wrote: > From: Suravee Suthikulpanit <Suravee.Suthikulpanit@xxxxxxx> > > Along with the IVHD block type 10h, newer AMD platforms also come with > types 11h, which is a superset of the older one. Having multiple IVHD > block types in the same platform allows backward compatibility of newer > systems to work with existing drivers. The driver should only parse > the highest-level (newest) type of IVHD block that it can support. > However, the current driver returns error when encounters with unknown > IVHD block type. This causes existing driver to unnecessarily fail IOMMU > initialization on new systems. > > This patch introduces a new logic, which scans through IVRS table looking > for the highest-level supporsted IVHD block type. It also adds support > for the new IVHD block type 11h. More information about the IVHD type 11h > can be found in the AMD I/O Virtualization Technology (IOMMU) Specification > rev 2.62. > > http://support.amd.com/TechDocs/48882_IOMMU.pdf > > Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> with two minor style issues (which can be fixed on commit if necessary). > @@ -978,6 +966,25 @@ static void __init dump_acpi_table_header(struct > acpi_table_header *table) > > } > > +#define to_ivhd_block(hdr) \ > + container_of(hdr, const struct acpi_ivrs_hardware, header) > +#define to_ivmd_block(hdr) \ > + container_of(hdr, const struct acpi_ivrs_memory, header) > + > +static inline bool_t is_ivhd_block(u8 type) > +{ > + return ( type == ACPI_IVRS_TYPE_HARDWARE || > + type == ACPI_IVRS_TYPE_HARDWARE_11H ); > +} > + > +static inline bool_t is_ivmd_block(u8 type) \ Stray \ > @@ -1102,15 +1110,16 @@ static int __init get_last_bdf_ivhd( > { > const union acpi_ivhd_device *ivhd_device; > u16 block_length, dev_length; > + size_t hdr_size = get_ivhd_header_size(ivhd_block) ; Stray space. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |