aboutsummaryrefslogtreecommitdiff
path: root/hw/xen_machine_pv.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-22 15:19:15 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-22 15:19:15 +0000
commitd94f94862015f5f2416a99f2a56583951eee1453 (patch)
tree34cacfd88a305067abeb16c64b3620e95305d8e8 /hw/xen_machine_pv.c
parente37630ca4f5142a6830654d9801b473600417d5c (diff)
downloadqemu-d94f94862015f5f2416a99f2a56583951eee1453.zip
qemu-d94f94862015f5f2416a99f2a56583951eee1453.tar.gz
qemu-d94f94862015f5f2416a99f2a56583951eee1453.tar.bz2
xen: backend driver core (Gerd Hoffmann)
This patch adds infrastructure for xen backend drivers living in qemu, so drivers don't need to implement common stuff on their own. It's mostly xenbus management stuff: some functions to access xentore, setting up xenstore watches, callbacks on device discovery and state changes, handle event channel, ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7220 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/xen_machine_pv.c')
-rw-r--r--hw/xen_machine_pv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c
index f32ba7f..a6070fd 100644
--- a/hw/xen_machine_pv.c
+++ b/hw/xen_machine_pv.c
@@ -26,7 +26,7 @@
#include "pc.h"
#include "sysemu.h"
#include "boards.h"
-#include "xen.h"
+#include "xen_backend.h"
uint32_t xen_domid;
enum xen_mode xen_mode = XEN_EMULATE;
@@ -50,6 +50,12 @@ static void xen_init_pv(ram_addr_t ram_size, int vga_ram_size,
}
env = cpu_init(cpu_model);
env->halted = 1;
+
+ /* Initialize backend core & drivers */
+ if (xen_be_init() != 0) {
+ fprintf(stderr, "%s: xen backend core setup failed\n", __FUNCTION__);
+ exit(1);
+ }
}
QEMUMachine xenpv_machine = {