diff options
author | Wei Liu <wei.liu2@citrix.com> | 2012-04-12 10:02:47 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-04-13 17:34:21 +0000 |
commit | 9468e9c41a89b1c9f3a905b8959e1dd3f055c732 (patch) | |
tree | 286143660626abe4dc85165933db7ab0f766523f /hw/pc.c | |
parent | f1dbf015dfb0aa7f66f710a1f1bc58b662951de2 (diff) |
Xen: Add xen-apic support and hook it up.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -42,6 +42,7 @@ #include "sysbus.h" #include "sysemu.h" #include "kvm.h" +#include "xen.h" #include "blockdev.h" #include "ui/qemu-spice.h" #include "memory.h" @@ -891,9 +892,12 @@ static DeviceState *apic_init(void *env, uint8_t apic_id) if (kvm_irqchip_in_kernel()) { dev = qdev_create(NULL, "kvm-apic"); + } else if (xen_enabled()) { + dev = qdev_create(NULL, "xen-apic"); } else { dev = qdev_create(NULL, "apic"); } + qdev_prop_set_uint8(dev, "id", apic_id); qdev_prop_set_ptr(dev, "cpu_env", env); qdev_init_nofail(dev); @@ -912,6 +916,10 @@ static DeviceState *apic_init(void *env, uint8_t apic_id) msi_supported = true; } + if (xen_enabled()) { + msi_supported = true; + } + return dev; } |