Blame 0029-pc_q35-Initialize-Xen.patch

298366
From 41900b0857df9bd33e465a6c72d7a3072dc448f4 Mon Sep 17 00:00:00 2001
298366
From: Anthony PERARD <anthony.perard@citrix.com>
298366
Date: Mon, 9 Sep 2013 16:15:53 +0000
298366
Subject: [PATCH] pc_q35: Initialize Xen.
298366
298366
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
298366
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
298366
Acked-by: Michael S. Tsirkin <mst@redhat.com>
298366
(cherry picked from commit 254c12825f93f405658ca3366cd34f8a8ad23511)
298366
298366
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
298366
---
298366
 hw/i386/pc_q35.c | 5 +++++
298366
 1 file changed, 5 insertions(+)
298366
298366
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
298366
index 10e770e..dd13130 100644
298366
--- a/hw/i386/pc_q35.c
298366
+++ b/hw/i386/pc_q35.c
298366
@@ -81,6 +81,11 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
298366
     DeviceState *icc_bridge;
298366
     PcGuestInfo *guest_info;
298366
 
298366
+    if (xen_enabled() && xen_hvm_init(&ram_memory) != 0) {
298366
+        fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
298366
+        exit(1);
298366
+    }
298366
+
298366
     icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
298366
     object_property_add_child(qdev_get_machine(), "icc-bridge",
298366
                               OBJECT(icc_bridge), NULL);