[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [RFC v5 11/29] memory: Add arch_id and leaf fields in IOTLBEn
From: |
Eric Auger |
Subject: |
[Qemu-arm] [RFC v5 11/29] memory: Add arch_id and leaf fields in IOTLBEntry |
Date: |
Thu, 11 Jul 2019 19:39:15 +0200 |
TLB entries are usually tagged with some ids such as the asid
or pasid. When propagating an invalidation command from the
guest to the host, we need to pass this id.
Also we add a leaf field which indicates, in case of invalidation
notification whether only cache entries for the last level of
translation are required to be invalidated.
Signed-off-by: Eric Auger <address@hidden>
---
include/exec/memory.h | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index d0de192887..8dd4d787d4 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -68,12 +68,30 @@ typedef enum {
#define IOMMU_ACCESS_FLAG(r, w) (((r) ? IOMMU_RO : 0) | ((w) ? IOMMU_WO : 0))
+/**
+ * IOMMUTLBEntry - IOMMU TLB entry
+ *
+ * Structure used when performing a translation or when notifying MAP or
+ * UNMAP (invalidation) events
+ *
+ * @target_as: target address space
+ * @iova: IO virtual address (input)
+ * @translated_addr: translated address (output)
+ * @addr_mask: address mask (0xfff means 4K binding), must be multiple of 2
+ * @perm: permission flag of the mapping (NONE encodes no mapping or
+ * invalidation notification)
+ * @arch_id: architecture specific ID tagging the TLB
+ * @leaf: when @perm is NONE, indicates whether only caches for the last
+ * level of translation need to be invalidated.
+ */
struct IOMMUTLBEntry {
AddressSpace *target_as;
hwaddr iova;
hwaddr translated_addr;
- hwaddr addr_mask; /* 0xfff = 4k translation */
+ hwaddr addr_mask;
IOMMUAccessFlags perm;
+ uint32_t arch_id;
+ bool leaf;
};
/*
--
2.20.1
- [Qemu-arm] [RFC v5 02/29] memory: Add IOMMU_ATTR_VFIO_NESTED IOMMU memory region attribute, (continued)
- [Qemu-arm] [RFC v5 02/29] memory: Add IOMMU_ATTR_VFIO_NESTED IOMMU memory region attribute, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 03/29] hw/vfio/common: Assert in case of nested mode, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 04/29] hw/arm/smmuv3: Log a guest error when decoding an invalid STE, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 07/29] update-linux-headers: Add sve_context.h to asm-arm64, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 06/29] update-linux-headers: Import iommu.h, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 05/29] hw/arm/smmuv3: Remove spurious error messages on IOVA invalidations, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 08/29] header update against 5.3.0-rc0 and IOMMU/VFIO nested stage APIs, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 09/29] memory: Add IOMMU_ATTR_MSI_TRANSLATE IOMMU memory region attribute, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 12/29] iommu: Introduce generic header, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 10/29] memory: Introduce IOMMU Memory Region inject_faults API, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 11/29] memory: Add arch_id and leaf fields in IOTLBEntry,
Eric Auger <=
- [Qemu-arm] [RFC v5 13/29] pci: introduce PCIPASIDOps to PCIDevice, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 14/29] vfio: Force nested if iommu requires it, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 15/29] vfio: Introduce hostwin_from_range helper, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 16/29] vfio: Introduce helpers to DMA map/unmap a RAM section, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 17/29] vfio: Set up nested stage mappings, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 18/29] vfio: Pass stage 1 MSI bindings to the host, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 19/29] vfio: Helper to get IRQ info including capabilities, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 20/29] vfio/pci: Register handler for iommu fault, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 21/29] vfio/pci: Set up the DMA FAULT region, Eric Auger, 2019/07/11
- [Qemu-arm] [RFC v5 24/29] hw/arm/smmuv3: Store the PASID table GPA in the translation config, Eric Auger, 2019/07/11