summary refs log tree commit diff stats
path: root/hw/arm/smmu-internal.h
diff options
context:
space:
mode:
authorMostafa Saleh <smostafa@google.com>2023-05-25 10:37:50 +0100
committerPeter Maydell <peter.maydell@linaro.org>2023-05-30 15:50:16 +0100
commit2eaeb7d593254a34f3e551865b687886c2698f96 (patch)
treeaec4cd18f54e67dd736c533c061ace4d0cabcf03 /hw/arm/smmu-internal.h
parentcd617556aded2528664a3673d66d5cd0864f5341 (diff)
downloadfocaccia-qemu-2eaeb7d593254a34f3e551865b687886c2698f96.tar.gz
focaccia-qemu-2eaeb7d593254a34f3e551865b687886c2698f96.zip
hw/arm/smmuv3: Add VMID to TLB tagging
Allow TLB to be tagged with VMID.

If stage-1 is only supported, VMID is set to -1 and ignored from STE
and CMD_TLBI_NH* cmds.

Update smmu_iotlb_insert trace event to have vmid.

Signed-off-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Message-id: 20230516203327.2051088-8-smostafa@google.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/smmu-internal.h')
-rw-r--r--hw/arm/smmu-internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/arm/smmu-internal.h b/hw/arm/smmu-internal.h
index a9454f914e..843bebb185 100644
--- a/hw/arm/smmu-internal.h
+++ b/hw/arm/smmu-internal.h
@@ -132,9 +132,11 @@ static inline int pgd_concat_idx(int start_level, int granule_sz,
 }
 
 #define SMMU_IOTLB_ASID(key) ((key).asid)
+#define SMMU_IOTLB_VMID(key) ((key).vmid)
 
 typedef struct SMMUIOTLBPageInvInfo {
     int asid;
+    int vmid;
     uint64_t iova;
     uint64_t mask;
 } SMMUIOTLBPageInvInfo;