mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06: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:
parent
3df9d74806
commit
1221a47467
15 changed files with 205 additions and 70 deletions
|
@ -220,6 +220,8 @@
|
|||
|
||||
#define TYPE_AMD_IOMMU_PCI "AMDVI-PCI"
|
||||
|
||||
#define TYPE_AMD_IOMMU_MEMORY_REGION "amd-iommu-iommu-memory-region"
|
||||
|
||||
typedef struct AMDVIAddressSpace AMDVIAddressSpace;
|
||||
|
||||
/* functions to steal PCI config space */
|
||||
|
@ -276,9 +278,6 @@ typedef struct AMDVIState {
|
|||
uint8_t romask[AMDVI_MMIO_SIZE]; /* MMIO read/only mask */
|
||||
bool mmio_enabled;
|
||||
|
||||
/* IOMMU function */
|
||||
MemoryRegionIOMMUOps iommu_ops;
|
||||
|
||||
/* for each served device */
|
||||
AMDVIAddressSpace **address_spaces[PCI_BUS_MAX];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue