[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: Pass actual RAM amount to qemu-xen
# HG changeset patch # User Anthony PERARD <anthony.perard@xxxxxxxxxx> # Date 1333473311 -3600 # Node ID b0356d31076a45422a121915c69651093f491c78 # Parent 249b2eeeeae5576dd32748ea8ffa13e94d06eb20 libxl: Pass actual RAM amount 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> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- diff -r 249b2eeeeae5 -r b0356d31076a tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Tue Apr 03 18:02:46 2012 +0100 +++ b/tools/libxl/libxl_dm.c Tue Apr 03 18:15:11 2012 +0100 @@ -323,6 +323,7 @@ static char ** libxl__build_device_model 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 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++) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |