[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH ats_vtd 14/22] intel_iommu: implement the get_memory_region_pasid
From: |
CLEMENT MATHIEU--DRIF |
Subject: |
[PATCH ats_vtd 14/22] intel_iommu: implement the get_memory_region_pasid iommu operation |
Date: |
Tue, 21 May 2024 13:11:48 +0000 |
Signed-off-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
---
hw/i386/intel_iommu.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index e83985f2f7..a42938aacd 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -5975,9 +5975,24 @@ static AddressSpace *vtd_host_dma_iommu(PCIBus *bus,
void *opaque, int devfn)
return vtd_host_dma_iommu_pasid(bus, opaque, devfn, PCI_NO_PASID);
}
+static IOMMUMemoryRegion *vtd_get_memory_region_pasid(PCIBus *bus,
+ void *opaque,
+ int devfn,
+ uint32_t pasid)
+{
+ IntelIOMMUState *s = opaque;
+ VTDAddressSpace *vtd_as;
+
+ assert(0 <= devfn && devfn < PCI_DEVFN_MAX);
+
+ vtd_as = vtd_find_add_as(s, bus, devfn, pasid);
+ return &vtd_as->iommu;
+}
+
static PCIIOMMUOps vtd_iommu_ops = {
.get_address_space = vtd_host_dma_iommu,
.get_address_space_pasid = vtd_host_dma_iommu_pasid,
+ .get_memory_region_pasid = vtd_get_memory_region_pasid,
.set_iommu_device = vtd_dev_set_iommu_device,
.unset_iommu_device = vtd_dev_unset_iommu_device,
};
--
2.44.0
- [PATCH ats_vtd 01/22] intel_iommu: fix FRCD construction macro., (continued)
- [PATCH ats_vtd 01/22] intel_iommu: fix FRCD construction macro., CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 07/22] pcie: helper functions to check if PASID and ATS are enabled, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 15/22] memory: Allow to store the PASID in IOMMUTLBEntry, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 22/22] intel_iommu: add support for ATS, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 20/22] pci: add a pci-level API for ATS, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 10/22] pci: add IOMMU operations to get address spaces and memory regions with PASID, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 11/22] memory: store user data pointer in the IOMMU notifiers, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 12/22] pci: add a pci-level initialization function for iommu notifiers, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 04/22] intel_iommu: do not consider wait_desc as an invalid descriptor, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 18/22] atc: add unit tests, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 14/22] intel_iommu: implement the get_memory_region_pasid iommu operation,
CLEMENT MATHIEU--DRIF <=
- [PATCH ats_vtd 09/22] pci: cache the bus mastering status in the device, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 02/22] intel_iommu: make types match, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 03/22] intel_iommu: return page walk level even when the translation fails, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 16/22] intel_iommu: fill the PASID field when creating an instance of IOMMUTLBEntry, CLEMENT MATHIEU--DRIF, 2024/05/21
- [PATCH ats_vtd 21/22] intel_iommu: set the address mask even when a translation fails, CLEMENT MATHIEU--DRIF, 2024/05/21