From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Fantoni Subject: Re: [PATCH] libxl: fix cirrus vga video memory setting with upstream qemu Date: Fri, 2 May 2014 22:04:32 +0200 Message-ID: References: <1397909807-21535-1-git-send-email-fabio.fantoni@m2r.biz> <1399030886.32736.63.camel@kazak.uk.xensource.com> <5363F58A.8090506@terremark.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7099455698236792741==" Return-path: In-Reply-To: <5363F58A.8090506@terremark.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Don Slutz Cc: Anthony PERARD , xen-devel , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --===============7099455698236792741== Content-Type: multipart/alternative; boundary=089e0158ada0444dc304f8704a7b --089e0158ada0444dc304f8704a7b Content-Type: text/plain; charset=UTF-8 2014-05-02 21:44 GMT+02:00 Don Slutz : > On 05/02/14 07:41, Ian Campbell wrote: > >> On Sat, 2014-04-19 at 14:16 +0200, Fabio Fantoni wrote: >> >>> Reading one qemu-devel post seems that setting video memory of >>> cirrus vga with upstream qemu is wrong even if not show errors. >>> >> > Fabio, > You can add my: > > Reviewed-by: Don Slutz > > I have a similar code change locally (part of my pending > list of to dos) (I just changed the global arg...). > > > You later provided links but I think the conversation should be >> referenced here. >> > > I was part of the conversation. When I was looking into upstreaming > a change I have (pci_min_hole) to xen & qemu, I was asked by QEMU > to report if it was not used (i.e. non x86 cpu's). While I was testing my > change to QEMU under xen I noticed: > > Warning: "-global vga.vram_size_mb=16" not used > > > In /var/log/xen/qemu-dm-.log > > Here is the cross post to xen-devel: > > > [Xen-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused > -global > > > http://lists.xen.org/archives/html/xen-devel/2014-03/msg03128.html > > > > > Is this change correct for all versions of mainline qemu which people >> might be using with Xen? >> > > What I know is that "-global cirrus-vga.vgamem_mb=32" does work > with upstream QEMU 1.5.0, 1.6.0, 1.7.0 and 2.0.0. I had added a debug > output into the QEMU version above that show the amount of video ram > that gets allocated and so the testing was quick and easy. My > understanding of QEMU is that when specified this way: > > "-device cirrus-vga,vgamem_mb=32" > > the error checking in QEMU will report when it does not like it: > > qemu-system-x86_64: Property '.vram_size_mb' not found > > > (unlike -global). So while I have not tested it, I would guess that > any QEMU that accepts "-device cirrus-vga" will also either > accept the change or report and error and not start. (Note: the > change from "-vga cirrus" to "-device cirrus-vga" was done since > 4.3.0 and has yet to generate a bug). Thanks for your reply, probably with my bad english I not understand good this part of your reply. I changed to -device following this official qemu doc: http://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/qdev-device-use.txt;hb=master I did several tests of additional vga's parameters without using the -global in recent days with cirrus, stdvga and qxl, I've never seen errors and the amount of videoram by domUs seem ok. > > > Please can you also explain what "wrong" means? Does it crash? Does it >> silently ignore the setting? Does it do something else "wrong"? How bad >> is it? >> > > For me it just silently ignores the setting. Which means that the > cirrus vga has the default memory and so will not support any > display setting that needs more memory (the most likely reason > videoram=32 is specified in the config file). > > I feel it is bad enough that a backport to 4.4 makes sense to > me. > > Hope this helps. > -Don Slutz > > Signed-off-by: Fabio Fantoni >>> >>> --- >>> >>> Note: >>> - when this patch will be accepted upstream should be >>> backported also on xen 4.4 >>> >> I think this very much depends on what you mean by "wrong" above. >> >> - with this qemu parameters seems correct but for further >>> confirmation I posted a question about it: >>> http://lists.xen.org/archives/html/xen-devel/2014-04/msg02606.html >>> >> Any reply to this question? >> >> Anthony, Stefano: Opinions on this change? >> >> --- >>> tools/libxl/libxl_dm.c | 5 ++--- >>> 1 file changed, 2 insertions(+), 3 deletions(-) >>> >>> diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c >>> index 8abed7b..90f19b7 100644 >>> --- a/tools/libxl/libxl_dm.c >>> +++ b/tools/libxl/libxl_dm.c >>> @@ -508,9 +508,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc >>> *gc, >>> flexarray_append_pair(dm_args, "-device", "VGA"); >>> break; >>> case LIBXL_VGA_INTERFACE_TYPE_CIRRUS: >>> - flexarray_append_pair(dm_args, "-device", "cirrus-vga"); >>> - flexarray_append_pair(dm_args, "-global", >>> - GCSPRINTF("vga.vram_size_mb=%d", >>> + flexarray_append_pair(dm_args, "-device", >>> + GCSPRINTF("cirrus-vga,vgamem_mb=%d", >>> libxl__sizekb_to_mb(b_info->video_memkb))); >>> break; >>> case LIBXL_VGA_INTERFACE_TYPE_NONE: >>> >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xen.org >> http://lists.xen.org/xen-devel >> > > --089e0158ada0444dc304f8704a7b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
2014-05-02 21:44 GMT+02:00 Don Slutz <= ;dslutz@verizon.com= >:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">
On 05/02/14 07:41, Ian Campbell wrote:
On Sat, 2014-04-19 at 14:16 +0200, Fabio Fantoni wrote:
Reading one qemu-devel post seems that setting video memory of
cirrus vga with upstream qemu is wrong even if not show errors.

Fabio,
=C2=A0 You can add my:

Reviewed-by: Don Slutz <dslutz@verizon.com>

I have a similar code change locally (part of my pending
list of to dos) (I just changed the global arg...).


You later provided links but I think the conversation should be
referenced here.

I was part of the conversation. =C2=A0When I was looking into upstreaming a change I have (pci_min_hole) to xen & qemu, I was asked by QEMU
to report if it was not used (i.e. non x86 cpu's). =C2=A0While I was te= sting my
change to QEMU under xen I noticed:

Warning: "-global vga.vram_size_mb=3D16" not used


In /var/log/xen/qemu-dm-<guest>.log

Here is the cross post to xen-devel:


=C2=A0[Xen-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unus= ed -global


http://lists.xen.org/archives/html/xen-devel/2= 014-03/msg03128.html




Is this change correct for all versions of mainline qemu which people
might be using with Xen?

What I know is that "-global cirrus-vga.vgamem_mb=3D32" does work=
with upstream QEMU 1.5.0, 1.6.0, 1.7.0 and 2.0.0. =C2=A0I had added a debug=
output into the QEMU version above that show the amount of video ram
that gets allocated and so the testing was quick and easy. =C2=A0My
understanding of QEMU is that when specified this way:

=C2=A0"-device cirrus-vga,vgamem_mb=3D32"

the error checking in QEMU will report when it does not like it:

qemu-system-x86_64: Property '.vram_size_mb' not found


(unlike -global). =C2=A0So while I have not tested it, I would guess that any QEMU that accepts "-device cirrus-vga" will also either
accept the change or report and error and not start. (Note: the
change from "-vga cirrus" to "-device cirrus-vga" was d= one since
4.3.0 and has yet to generate a bug).

Thank= s for your reply, probably with my bad english I not understand good this p= art of your reply.
I changed to -device following this offici= al qemu doc:
http://git.qemu.org/?p=3Dqemu.git;a=3Dblob_plain= ;f=3Ddocs/qdev-device-use.txt;hb=3Dmaster
I did several= tests of additional vga= 9;s parameters without using the -global = in recent days with cirrus<= /span>, stdvga and qxl, I've ne= ver seen errors and the amo= unt of videoram by <= span class=3D"">domUs seem = ok.
=C2=A0


Please can you also explain what "wrong" means? Does it crash? Do= es it
silently ignore the setting? Does it do something else "wrong"? H= ow bad
is it?

For me it just silently ignores the setting. =C2=A0Which means that the
cirrus vga has the default memory and so will not support any
display setting that needs more memory (the most likely reason
videoram=3D32 is specified in the config file).

I feel it is bad enough that a backport to 4.4 makes sense to
me.

Hope this helps.
=C2=A0 =C2=A0 -Don Slutz

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>

---

Note:
- when this patch will be accepted upstream should be
=C2=A0 =C2=A0backported also on xen 4.4
I think this very much depends on what you mean by "wrong" above.=

- with this qemu parameters seems correct but for further
=C2=A0 =C2=A0confirmation I posted a question about it:
http://lists.xen.org/archives/html/xen-devel/2= 014-04/msg02606.html
Any reply to this question?

Anthony, Stefano: Opinions on this change?

---
=C2=A0 tools/libxl/libxl_dm.c | =C2=A0 =C2=A05 ++---
=C2=A0 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 8abed7b..90f19b7 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -508,9 +508,8 @@ static char ** libxl__build_device_model_args_ne= w(libxl__gc *gc,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 flexarray_append_pair(dm_a= rgs, "-device", "VGA");
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 case LIBXL_VGA_INTERFACE_TYPE_CIR= RUS:
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0flexarray_append_pair(dm_args, &= quot;-device", "cirrus-vga");
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0flexarray_append_pair(dm_args, &= quot;-global",
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GCSPRINTF("vg= a.vram_size_mb=3D%d",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0flexarray_append_pair(dm_args, &= quot;-device",
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0GCSPRINTF("ci= rrus-vga,vgamem_mb=3D%d",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 libxl__sizek= b_to_mb(b_info->video_memkb)));
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 break;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 case LIBXL_VGA_INTERFACE_TYPE_NONE:


_______________________________________________
Xen-devel mailing list
Xen-devel@list= s.xen.org
http://lists.x= en.org/xen-devel


--089e0158ada0444dc304f8704a7b-- --===============7099455698236792741== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7099455698236792741==--