From: anthony.perard@citrix.com
To: Xen Devel <xen-devel@lists.xensource.com>
Cc: anthony.perard@citrix.com
Subject: [PATCH 4/5] libxl: Makes libxl be able to call Qemu upstream for XenPV guest.
Date: Thu, 9 Dec 2010 19:42:56 +0000 [thread overview]
Message-ID: <1291923777-8712-5-git-send-email-anthony.perard@citrix.com> (raw)
In-Reply-To: <1291923777-8712-1-git-send-email-anthony.perard@citrix.com>
From: Anthony PERARD <anthony.perard@citrix.com>
In libxl_build_device_model_args_new:
- Adds -xen-attach options to the list of arguments to Qemu.
- Adds -vga xenfb options when vnc and sdl are not set.
- Remove disk list from the command line for XenPV as they will be
read from xenstore by Qemu.
---
tools/libxl/libxl.c | 30 +++++++++++++++++++++---------
1 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 0ddeac0..c8fe82c 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1261,6 +1261,10 @@ static char ** libxl_build_device_model_args_new(libxl__gc *gc,
flexarray_set(dm_args, num++, "-xen-domid");
flexarray_set(dm_args, num++, libxl__sprintf(gc, "%d", info->domid));
+ if (info->type == XENPV) {
+ flexarray_set(dm_args, num++, "-xen-attach");
+ }
+
if (info->dom_name) {
flexarray_set(dm_args, num++, "-name");
flexarray_set(dm_args, num++, info->dom_name);
@@ -1292,6 +1296,12 @@ static char ** libxl_build_device_model_args_new(libxl__gc *gc,
if (info->sdl) {
flexarray_set(dm_args, num++, "-sdl");
}
+
+ if (info->type == XENPV && !info->nographic) {
+ flexarray_set(dm_args, num++, "-vga");
+ flexarray_set(dm_args, num++, "xenfb");
+ }
+
if (info->keymap) {
flexarray_set(dm_args, num++, "-k");
flexarray_set(dm_args, num++, info->keymap);
@@ -1378,16 +1388,18 @@ static char ** libxl_build_device_model_args_new(libxl__gc *gc,
flexarray_set(dm_args, num++, "-m");
flexarray_set(dm_args, num++, libxl__sprintf(gc, "%d", info->target_ram));
- disks = libxl_device_disk_list(libxl__gc_owner(gc), info->domid, &nb);
- for (i; i < nb; i++) {
- if ( disks[i].is_cdrom ) {
- flexarray_set(dm_args, num++, "-cdrom");
- flexarray_set(dm_args, num++, libxl__strdup(gc, disks[i].physpath));
- } else {
- flexarray_set(dm_args, num++, libxl__sprintf(gc, "-%s", disks[i].virtpath));
- flexarray_set(dm_args, num++, libxl__strdup(gc, disks[i].physpath));
+ if (info->type == XENFV) {
+ disks = libxl_device_disk_list(libxl__gc_owner(gc), info->domid, &nb);
+ for (i; i < nb; i++) {
+ if (disks[i].is_cdrom) {
+ flexarray_set(dm_args, num++, "-cdrom");
+ flexarray_set(dm_args, num++, libxl__strdup(gc, disks[i].physpath));
+ } else {
+ flexarray_set(dm_args, num++, libxl__sprintf(gc, "-%s", disks[i].virtpath));
+ flexarray_set(dm_args, num++, libxl__strdup(gc, disks[i].physpath));
+ }
+ libxl_device_disk_destroy(&disks[i]);
}
- libxl_device_disk_destroy(&disks[i]);
}
free(disks);
flexarray_set(dm_args, num++, NULL);
--
1.7.1
next prev parent reply other threads:[~2010-12-09 19:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 19:42 [PATCH 0/5] libxl: Some fixes related to Qemu upstream command lines anthony.perard
2010-12-09 19:42 ` [PATCH 1/5] libxl: fix double free of ifname, when makes args for qemu anthony.perard
2010-12-09 19:42 ` [PATCH 2/5] libxl: strdup disk path before put it in qemu args array anthony.perard
2010-12-10 9:09 ` Ian Campbell
2010-12-10 12:29 ` Anthony PERARD
2010-12-10 12:31 ` anthony.perard
2010-12-10 14:49 ` Ian Campbell
2010-12-10 15:38 ` Anthony PERARD
2010-12-10 16:59 ` [PATCH v1.3 " anthony.perard
2010-12-09 19:42 ` [PATCH 3/5] libxl: Specify the target ram size to Qemu (new) when calling it anthony.perard
2010-12-09 19:42 ` anthony.perard [this message]
2010-12-10 17:42 ` [PATCH 4/5] libxl: Makes libxl be able to call Qemu upstream for XenPV guest Ian Jackson
2010-12-10 18:12 ` Anthony PERARD
2010-12-10 18:14 ` Anthony PERARD
2010-12-13 18:19 ` Ian Jackson
2010-12-13 18:43 ` Anthony PERARD
2010-12-14 17:08 ` Ian Jackson
2010-12-09 19:42 ` [PATCH 5/5] libxl: Lists qdisk device in libxl_device_disk_list anthony.perard
2010-12-14 19:26 ` Ian Jackson
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=1291923777-8712-5-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=xen-devel@lists.xensource.com \
/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).