qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <paul.durrant@citrix.com>
To: qemu-devel@nongnu.org, xen-devel@lists.xen.org
Cc: Paul Durrant <paul.durrant@citrix.com>
Subject: [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains.
Date: Tue, 18 Jun 2013 10:59:45 +0100	[thread overview]
Message-ID: <1371549586-4672-2-git-send-email-paul.durrant@citrix.com> (raw)
In-Reply-To: <1371549586-4672-1-git-send-email-paul.durrant@citrix.com>

Xen HVM domains normally spawn QEMU with a dedicated xenfv machine type. The
initialization code for this machine type can easily be pulled into the
generic pc initialization code and guarded with a test for whether the xen
accelerator options is specified, which is more consistent with the way
other accelerators are used.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
 hw/i386/pc_piix.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index d618570..7bbb59a 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1,3 +1,4 @@
+
 /*
  * QEMU PC System Emulator
  *
@@ -91,6 +92,10 @@ static void pc_init1(MemoryRegion *system_memory,
     DeviceState *icc_bridge;
     FWCfgState *fw_cfg = NULL;
 
+    if (xen_enabled() && xen_hvm_init() != 0) {
+        hw_error("xen hardware virtual machine initialisation failed");
+    }
+
     icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
     object_property_add_child(qdev_get_machine(), "icc-bridge",
                               OBJECT(icc_bridge), NULL);
@@ -320,9 +325,6 @@ static void pc_init_isa(QEMUMachineInitArgs *args)
 #ifdef CONFIG_XEN
 static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
 {
-    if (xen_hvm_init() != 0) {
-        hw_error("xen hardware virtual machine initialisation failed");
-    }
     pc_init_pci(args);
 }
 #endif
-- 
1.7.10.4

  reply	other threads:[~2013-06-18 10:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18  9:59 [Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v3) Paul Durrant
2013-06-18  9:59 ` Paul Durrant [this message]
2013-06-18 10:28   ` [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains Andreas Färber
2013-06-18 10:34     ` Paul Durrant
2013-06-18  9:59 ` [Qemu-devel] [PATCH 2/2] Move hardcoded initialization of xen-platform device Paul Durrant
2013-06-18 10:31   ` Andreas Färber
  -- strict thread matches above, loose matches on Subject: below --
2013-06-18 11:16 [Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v4) Paul Durrant
2013-06-18 11:17 ` [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains Paul Durrant
2013-06-17 12:36 [Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v2) Paul Durrant
2013-06-17 12:36 ` [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains Paul Durrant
2013-06-18  9:43   ` Igor Mammedov
2013-06-18  9:46     ` Paul Durrant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371549586-4672-2-git-send-email-paul.durrant@citrix.com \
    --to=paul.durrant@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).