iommu/vt-d: Support size of the register set in DRHD
authorKan Liang <kan.liang@linux.intel.com>
Tue, 31 Jan 2023 07:37:34 +0000 (15:37 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 3 Feb 2023 10:06:03 +0000 (11:06 +0100)
commit4db96bfe9d7772d6ddedd62ce478895999043fd7
treef9a25cae45eb45608e7eb0f60447ecef0b11fc52
parente06d24435596c8afcaa81c0c498f5b0ec4ee2b7c
iommu/vt-d: Support size of the register set in DRHD

A new field, which indicates the size of the remapping hardware register
set for this remapping unit, is introduced in the DMA-remapping hardware
unit definition (DRHD) structure with the VT-d Spec 4.0. With this
information, SW doesn't need to 'guess' the size of the register set
anymore.

Update the struct acpi_dmar_hardware_unit to reflect the field. Store the
size of the register set in struct dmar_drhd_unit for each dmar device.

The 'size' information is ResvZ for the old BIOS and platforms. Fall back
to the old guessing method. There is nothing changed.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230128200428.1459118-2-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/dmar.c
include/acpi/actbl1.h
include/linux/dmar.h