xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libxl: Fix parameter pass to qemu-xen.
@ 2012-03-15 12:10 Anthony PERARD
  2012-03-19 13:25 ` Fantu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Anthony PERARD @ 2012-03-15 12:10 UTC (permalink / raw)
  To: Xen Devel; +Cc: Anthony PERARD, Stefano Stabellini

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)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxl: Fix parameter pass to qemu-xen.
  2012-03-15 12:10 [PATCH] libxl: Fix parameter pass to qemu-xen Anthony PERARD
@ 2012-03-19 13:25 ` Fantu
  2012-03-22 15:25 ` Fantu
  2012-04-03 17:15 ` Ian Jackson
  2 siblings, 0 replies; 4+ messages in thread
From: Fantu @ 2012-03-19 13:25 UTC (permalink / raw)
  To: xen-devel


Anthony PERARD-2 wrote
> 
> QEMU upstream need to kown the amount of RAM given to a guest. This patch
> give
> the correct value.
> 
> Signed-off-by: Anthony PERARD &lt;anthony.perard@&gt;
> 
> ---
>  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@.xen
> http://lists.xen.org/xen-devel
> 
Should I apply some other dependency patches to qemu 1.0 branch? (now
default for xen-unstable) in order to fix ram/videoram problem?

--
View this message in context: http://xen.1045712.n5.nabble.com/PATCH-libxl-Fix-parameter-pass-to-qemu-xen-tp5567797p5577078.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxl: Fix parameter pass to qemu-xen.
  2012-03-15 12:10 [PATCH] libxl: Fix parameter pass to qemu-xen Anthony PERARD
  2012-03-19 13:25 ` Fantu
@ 2012-03-22 15:25 ` Fantu
  2012-04-03 17:15 ` Ian Jackson
  2 siblings, 0 replies; 4+ messages in thread
From: Fantu @ 2012-03-22 15:25 UTC (permalink / raw)
  To: xen-devel


Anthony PERARD-2 wrote
> 
> QEMU upstream need to kown the amount of RAM given to a guest. This patch
> give
> the correct value.
> 
> Signed-off-by: Anthony PERARD &lt;anthony.perard@&gt;
> 
> ---
>  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@.xen
> http://lists.xen.org/xen-devel
> 
I  applied the patch to test if it solves the ram/videoram problem for qxl,
with qemu from xen repository (1.0.1) qemu hangs on start, with qemu
unstable it start but with an allocation problem, on xorg log:
Out of video memory: Could not allocate 4198400 bytes

I tried to update also seabios to unstable but same problem.

Is the patch incomplete or is there videoram fixed limit to 4 MB?

Thanks for any reply.

--
View this message in context: http://xen.1045712.n5.nabble.com/PATCH-libxl-Fix-parameter-pass-to-qemu-xen-tp5567797p5586848.html
Sent from the Xen - Dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libxl: Fix parameter pass to qemu-xen.
  2012-03-15 12:10 [PATCH] libxl: Fix parameter pass to qemu-xen Anthony PERARD
  2012-03-19 13:25 ` Fantu
  2012-03-22 15:25 ` Fantu
@ 2012-04-03 17:15 ` Ian Jackson
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2012-04-03 17:15 UTC (permalink / raw)
  To: Anthony PERARD; +Cc: Xen Devel, Stefano Stabellini

Anthony PERARD writes ("[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.

Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-03 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 12:10 [PATCH] libxl: Fix parameter pass to qemu-xen Anthony PERARD
2012-03-19 13:25 ` Fantu
2012-03-22 15:25 ` Fantu
2012-04-03 17:15 ` Ian Jackson

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).