diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-22 15:19:44 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-22 15:19:44 +0000 |
commit | 9306acb50991b7c78510ff4ffe19a190f2fc89c0 (patch) | |
tree | 5ee07ae7eb17f4c965c80dccc9607de939518e0f /hw/xen_machine_pv.c | |
parent | 2c8b24a3914361de941e959e38e3c163a5adeea7 (diff) |
xen: pv domain builder. (Gerd Hoffmann)
This adds domain building support for paravirtual domains to qemu.
This allows booting xen guests directly with qemu, without Xend
and the management stack.
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@7226 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/xen_machine_pv.c')
-rw-r--r-- | hw/xen_machine_pv.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/xen_machine_pv.c b/hw/xen_machine_pv.c index 154cf71584..56b01aa99f 100644 --- a/hw/xen_machine_pv.c +++ b/hw/xen_machine_pv.c @@ -27,6 +27,7 @@ #include "sysemu.h" #include "boards.h" #include "xen_backend.h" +#include "xen_domainbuild.h" uint32_t xen_domid; enum xen_mode xen_mode = XEN_EMULATE; @@ -57,6 +58,24 @@ static void xen_init_pv(ram_addr_t ram_size, int vga_ram_size, fprintf(stderr, "%s: xen backend core setup failed\n", __FUNCTION__); exit(1); } + + switch (xen_mode) { + case XEN_ATTACH: + /* nothing to do, xend handles everything */ + break; + case XEN_CREATE: + if (xen_domain_build_pv(kernel_filename, initrd_filename, + kernel_cmdline) < 0) { + fprintf(stderr, "xen pv domain creation failed\n"); + exit(1); + } + break; + case XEN_EMULATE: + fprintf(stderr, "xen emulation not implemented (yet)\n"); + exit(1); + break; + } + xen_be_register("console", &xen_console_ops); xen_be_register("vkbd", &xen_kbdmouse_ops); xen_be_register("vfb", &xen_framebuffer_ops); |