[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxl: Fix parameter pass to qemu-xen.



QEMU upstream need to kown the amount of RAM given to a guest. This patch give
the correct value.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

---
 tools/libxl/libxl_dm.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 1261499..6b074f4 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -323,6 +323,7 @@ static char ** libxl__build_device_model_args_new(libxl__gc 
*gc,
     const char *keymap = dm_keymap(guest_config);
     flexarray_t *dm_args;
     int i;
+    uint64_t ram_size;
 
     dm_args = flexarray_make(16, 1);
     if (!dm_args)
@@ -504,11 +505,9 @@ static char ** 
libxl__build_device_model_args_new(libxl__gc *gc,
         break;
     }
 
-    /* RAM Size */
+    ram_size = libxl__sizekb_to_mb(b_info->max_memkb - b_info->video_memkb);
     flexarray_append(dm_args, "-m");
-    flexarray_append(dm_args,
-                     libxl__sprintf(gc, "%d",
-                                    
libxl__sizekb_to_mb(b_info->target_memkb)));
+    flexarray_append(dm_args, libxl__sprintf(gc, "%"PRId64, ram_size));
 
     if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) {
         for (i = 0; i < num_disks; i++) {
-- 
tg: (8f11712..) fix/qemu-ram-size-arg (depends on: git-changeset)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.