@@ -2,6 +2,7 @@
#define QEMU_HW_XEN_BACKEND_H 1
#include "xen_common.h"
+#include "xen_redirect.h"
#include "sysemu.h"
#include "net.h"
#include "qdev.h"
@@ -29,6 +29,7 @@
#include "xen_backend.h"
#include "xen_domainbuild.h"
#include "blockdev.h"
+#include "xenner.h"
static void create_dummy_env(const char *cpu_model)
{
@@ -57,12 +58,14 @@ static void xen_init_pv(ram_addr_t ram_size,
int i;
/* Initialize backend core & drivers */
+ xen_interfaces_init();
if (xen_be_init() != 0) {
fprintf(stderr, "%s: xen backend core setup failed\n", __FUNCTION__);
exit(1);
}
switch (xen_mode) {
+#ifdef CONFIG_XEN
case XEN_ATTACH:
create_dummy_env(cpu_model);
/* nothing to do, xend handles everything */
@@ -75,9 +78,18 @@ static void xen_init_pv(ram_addr_t ram_size,
exit(1);
}
break;
+#endif
+#ifdef CONFIG_XENNER
case XEN_EMULATE:
- fprintf(stderr, "xen emulation not implemented (yet)\n");
- exit(1);
+ if (xenner_init_pv(kernel_filename, kernel_cmdline,
+ initrd_filename) < 0) {
+ fprintf(stderr, "xenner pv domain creation failed\n");
+ exit(1);
+ }
+ break;
+#endif
+ default:
+ /* not reached, xen_interfaces_init() catches this already */
break;
}
For native Xen support, we already have a xen machine description. This one doesn't really know too much about xenner yet though, so we need to teach it. This patch adds support for xenner in the xen pv machine description. Signed-off-by: Alexander Graf <agraf@suse.de> --- hw/xen_backend.h | 1 + hw/xen_machine_pv.c | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-)