From: Anthony PERARD <anthony.perard@citrix.com>
To: Xen Devel <xen-devel@lists.xen.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH v2] libxl: Handle xen_platform_pci=0 case with qemu-xen.
Date: Wed, 27 Nov 2013 18:21:34 +0000 [thread overview]
Message-ID: <1385576494-18878-2-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1385576494-18878-1-git-send-email-anthony.perard@citrix.com>
This should result in QEMU *not* adding the xen-platform device.
Since QEMU 1.6, this can be achieved by using a different qemu machine.
The one used by libxl is "xenfv", but using QEMU >=1.6 with "-machine
pc,accel=xen" works as well with only one difference compared to
"xenfv", there is no xen-platform device.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
tools/libxl/libxl_dm.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index be39a62..ea773b3 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -608,7 +608,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
}
for (i = 0; b_info->extra && b_info->extra[i] != NULL; i++)
flexarray_append(dm_args, b_info->extra[i]);
- flexarray_append(dm_args, "-M");
+
+ flexarray_append(dm_args, "-machine");
switch (b_info->type) {
case LIBXL_DOMAIN_TYPE_PV:
flexarray_append(dm_args, "xenpv");
@@ -616,7 +617,14 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
flexarray_append(dm_args, b_info->extra_pv[i]);
break;
case LIBXL_DOMAIN_TYPE_HVM:
- flexarray_append(dm_args, "xenfv");
+ if (!libxl_defbool_val(b_info->u.hvm.xen_platform_pci)) {
+ /* Switching here to the machine "pc" which does not add
+ * the xen-platform device instead of the default "xenfv" machine.
+ */
+ flexarray_append(dm_args, "pc,accel=xen");
+ } else {
+ flexarray_append(dm_args, "xenfv");
+ }
for (i = 0; b_info->extra_hvm && b_info->extra_hvm[i] != NULL; i++)
flexarray_append(dm_args, b_info->extra_hvm[i]);
break;
--
Anthony PERARD
next prev parent reply other threads:[~2013-11-27 18:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 18:21 [PATCH v2] Handle xen_platform_pci=0 case Anthony PERARD
2013-11-27 18:21 ` Anthony PERARD [this message]
2013-11-28 9:44 ` [PATCH v2] libxl: Handle xen_platform_pci=0 case with qemu-xen Ian Campbell
2013-11-28 11:19 ` Anthony PERARD
2013-11-29 10:34 ` Ian Campbell
2013-11-29 10:51 ` Fabio Fantoni
2013-11-27 23:04 ` [PATCH v2] Handle xen_platform_pci=0 case Sander Eikelenboom
2013-11-28 9:34 ` Paul Durrant
2013-11-28 9:40 ` Sander Eikelenboom
2013-11-28 9:45 ` Ian Campbell
2013-11-28 9:52 ` Sander Eikelenboom
2013-11-28 9:59 ` Paul Durrant
2013-11-28 9:47 ` Ian Campbell
2013-11-28 10:00 ` Sander Eikelenboom
2013-11-28 10:04 ` Sander Eikelenboom
2013-11-28 10:11 ` Fabio Fantoni
2013-11-28 11:21 ` Sander Eikelenboom
2013-11-28 10:03 ` Fabio Fantoni
2013-11-28 16:07 ` Fabio Fantoni
2013-11-28 16:45 ` Sander Eikelenboom
2013-11-28 17:03 ` Anthony PERARD
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=1385576494-18878-2-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--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).