[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 53/55] kvmvapic: Use QOM realize
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 53/55] kvmvapic: Use QOM realize |
Date: |
Tue, 23 Jul 2013 01:46:34 +0200 |
From: Hu Tao <address@hidden>
Signed-off-by: Hu Tao <address@hidden>
[AF: Renamed variable]
Signed-off-by: Andreas Färber <address@hidden>
---
hw/i386/kvmvapic.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index ccd089a..365b219 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -703,19 +703,18 @@ static const MemoryRegionOps vapic_ops = {
.endianness = DEVICE_NATIVE_ENDIAN,
};
-static int vapic_init(SysBusDevice *dev)
+static void vapic_realize(DeviceState *dev, Error **errp)
{
+ SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
VAPICROMState *s = VAPIC(dev);
memory_region_init_io(&s->io, OBJECT(s), &vapic_ops, s, "kvmvapic", 2);
- sysbus_add_io(dev, VAPIC_IO_PORT, &s->io);
- sysbus_init_ioports(dev, VAPIC_IO_PORT, 2);
+ sysbus_add_io(sbd, VAPIC_IO_PORT, &s->io);
+ sysbus_init_ioports(sbd, VAPIC_IO_PORT, 2);
option_rom[nb_option_roms].name = "kvmvapic.bin";
option_rom[nb_option_roms].bootindex = -1;
nb_option_roms++;
-
- return 0;
}
static void do_vapic_enable(void *data)
@@ -812,13 +811,12 @@ static const VMStateDescription vmstate_vapic = {
static void vapic_class_init(ObjectClass *klass, void *data)
{
- SysBusDeviceClass *sc = SYS_BUS_DEVICE_CLASS(klass);
DeviceClass *dc = DEVICE_CLASS(klass);
dc->no_user = 1;
dc->reset = vapic_reset;
dc->vmsd = &vmstate_vapic;
- sc->init = vapic_init;
+ dc->realize = vapic_realize;
}
static const TypeInfo vapic_type = {
--
1.8.1.4
- [Qemu-devel] [PULL 44/55] pflash_cfi01: Use QOM realize for pflash_cfi01, (continued)
- [Qemu-devel] [PULL 44/55] pflash_cfi01: Use QOM realize for pflash_cfi01, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 45/55] pflash_cfi02: Use QOM realize for pflash_cfi02, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 42/55] fdc: Use QOM realize for fdc, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 43/55] fdc: Improve error propagation for QOM realize, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 46/55] ahci: Use QOM realize for ahci, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 48/55] scsi/esp: Use QOM realize for scsi esp, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 49/55] megasas: Legacy command line handling fix, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 47/55] fw_cfg: Use QOM realize for fw_cfg, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 52/55] kvm/clock: Use QOM realize for kvmclock, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 51/55] hpet: Use QOM realize for hpet, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 53/55] kvmvapic: Use QOM realize,
Andreas Färber <=
- [Qemu-devel] [PULL 54/55] ioapic: Use QOM realize for ioapic, Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 50/55] scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline(), Andreas Färber, 2013/07/22
- [Qemu-devel] [PULL 55/55] isa-bus: Drop isabus_bridge_init() since it does nothing, Andreas Färber, 2013/07/22