diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-09-26 19:56:47 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2021-10-05 17:30:57 -0400 |
commit | 8f6b7309c423a876dbb26975fdb48f582ebcabcd (patch) | |
tree | 030f8e98400b9736aee9d6648d15ed83155f484e /hw/i386/amd_iommu.c | |
parent | 64cba40c4480b4716da7d26fbedc97f43aa9f8f4 (diff) | |
download | qemu-8f6b7309c423a876dbb26975fdb48f582ebcabcd.zip qemu-8f6b7309c423a876dbb26975fdb48f582ebcabcd.tar.gz qemu-8f6b7309c423a876dbb26975fdb48f582ebcabcd.tar.bz2 |
hw/i386/amd_iommu: Rename SysBus specific functions as amdvi_sysbus_X()
Various functions are SysBus specific. Rename them using the
consistent amdvi_sysbus_XXX() pattern, to differentiate them
from PCI specific functions (which we'll add in the next
commit).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210926175648.1649075-3-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/amd_iommu.c')
-rw-r--r-- | hw/i386/amd_iommu.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 0c994fa..9014690 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -1526,7 +1526,7 @@ static void amdvi_init(AMDVIState *s) AMDVI_MAX_PH_ADDR | AMDVI_MAX_GVA_ADDR | AMDVI_MAX_VA_ADDR); } -static void amdvi_reset(DeviceState *dev) +static void amdvi_sysbus_reset(DeviceState *dev) { AMDVIState *s = AMD_IOMMU_DEVICE(dev); @@ -1534,7 +1534,7 @@ static void amdvi_reset(DeviceState *dev) amdvi_init(s); } -static void amdvi_realize(DeviceState *dev, Error **errp) +static void amdvi_sysbus_realize(DeviceState *dev, Error **errp) { int ret = 0; AMDVIState *s = AMD_IOMMU_DEVICE(dev); @@ -1585,27 +1585,27 @@ static void amdvi_realize(DeviceState *dev, Error **errp) amdvi_init(s); } -static const VMStateDescription vmstate_amdvi = { +static const VMStateDescription vmstate_amdvi_sysbus = { .name = "amd-iommu", .unmigratable = 1 }; -static void amdvi_instance_init(Object *klass) +static void amdvi_sysbus_instance_init(Object *klass) { AMDVIState *s = AMD_IOMMU_DEVICE(klass); object_initialize(&s->pci, sizeof(s->pci), TYPE_AMD_IOMMU_PCI); } -static void amdvi_class_init(ObjectClass *klass, void* data) +static void amdvi_sysbus_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); X86IOMMUClass *dc_class = X86_IOMMU_DEVICE_CLASS(klass); - dc->reset = amdvi_reset; - dc->vmsd = &vmstate_amdvi; + dc->reset = amdvi_sysbus_reset; + dc->vmsd = &vmstate_amdvi_sysbus; dc->hotpluggable = false; - dc_class->realize = amdvi_realize; + dc_class->realize = amdvi_sysbus_realize; dc_class->int_remap = amdvi_int_remap; /* Supported by the pc-q35-* machine types */ dc->user_creatable = true; @@ -1613,12 +1613,12 @@ static void amdvi_class_init(ObjectClass *klass, void* data) dc->desc = "AMD IOMMU (AMD-Vi) DMA Remapping device"; } -static const TypeInfo amdvi = { +static const TypeInfo amdvi_sysbus = { .name = TYPE_AMD_IOMMU_DEVICE, .parent = TYPE_X86_IOMMU_DEVICE, .instance_size = sizeof(AMDVIState), - .instance_init = amdvi_instance_init, - .class_init = amdvi_class_init + .instance_init = amdvi_sysbus_instance_init, + .class_init = amdvi_sysbus_class_init }; static const TypeInfo amdvi_pci = { @@ -1648,7 +1648,7 @@ static const TypeInfo amdvi_iommu_memory_region_info = { static void amdvi_register_types(void) { type_register_static(&amdvi_pci); - type_register_static(&amdvi); + type_register_static(&amdvi_sysbus); type_register_static(&amdvi_iommu_memory_region_info); } |