aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/amd_iommu.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i386/amd_iommu.h')
-rw-r--r--hw/i386/amd_iommu.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h
index e05a4eff5d..fa5feb183c 100644
--- a/hw/i386/amd_iommu.h
+++ b/hw/i386/amd_iommu.h
@@ -23,6 +23,7 @@
#include "hw/pci/pci.h"
#include "hw/i386/x86-iommu.h"
+#include "qom/object.h"
/* Capability registers */
#define AMDVI_CAPAB_BAR_LOW 0x04
@@ -296,8 +297,9 @@ struct irte_ga {
};
#define TYPE_AMD_IOMMU_DEVICE "amd-iommu"
-#define AMD_IOMMU_DEVICE(obj)\
- OBJECT_CHECK(AMDVIState, (obj), TYPE_AMD_IOMMU_DEVICE)
+typedef struct AMDVIState AMDVIState;
+DECLARE_INSTANCE_CHECKER(AMDVIState, AMD_IOMMU_DEVICE,
+ TYPE_AMD_IOMMU_DEVICE)
#define TYPE_AMD_IOMMU_PCI "AMDVI-PCI"
@@ -310,7 +312,7 @@ typedef struct AMDVIPCIState {
PCIDevice dev; /* The PCI device itself */
} AMDVIPCIState;
-typedef struct AMDVIState {
+struct AMDVIState {
X86IOMMUState iommu; /* IOMMU bus device */
AMDVIPCIState pci; /* IOMMU PCI device */
@@ -367,6 +369,6 @@ typedef struct AMDVIState {
/* Interrupt remapping */
bool ga_enabled;
-} AMDVIState;
+};
#endif