hw/arm/smmu-common: Support 64-bit addresses
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Tue, 14 Feb 2023 17:19:21 +0000 (17:19 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 16 Feb 2023 16:00:48 +0000 (16:00 +0000)
Addresses targeting the second translation table (TTB1) in the SMMU have
all upper bits set. Ensure the IOMMU region covers all 64 bits.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-id: 20230214171921.1917916-2-jean-philippe@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/smmu-common.c
include/hw/arm/smmu-common.h

index 733c9647784770114c87c5f6c5029b7a94262094..2b8c67b9a1d65282cef3c120107685c1be3e2c5c 100644 (file)
@@ -439,7 +439,7 @@ static AddressSpace *smmu_find_add_as(PCIBus *bus, void *opaque, int devfn)
 
         memory_region_init_iommu(&sdev->iommu, sizeof(sdev->iommu),
                                  s->mrtypename,
-                                 OBJECT(s), name, 1ULL << SMMU_MAX_VA_BITS);
+                                 OBJECT(s), name, UINT64_MAX);
         address_space_init(&sdev->as,
                            MEMORY_REGION(&sdev->iommu), name);
         trace_smmu_add_mr(name);
index c5683af07d676cdca0c2cc8991f5cfdf243585f9..9fcff26357f028c30a15e277ae2ac221f656b21d 100644 (file)
@@ -27,8 +27,6 @@
 #define SMMU_PCI_DEVFN_MAX    256
 #define SMMU_PCI_DEVFN(sid)   (sid & 0xFF)
 
-#define SMMU_MAX_VA_BITS      48
-
 /*
  * Page table walk error types
  */