From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
This patch adds target_ram in device_model_info structure, to be used in
libxl_build_device_model_args_new. Qemu upstream needs to know about it.
---
tools/libxl/libxl.c | 4 ++++
tools/libxl/libxl.idl | 1 +
tools/libxl/xl_cmdimpl.c | 1 +
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 18ea8b1..f4fb2c6 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1374,6 +1374,10 @@ static char **
libxl_build_device_model_args_new(libxl__gc *gc,
else
flexarray_set(dm_args, num++, "xenfv");
+ /* RAM Size */
+ 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 ) {
diff --git a/tools/libxl/libxl.idl b/tools/libxl/libxl.idl
index 8dd7749..89694b1 100644
--- a/tools/libxl/libxl.idl
+++ b/tools/libxl/libxl.idl
@@ -139,6 +139,7 @@ libxl_device_model_info = Struct("device_model_info",[
("device_model", string),
("saved_state", string),
("type", libxl_qemu_machine_type),
+ ("target_ram", uint32),
("videoram", integer, False, "size of the videoram in
MB"),
("stdvga", bool, False, "stdvga enabled or
disabled"),
("vnc", bool, False, "vnc enabled or disabled"),
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 5555319..897c5bc 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -359,6 +359,7 @@ static void init_dm_info(libxl_device_model_info *dm_info,
dm_info->dom_name = strdup(c_info->name);
dm_info->device_model = strdup("qemu-dm");
+ dm_info->target_ram = b_info->target_memkb / 1024;
dm_info->videoram = b_info->video_memkb / 1024;
dm_info->apic = b_info->u.hvm.apic;
dm_info->vcpus = b_info->max_vcpus;
--
1.7.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|