summaryrefslogtreecommitdiff
path: root/hw/i386/kvm
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-11-25 22:38:13 +0100
committerAndreas Färber <afaerber@suse.de>2013-06-07 14:55:24 +0200
commit49fdb0c1c42f02ab163206f34fcf59bb0815afa2 (patch)
tree16012d132207dc70e7ace4a8b7e1b44061869596 /hw/i386/kvm
parentd1eebf4e3df8882d7be6377e1251123b6c16b9b0 (diff)
downloadqemu-49fdb0c1c42f02ab163206f34fcf59bb0815afa2.tar.gz
qemu-49fdb0c1c42f02ab163206f34fcf59bb0815afa2.tar.bz2
qemu-49fdb0c1c42f02ab163206f34fcf59bb0815afa2.zip
kvm/i8259: QOM'ify some more
Introduce type constant. Prepares for PIC realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/i386/kvm')
-rw-r--r--hw/i386/kvm/i8259.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/i386/kvm/i8259.c b/hw/i386/kvm/i8259.c
index d961ecabbd..0bfbe34c86 100644
--- a/hw/i386/kvm/i8259.c
+++ b/hw/i386/kvm/i8259.c
@@ -13,6 +13,8 @@
#include "hw/i386/apic_internal.h"
#include "sysemu/kvm.h"
+#define TYPE_KVM_I8259 "kvm-i8259"
+
static void kvm_pic_get(PICCommonState *s)
{
struct kvm_irqchip chip;
@@ -106,8 +108,8 @@ static void kvm_pic_init(PICCommonState *s)
qemu_irq *kvm_i8259_init(ISABus *bus)
{
- i8259_init_chip("kvm-i8259", bus, true);
- i8259_init_chip("kvm-i8259", bus, false);
+ i8259_init_chip(TYPE_KVM_I8259, bus, true);
+ i8259_init_chip(TYPE_KVM_I8259, bus, false);
return qemu_allocate_irqs(kvm_pic_set_irq, NULL, ISA_NUM_IRQS);
}
@@ -124,7 +126,7 @@ static void kvm_i8259_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo kvm_i8259_info = {
- .name = "kvm-i8259",
+ .name = TYPE_KVM_I8259,
.parent = TYPE_PIC_COMMON,
.instance_size = sizeof(PICCommonState),
.class_init = kvm_i8259_class_init,