diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-10-15 12:46:42 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-10-15 12:46:42 +0200 |
commit | 246a0cd415af377d26576dd9962ee78c0f83f1f9 (patch) | |
tree | c423e0a783985117ea1d28110a3224a68d108b40 /xen/include | |
parent | 6f81a70baf839a94732a6b9dd2eaf11e1aa2eff2 (diff) |
AMD/IOMMU: respect AtsDisabled device flag
IVHD entries may specify that ATS is to be blocked for a device or range
of devices. Honor firmware telling us so.
While adding respective checks I noticed that the 2nd conditional in
amd_iommu_setup_domain_device() failed to check the IOMMU's capability.
Add the missing part of the condition there, as no good can come from
enabling ATS on a device when the IOMMU is not capable of dealing with
ATS requests.
For actually using ACPI_IVHD_ATS_DISABLED, make its expansion no longer
exhibit UB.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/include/acpi/actbl2.h b/xen/include/acpi/actbl2.h index 4252c90a3f..2ad08ea467 100644 --- a/xen/include/acpi/actbl2.h +++ b/xen/include/acpi/actbl2.h @@ -851,7 +851,7 @@ struct acpi_ivrs_device8b { /* Values for extended_data above */ -#define ACPI_IVHD_ATS_DISABLED (1<<31) +#define ACPI_IVHD_ATS_DISABLED (1u << 31) /* Type 72: 8-byte device entry */ |