hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE

During the last patches, TYPE_PIIX3_XEN_DEVICE turned into a clone of
TYPE_PIIX3_DEVICE. Remove this redundancy.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Tested-by: Chuck Zmudzinski <brchuckz@aol.com>
Message-Id: <20230312120221.99183-7-shentey@gmail.com>
Message-Id: <20230403074124.3925-8-shentey@gmail.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
Bernhard Beschow 2023-04-03 09:41:24 +02:00 committed by Anthony PERARD
parent 0f3e02a2f5
commit f8790f81eb
3 changed files with 2 additions and 19 deletions

View File

@ -239,8 +239,6 @@ static void pc_init1(MachineState *machine,
if (pcmc->pci_enabled) { if (pcmc->pci_enabled) {
PIIX3State *piix3; PIIX3State *piix3;
PCIDevice *pci_dev; PCIDevice *pci_dev;
const char *type = xen_enabled() ? TYPE_PIIX3_XEN_DEVICE
: TYPE_PIIX3_DEVICE;
pci_bus = i440fx_init(pci_type, pci_bus = i440fx_init(pci_type,
i440fx_host, i440fx_host,
@ -253,7 +251,8 @@ static void pc_init1(MachineState *machine,
: pc_pci_slot_get_pirq); : pc_pci_slot_get_pirq);
pcms->bus = pci_bus; pcms->bus = pci_bus;
pci_dev = pci_create_simple_multifunction(pci_bus, -1, true, type); pci_dev = pci_create_simple_multifunction(pci_bus, -1, true,
TYPE_PIIX3_DEVICE);
if (xen_enabled()) { if (xen_enabled()) {
pci_device_set_intx_routing_notifier( pci_device_set_intx_routing_notifier(

View File

@ -30,7 +30,6 @@
#include "hw/irq.h" #include "hw/irq.h"
#include "hw/qdev-properties.h" #include "hw/qdev-properties.h"
#include "hw/isa/isa.h" #include "hw/isa/isa.h"
#include "hw/xen/xen.h"
#include "sysemu/runstate.h" #include "sysemu/runstate.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "hw/acpi/acpi_aml_interface.h" #include "hw/acpi/acpi_aml_interface.h"
@ -381,24 +380,10 @@ static const TypeInfo piix3_info = {
.class_init = piix3_class_init, .class_init = piix3_class_init,
}; };
static void piix3_xen_class_init(ObjectClass *klass, void *data)
{
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->realize = piix3_realize;
}
static const TypeInfo piix3_xen_info = {
.name = TYPE_PIIX3_XEN_DEVICE,
.parent = TYPE_PIIX3_PCI_DEVICE,
.class_init = piix3_xen_class_init,
};
static void piix3_register_types(void) static void piix3_register_types(void)
{ {
type_register_static(&piix3_pci_type_info); type_register_static(&piix3_pci_type_info);
type_register_static(&piix3_info); type_register_static(&piix3_info);
type_register_static(&piix3_xen_info);
} }
type_init(piix3_register_types) type_init(piix3_register_types)

View File

@ -67,7 +67,6 @@ DECLARE_INSTANCE_CHECKER(PIIX3State, PIIX3_PCI_DEVICE,
TYPE_PIIX3_PCI_DEVICE) TYPE_PIIX3_PCI_DEVICE)
#define TYPE_PIIX3_DEVICE "PIIX3" #define TYPE_PIIX3_DEVICE "PIIX3"
#define TYPE_PIIX3_XEN_DEVICE "PIIX3-xen"
#define TYPE_PIIX4_PCI_DEVICE "piix4-isa" #define TYPE_PIIX4_PCI_DEVICE "piix4-isa"
#endif #endif