diff options
| author | Kan Liang <kan.liang@linux.intel.com> | 2023-01-31 10:37:34 +0300 |
|---|---|---|
| committer | Joerg Roedel <jroedel@suse.de> | 2023-02-03 13:06:03 +0300 |
| commit | 4db96bfe9d7772d6ddedd62ce478895999043fd7 (patch) | |
| tree | f9a25cae45eb45608e7eb0f60447ecef0b11fc52 /include | |
| parent | e06d24435596c8afcaa81c0c498f5b0ec4ee2b7c (diff) | |
| download | linux-4db96bfe9d7772d6ddedd62ce478895999043fd7.tar.xz | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi/actbl1.h | 2 | ||||
| -rw-r--r-- | include/linux/dmar.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 4175dce3967c..bdded0ac46eb 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -802,7 +802,7 @@ struct acpi_dmar_pci_path { struct acpi_dmar_hardware_unit { struct acpi_dmar_header header; u8 flags; - u8 reserved; + u8 size; /* Size of the register set */ u16 segment; u64 address; /* Register Base Address */ }; diff --git a/include/linux/dmar.h b/include/linux/dmar.h index d81a51978d01..725d5e6acec0 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h @@ -39,6 +39,7 @@ struct dmar_drhd_unit { struct list_head list; /* list of drhd units */ struct acpi_dmar_header *hdr; /* ACPI header */ u64 reg_base_addr; /* register base address*/ + unsigned long reg_size; /* size of register set */ struct dmar_dev_scope *devices;/* target device array */ int devices_cnt; /* target device count */ u16 segment; /* PCI domain */ |
