diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-10-15 12:45:16 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-10-15 12:45:16 +0200 |
commit | 87caa1c3fb872c21297fee936f6247eb09cfe840 (patch) | |
tree | bd26c94f721750cc5672874a0adcddbadd2276f5 /xen/include | |
parent | d8bd82327b0fffb16841862192e826fcb1344d8c (diff) |
AMD/IOMMU: improve (extended) feature detection
First of all the documentation is very clear about ACPI table data
superseding raw register data. Use raw register data only if EFRSup is
clear in the ACPI tables (which may still go too far). Additionally if
this flag is clear, the IVRS type 11H table is reserved and hence may
not be recognized.
Furthermore propagate IVRS type 10H data into the feature flags
recorded, as the full extended features field is available in type 11H
only.
Note that this also makes necessary to stop the bad practice of us
finding a type 11H IVHD entry, but still processing the type 10H one
in detect_iommu_acpi()'s invocation of amd_iommu_detect_one_acpi().
Note also that the features.raw check in amd_iommu_prepare_one() needs
replacing, now that the field can also be populated by different means.
Key IOMMUv2 availability off of IVHD type not being 10H, and then move
it a function layer up, so that it would be set only once all IOMMUs
have been successfully prepared.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'xen/include')
-rw-r--r-- | xen/include/acpi/actbl2.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/include/acpi/actbl2.h b/xen/include/acpi/actbl2.h index 42beac4e26..4252c90a3f 100644 --- a/xen/include/acpi/actbl2.h +++ b/xen/include/acpi/actbl2.h @@ -716,6 +716,9 @@ struct acpi_table_ivrs { /* Values for Info field above */ +#define ACPI_IVRS_EFR_SUP 0x00000001 /* extended feature support */ +#define ACPI_IVRS_PREBOOT_DMA_REMAP 0x00000002 /* pre-boot DMA remapping in use */ +#define ACPI_IVRS_GVA_SIZE 0x000000E0 /* 3 bits, guest VA size */ #define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00 /* 7 bits, physical address size */ #define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000 /* 7 bits, virtual address size */ #define ACPI_IVRS_ATS_RESERVED 0x00400000 /* ATS address translation range reserved */ |