WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 4/5] libxl: Makes libxl be able to call Qemu upstream

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 4/5] libxl: Makes libxl be able to call Qemu upstream for XenPV guest.
From: anthony.perard@xxxxxxxxxx
Date: Thu, 9 Dec 2010 19:42:56 +0000
Cc: anthony.perard@xxxxxxxxxx
Delivery-date: Thu, 09 Dec 2010 11:49:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1291923777-8712-1-git-send-email-anthony.perard@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1291923777-8712-1-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
From: Anthony PERARD <anthony.perard@xxxxxxxxxx>

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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>