[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/48] intel_iommu: Set default aw_bits to 48 starting from QEMU 9
From: |
Michael S. Tsirkin |
Subject: |
[PULL 21/48] intel_iommu: Set default aw_bits to 48 starting from QEMU 9.2 |
Date: |
Wed, 15 Jan 2025 13:09:33 -0500 |
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
According to VTD spec, stage-1 page table could support 4-level and
5-level paging.
However, 5-level paging translation emulation is unsupported yet.
That means the only supported value for aw_bits is 48. So default
aw_bits to 48 when stage-1 translation is turned on.
For legacy and scalable modes, 48 is the default choice for modern
OS when both 48 and 39 are supported. So it makes sense to set
default to 48 for these two modes too starting from QEMU 9.2.
Use pc_compat_9_1 to handle the compatibility for machines before
9.2.
Suggested-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Clément Mathieu--Drif<clement.mathieu--drif@eviden.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20241212083757.605022-17-zhenzhong.duan@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/i386/intel_iommu.h | 2 +-
hw/i386/pc.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/i386/intel_iommu.h b/include/hw/i386/intel_iommu.h
index a434c2489c..72428fefa4 100644
--- a/include/hw/i386/intel_iommu.h
+++ b/include/hw/i386/intel_iommu.h
@@ -45,7 +45,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(IntelIOMMUState,
INTEL_IOMMU_DEVICE)
#define DMAR_REG_SIZE 0x230
#define VTD_HOST_AW_39BIT 39
#define VTD_HOST_AW_48BIT 48
-#define VTD_HOST_ADDRESS_WIDTH VTD_HOST_AW_39BIT
+#define VTD_HOST_ADDRESS_WIDTH VTD_HOST_AW_48BIT
#define VTD_HAW_MASK(aw) ((1ULL << (aw)) - 1)
#define DMAR_REPORT_F_INTR (1)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 9334b033f6..b46975c8a4 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -86,6 +86,7 @@ GlobalProperty pc_compat_9_1[] = {
{ "ICH9-LPC", "x-smi-swsmi-timer", "off" },
{ "ICH9-LPC", "x-smi-periodic-timer", "off" },
{ TYPE_INTEL_IOMMU_DEVICE, "stale-tm", "on" },
+ { TYPE_INTEL_IOMMU_DEVICE, "aw-bits", "39" },
};
const size_t pc_compat_9_1_len = G_N_ELEMENTS(pc_compat_9_1);
--
MST
- [PULL 17/48] intel_iommu: Add an internal API to find an address space with PASID, (continued)
- [PULL 17/48] intel_iommu: Add an internal API to find an address space with PASID, Michael S. Tsirkin, 2025/01/15
- [PULL 19/48] intel_iommu: piotlb invalidation should notify unmap, Michael S. Tsirkin, 2025/01/15
- [PULL 24/48] intel_iommu: Introduce a property to control FS1GP cap bit setting, Michael S. Tsirkin, 2025/01/15
- [PULL 14/48] intel_iommu: Set accessed and dirty bits during stage-1 translation, Michael S. Tsirkin, 2025/01/15
- [PULL 18/48] intel_iommu: Add support for PASID-based device IOTLB invalidation, Michael S. Tsirkin, 2025/01/15
- [PULL 33/48] acpi/ghes: Change the type for source_id, Michael S. Tsirkin, 2025/01/15
- [PULL 32/48] acpi/ghes: Remove a duplicated out of bounds check, Michael S. Tsirkin, 2025/01/15
- [PULL 15/48] intel_iommu: Flush stage-1 cache in iotlb invalidation, Michael S. Tsirkin, 2025/01/15
- [PULL 16/48] intel_iommu: Process PASID-based iotlb invalidation, Michael S. Tsirkin, 2025/01/15
- [PULL 40/48] acpi/ghes: move offset calculus to a separate function, Michael S. Tsirkin, 2025/01/15
- [PULL 21/48] intel_iommu: Set default aw_bits to 48 starting from QEMU 9.2,
Michael S. Tsirkin <=
- [PULL 22/48] tests/acpi: q35: Update host address width in DMAR, Michael S. Tsirkin, 2025/01/15
- [PULL 41/48] acpi/ghes: Change ghes fill logic to work with only one source, Michael S. Tsirkin, 2025/01/15
- [PULL 46/48] hw/cxl: Fix msix_notify: Assertion `vector < dev->msix_entries_nr`, Michael S. Tsirkin, 2025/01/15
- [PULL 28/48] acpi/ghes: simplify acpi_ghes_record_errors() code, Michael S. Tsirkin, 2025/01/15
- [PULL 25/48] tests/qtest: Add intel-iommu test, Michael S. Tsirkin, 2025/01/15
- [PULL 37/48] acpi/ghes: don't crash QEMU if ghes GED is not found, Michael S. Tsirkin, 2025/01/15
- [PULL 30/48] acpi/ghes: better handle source_id and notification, Michael S. Tsirkin, 2025/01/15
- [PULL 44/48] pci: acpi: Windows 'PCI Label Id' bug workaround, Michael S. Tsirkin, 2025/01/15
- [PULL 48/48] virtio-net: vhost-user: Implement internal migration, Michael S. Tsirkin, 2025/01/15
- [PULL 36/48] acpi/ghes: better name GHES memory error function, Michael S. Tsirkin, 2025/01/15