diff options
| author | Joao Martins <joao.m.martins@oracle.com> | 2025-09-19 21:35:15 +0000 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-10-05 16:13:02 -0400 |
| commit | d9ec848fb515f4c98f5737ad1f788ef06887fc2c (patch) | |
| tree | 326d1b477ef9e4ece3e6b8a022597386b7f32760 /hw/i386/acpi-build.c | |
| parent | b6b49c2cd6c2be8aac80f7563950398c7128f19e (diff) | |
| download | focaccia-qemu-d9ec848fb515f4c98f5737ad1f788ef06887fc2c.tar.gz focaccia-qemu-d9ec848fb515f4c98f5737ad1f788ef06887fc2c.zip | |
amd_iommu: HATDis/HATS=11 support
Add a way to disable DMA translation support in AMD IOMMU by allowing to set IVHD HATDis to 1, and exposing HATS (Host Address Translation Size) as Reserved value. Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20250919213515.917111-23-alejandro.j.jimenez@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/acpi-build.c')
| -rw-r--r-- | hw/i386/acpi-build.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 423c4959fe..9446a9f862 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -1863,7 +1863,11 @@ build_amd_iommu(GArray *table_data, BIOSLinker *linker, const char *oem_id, /* IOMMU info */ build_append_int_noprefix(table_data, 0, 2); /* IOMMU Attributes */ - build_append_int_noprefix(table_data, 0, 4); + if (!s->iommu.dma_translation) { + build_append_int_noprefix(table_data, (1UL << 0) /* HATDis */, 4); + } else { + build_append_int_noprefix(table_data, 0, 4); + } /* EFR Register Image */ build_append_int_noprefix(table_data, amdvi_extended_feature_register(s), |