From: Anthony PERARD <anthony.perard@citrix.com>
To: Xen Devel <xen-devel@lists.xensource.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH] libxl: Fix parameter pass to qemu-xen.
Date: Thu, 15 Mar 2012 12:10:24 +0000 [thread overview]
Message-ID: <1331813424-8171-1-git-send-email-anthony.perard@citrix.com> (raw)
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@citrix.com>
---
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)
next reply other threads:[~2012-03-15 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 12:10 Anthony PERARD [this message]
2012-03-19 13:25 ` [PATCH] libxl: Fix parameter pass to qemu-xen Fantu
2012-03-22 15:25 ` Fantu
2012-04-03 17:15 ` 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=1331813424-8171-1-git-send-email-anthony.perard@citrix.com \
--to=anthony.perard@citrix.com \
--cc=stefano.stabellini@eu.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).