mirror of
https://github.com/mii443/qemu.git
synced 2025-09-03 15:49:30 +00:00
memory/iommu: introduce IOMMUMemoryRegionClass
This finishes QOM'fication of IOMMUMemoryRegion by introducing a IOMMUMemoryRegionClass. This also provides a fastpath analog for IOMMU_MEMORY_REGION_GET_CLASS(). This makes IOMMUMemoryRegion an abstract class. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Message-Id: <20170711035620.4232-3-aik@ozlabs.ru> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
3df9d74806
commit
1221a47467
@ -32,6 +32,8 @@
|
||||
#define INTEL_IOMMU_DEVICE(obj) \
|
||||
OBJECT_CHECK(IntelIOMMUState, (obj), TYPE_INTEL_IOMMU_DEVICE)
|
||||
|
||||
#define TYPE_INTEL_IOMMU_MEMORY_REGION "intel-iommu-iommu-memory-region"
|
||||
|
||||
/* DMAR Hardware Unit Definition address (IOMMU unit) */
|
||||
#define Q35_HOST_BRIDGE_IOMMU_ADDR 0xfed90000ULL
|
||||
|
||||
@ -289,7 +291,6 @@ struct IntelIOMMUState {
|
||||
uint32_t context_cache_gen; /* Should be in [1,MAX] */
|
||||
GHashTable *iotlb; /* IOTLB */
|
||||
|
||||
MemoryRegionIOMMUOps iommu_ops;
|
||||
GHashTable *vtd_as_by_busptr; /* VTDBus objects indexed by PCIBus* reference */
|
||||
VTDBus *vtd_as_by_bus_num[VTD_PCI_BUS_MAX]; /* VTDBus objects indexed by bus number */
|
||||
/* list of registered notifiers */
|
||||
|
@ -582,6 +582,10 @@ typedef struct sPAPRTCETable sPAPRTCETable;
|
||||
#define SPAPR_TCE_TABLE(obj) \
|
||||
OBJECT_CHECK(sPAPRTCETable, (obj), TYPE_SPAPR_TCE_TABLE)
|
||||
|
||||
#define TYPE_SPAPR_IOMMU_MEMORY_REGION "spapr-iommu-memory-region"
|
||||
#define SPAPR_IOMMU_MEMORY_REGION(obj) \
|
||||
OBJECT_CHECK(IOMMUMemoryRegion, (obj), TYPE_SPAPR_IOMMU_MEMORY_REGION)
|
||||
|
||||
struct sPAPRTCETable {
|
||||
DeviceState parent;
|
||||
uint32_t liobn;
|
||||
|
Reference in New Issue
Block a user