diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-10 15:42:55 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-10 15:42:55 +0900 |
commit | 0d6a2f7e595218b5632ba7005128470e65138951 (patch) | |
tree | 596b09930ef1538e6606450e2d8b88ec2e296a9b /xen-common.c | |
parent | 16b1353a36171ae06d63fd309f4772dbfb1da113 (diff) | |
download | qemu-0d6a2f7e595218b5632ba7005128470e65138951.tar.gz qemu-0d6a2f7e595218b5632ba7005128470e65138951.tar.bz2 qemu-0d6a2f7e595218b5632ba7005128470e65138951.zip |
Imported Upstream version 2.2.0upstream/2.2.1upstream/2.2.0
Diffstat (limited to 'xen-common.c')
-rw-r--r-- | xen-common.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/xen-common.c b/xen-common.c index f07b35e47..56359ca72 100644 --- a/xen-common.c +++ b/xen-common.c @@ -11,6 +11,7 @@ #include "hw/xen/xen_backend.h" #include "qmp-commands.h" #include "sysemu/char.h" +#include "sysemu/accel.h" //#define DEBUG_XEN @@ -109,7 +110,7 @@ static void xen_change_state_handler(void *opaque, int running, } } -int xen_init(MachineClass *mc) +static int xen_init(MachineState *ms) { xen_xc = xen_xc_interface_open(0, 0, 0); if (xen_xc == XC_HANDLER_INITIAL_VALUE) { @@ -121,3 +122,25 @@ int xen_init(MachineClass *mc) return 0; } +static void xen_accel_class_init(ObjectClass *oc, void *data) +{ + AccelClass *ac = ACCEL_CLASS(oc); + ac->name = "Xen"; + ac->init_machine = xen_init; + ac->allowed = &xen_allowed; +} + +#define TYPE_XEN_ACCEL ACCEL_CLASS_NAME("xen") + +static const TypeInfo xen_accel_type = { + .name = TYPE_XEN_ACCEL, + .parent = TYPE_ACCEL, + .class_init = xen_accel_class_init, +}; + +static void xen_type_init(void) +{ + type_register_static(&xen_accel_type); +} + +type_init(xen_type_init); |