iommu/amd: Use the most comprehensive IVHD type that the driver can support
authorSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Fri, 1 Apr 2016 13:05:59 +0000 (09:05 -0400)
committerJoerg Roedel <jroedel@suse.de>
Thu, 7 Apr 2016 11:29:41 +0000 (13:29 +0200)
commit8c7142f56fedfc6824b5bca56fee1f443e01746b
treedbaccc165be203f153ae54da4103cf048e3716e9
parentac7ccf6765af5a255cec82fa95ec11f6c769022c
iommu/amd: Use the most comprehensive IVHD type that the driver can support

The IVRS in more recent AMD system usually contains multiple
IVHD block types (e.g. 0x10, 0x11, and 0x40) for each IOMMU.
The newer IVHD types provide more information (e.g. new features
specified in the IOMMU spec), while maintain compatibility with
the older IVHD type.

Having multiple IVHD type allows older IOMMU drivers to still function
(e.g. using the older IVHD type 0x10) while the newer IOMMU driver can use
the newer IVHD types (e.g. 0x11 and 0x40). Therefore, the IOMMU driver
should only make use of the newest IVHD type that it can support.

This patch adds new logic to determine the highest level of IVHD type
it can support, and use it throughout the to initialize the driver.
This requires adding another pass to the IVRS parsing to determine
appropriate IVHD type (see function get_highest_supported_ivhd_type())
before parsing the contents.

[Vincent: fix the build error of IVHD_DEV_ACPI_HID flag not found]

Signed-off-by: Wan Zongshun <vincent.wan@amd.com>
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu_init.c
This page took 0.024123 seconds and 5 git commands to generate.