x86-iommu: Rename QOM type macros
Some QOM macros were using a X86_IOMMU_DEVICE prefix, and others were using a X86_IOMMU prefix. Rename all of them to use the same X86_IOMMU_DEVICE prefix. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20200825192110.3528606-47-ehabkost@redhat.com> Acked-by: Peter Xu <peterx@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
9db70dac85
commit
30c60f77a8
|
@ -1600,7 +1600,7 @@ static void amdvi_instance_init(Object *klass)
|
||||||
static void amdvi_class_init(ObjectClass *klass, void* data)
|
static void amdvi_class_init(ObjectClass *klass, void* data)
|
||||||
{
|
{
|
||||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||||
X86IOMMUClass *dc_class = X86_IOMMU_CLASS(klass);
|
X86IOMMUClass *dc_class = X86_IOMMU_DEVICE_CLASS(klass);
|
||||||
|
|
||||||
dc->reset = amdvi_reset;
|
dc->reset = amdvi_reset;
|
||||||
dc->vmsd = &vmstate_amdvi;
|
dc->vmsd = &vmstate_amdvi;
|
||||||
|
|
|
@ -3853,7 +3853,7 @@ static void vtd_realize(DeviceState *dev, Error **errp)
|
||||||
static void vtd_class_init(ObjectClass *klass, void *data)
|
static void vtd_class_init(ObjectClass *klass, void *data)
|
||||||
{
|
{
|
||||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||||
X86IOMMUClass *x86_class = X86_IOMMU_CLASS(klass);
|
X86IOMMUClass *x86_class = X86_IOMMU_DEVICE_CLASS(klass);
|
||||||
|
|
||||||
dc->reset = vtd_reset;
|
dc->reset = vtd_reset;
|
||||||
dc->vmsd = &vtd_vmstate;
|
dc->vmsd = &vtd_vmstate;
|
||||||
|
|
|
@ -107,7 +107,7 @@ IommuType x86_iommu_get_type(void)
|
||||||
static void x86_iommu_realize(DeviceState *dev, Error **errp)
|
static void x86_iommu_realize(DeviceState *dev, Error **errp)
|
||||||
{
|
{
|
||||||
X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev);
|
X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(dev);
|
||||||
X86IOMMUClass *x86_class = X86_IOMMU_GET_CLASS(dev);
|
X86IOMMUClass *x86_class = X86_IOMMU_DEVICE_GET_CLASS(dev);
|
||||||
MachineState *ms = MACHINE(qdev_get_machine());
|
MachineState *ms = MACHINE(qdev_get_machine());
|
||||||
MachineClass *mc = MACHINE_GET_CLASS(ms);
|
MachineClass *mc = MACHINE_GET_CLASS(ms);
|
||||||
PCMachineState *pcms =
|
PCMachineState *pcms =
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
#define TYPE_X86_IOMMU_DEVICE ("x86-iommu")
|
#define TYPE_X86_IOMMU_DEVICE ("x86-iommu")
|
||||||
#define X86_IOMMU_DEVICE(obj) \
|
#define X86_IOMMU_DEVICE(obj) \
|
||||||
OBJECT_CHECK(X86IOMMUState, (obj), TYPE_X86_IOMMU_DEVICE)
|
OBJECT_CHECK(X86IOMMUState, (obj), TYPE_X86_IOMMU_DEVICE)
|
||||||
#define X86_IOMMU_CLASS(klass) \
|
#define X86_IOMMU_DEVICE_CLASS(klass) \
|
||||||
OBJECT_CLASS_CHECK(X86IOMMUClass, (klass), TYPE_X86_IOMMU_DEVICE)
|
OBJECT_CLASS_CHECK(X86IOMMUClass, (klass), TYPE_X86_IOMMU_DEVICE)
|
||||||
#define X86_IOMMU_GET_CLASS(obj) \
|
#define X86_IOMMU_DEVICE_GET_CLASS(obj) \
|
||||||
OBJECT_GET_CLASS(X86IOMMUClass, obj, TYPE_X86_IOMMU_DEVICE)
|
OBJECT_GET_CLASS(X86IOMMUClass, obj, TYPE_X86_IOMMU_DEVICE)
|
||||||
|
|
||||||
#define X86_IOMMU_SID_INVALID (0xffff)
|
#define X86_IOMMU_SID_INVALID (0xffff)
|
||||||
|
|
|
@ -4607,7 +4607,7 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
|
||||||
if (iommu) {
|
if (iommu) {
|
||||||
int ret;
|
int ret;
|
||||||
MSIMessage src, dst;
|
MSIMessage src, dst;
|
||||||
X86IOMMUClass *class = X86_IOMMU_GET_CLASS(iommu);
|
X86IOMMUClass *class = X86_IOMMU_DEVICE_GET_CLASS(iommu);
|
||||||
|
|
||||||
if (!class->int_remap) {
|
if (!class->int_remap) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue