Hi, The videoram setting in xl config files is documented as follows: " videoram=MBYTES Sets the amount of RAM which the emulated video card will contain, which in turn limits the resolutions and bit depths which will be available. The default amount of video ram for stdvga is 8MB which is sufficient for e.g. 1600x1200 at 32bpp and videoram option is currently working only when using the qemu-xen-traditional device-model. When using the emulated Cirrus graphics card (vga="cirrus") the amount of video ram is fixed at 4MB which is sufficient for 1024x768 at 32 bpp and videoram option is currently working only when using the upstream qemu-xen device-model. " XenServer also uses a default of 4MB video ram for cirrus graphics. However, when I use xl to create a VM with cirrus graphics, I get 8MB of video RAM by default. Moreover, setting it to videoram=4 in the config file leads to complaints from libxl: libxl_create.c:228:libxl__domain_build_info_setdefault: videoram must be at least 8 mb Is there a bug in the logic in libxl_create.c? Cheers, Rob
On Tue, 2013-09-17 at 12:54 +0000, Rob Hoes wrote:> Hi, > > The videoram setting in xl config files is documented as follows: > > " > videoram=MBYTES > > Sets the amount of RAM which the emulated video card will contain, > which in turn limits the resolutions and bit depths which will be > available. The default amount of video ram for stdvga is 8MB which is > sufficient for e.g. 1600x1200 at 32bpp and videoram option is > currently working only when using the qemu-xen-traditional > device-model. > > When using the emulated Cirrus graphics card (vga="cirrus") the > amount of video ram is fixed at 4MB which is sufficient for 1024x768 > at 32 bpp and videoram option is currently working only when using the > upstream qemu-xen device-model. > " > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > However, when I use xl to create a VM with cirrus graphics, I get 8MB > of video RAM by default. Moreover, setting it to videoram=4 in the > config file leads to complaints from libxl: > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram must be at least 8 mb > > Is there a bug in the logic in libxl_create.c?Either the docs of the code or both would seem to be wrong. Since you say you happily use 4MB in XenServer I guess it is both? I noticed that the docs also say the amount is fixed, but that''s not what the code implements either.. I''m not really sure who, if anyone, might know definitively what is going on here. Stefano has some involvement in this video mem stuff once upon a time and Ian is the qemu-trad maintainer, so I''ve CCdthem both ;-)> > Cheers, > Rob > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
On Tue, Sep 17, 2013 at 12:54:57PM +0000, Rob Hoes wrote:> Hi, > > The videoram setting in xl config files is documented as follows: > > " > videoram=MBYTES > > Sets the amount of RAM which the emulated video card will contain, which in turn limits the resolutions and bit depths which will be available. The default amount of video ram for stdvga is 8MB which is sufficient for e.g. 1600x1200 at 32bpp and videoram option is currently working only when using the qemu-xen-traditional device-model. > > When using the emulated Cirrus graphics card (vga="cirrus") the amount of video ram is fixed at 4MB which is sufficient for 1024x768 at 32 bpp and videoram option is currently working only when using the upstream qemu-xen device-model. > " > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > However, when I use xl to create a VM with cirrus graphics, I get 8MB of video RAM by default. Moreover, setting it to videoram=4 in the config file leads to complaints from libxl: > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram must be at least 8 mb > > Is there a bug in the logic in libxl_create.c? >I think the document needs to be updated. commit 2e814a017155b885e4d4b5a88dc05e7367a9722a Author: Fabio Fantoni <fabio.fantoni@heliman.it> Date: Fri Feb 15 13:32:27 2013 +0000 tools/libxl: Improve videoram setting - If videoram setting is less than 8 mb shows error and exit. - Added videoram setting for qemu upstream with cirrus (added in qemu 1.3). - Updated xl.cfg man. - Default and minimal videoram changed to 16 mb if stdvga is set and upstream qemu is being used. This is required by qemu 1.4 to avoid a xen memory error (qemu 1.3 doesn''t complain about it, probably buggy). Signed-off-by: Fabio Fantoni <fabio.fantoni@heliman.it> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com> Wei.> Cheers, > Rob > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
> -----Original Message----- > From: Ian Campbell [mailto:ian.campbell@citrix.com] > Sent: 17 September 2013 2:18 PM > To: Rob Hoes > Cc: xen-devel@lists.xen.org; Stefano Stabellini; Ian Jackson > Subject: Re: [Xen-devel] libxl videoram for cirrus graphics > > On Tue, 2013-09-17 at 12:54 +0000, Rob Hoes wrote: > > Hi, > > > > The videoram setting in xl config files is documented as follows: > > > > " > > videoram=MBYTES > > > > Sets the amount of RAM which the emulated video card will contain, > > which in turn limits the resolutions and bit depths which will be > > available. The default amount of video ram for stdvga is 8MB which is > > sufficient for e.g. 1600x1200 at 32bpp and videoram option is > > currently working only when using the qemu-xen-traditional > > device-model. > > > > When using the emulated Cirrus graphics card (vga="cirrus") the > > amount of video ram is fixed at 4MB which is sufficient for 1024x768 > > at 32 bpp and videoram option is currently working only when using the > > upstream qemu-xen device-model. > > " > > > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > > > However, when I use xl to create a VM with cirrus graphics, I get 8MB > > of video RAM by default. Moreover, setting it to videoram=4 in the > > config file leads to complaints from libxl: > > > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram > > must be at least 8 mb > > > > Is there a bug in the logic in libxl_create.c? > > Either the docs of the code or both would seem to be wrong. Since you say > you happily use 4MB in XenServer I guess it is both? > > I noticed that the docs also say the amount is fixed, but that''s not what the > code implements either..Yes, as far as I can see, XenServer has always used 4MB by default, and allows one to override it as well (so the amount is not fixed). Not allowing 4MB anymore, as well as not allowing the override, may therefore lead to upgrade problems for XenServer users when we switch to using libxl, so I am hoping that we can make the checks in libxl a little less strict. I think that something like this would work: diff -r ba248e555458 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -213,8 +213,13 @@ if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) b_info->shadow_memkb = 0; - if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_STD && - b_info->device_model_version =+ if (!b_info->u.hvm.vga.kind) + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; + + if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_CIRRUS) { + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) + b_info->video_memkb = 4 * 1024; + } else if (b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) b_info->video_memkb = 16 * 1024; @@ -251,8 +256,6 @@ if (!b_info->u.hvm.boot) return ERROR_NOMEM; } - if (!b_info->u.hvm.vga.kind) - b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; libxl_defbool_setdefault(&b_info->u.hvm.vnc.enable, true); if (libxl_defbool_val(b_info->u.hvm.vnc.enable)) { libxl_defbool_setdefault(&b_info->u.hvm.vnc.findunused, true);> I''m not really sure who, if anyone, might know definitively what is going on > here. Stefano has some involvement in this video mem stuff once upon a > time and Ian is the qemu-trad maintainer, so I''ve CCdthem both ;-) > > > > > Cheers, > > Rob > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel >
On Tue, 2013-09-17 at 14:24 +0100, Wei Liu wrote:> On Tue, Sep 17, 2013 at 12:54:57PM +0000, Rob Hoes wrote: > > Hi, > > > > The videoram setting in xl config files is documented as follows: > > > > " > > videoram=MBYTES > > > > Sets the amount of RAM which the emulated video card will contain, which in turn limits the resolutions and bit depths which will be available. The default amount of video ram for stdvga is 8MB which is sufficient for e.g. 1600x1200 at 32bpp and videoram option is currently working only when using the qemu-xen-traditional device-model. > > > > When using the emulated Cirrus graphics card (vga="cirrus") the amount of video ram is fixed at 4MB which is sufficient for 1024x768 at 32 bpp and videoram option is currently working only when using the upstream qemu-xen device-model. > > " > > > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > > > However, when I use xl to create a VM with cirrus graphics, I get 8MB of video RAM by default. Moreover, setting it to videoram=4 in the config file leads to complaints from libxl: > > > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram must be at least 8 mb > > > > Is there a bug in the logic in libxl_create.c? > > > > I think the document needs to be updated. > > commit 2e814a017155b885e4d4b5a88dc05e7367a9722a > Author: Fabio Fantoni <fabio.fantoni@heliman.it> > Date: Fri Feb 15 13:32:27 2013 +0000 > > tools/libxl: Improve videoram setting > > - If videoram setting is less than 8 mb shows error and exit.I wonder why this is the case. Fabvio do you remmeberwhere this number 8M came from for Cirrus?
On Tue, 2013-09-17 at 12:54 +0000, Rob Hoes wrote:> Hi, > > The videoram setting in xl config files is documented as follows: > > " > videoram=MBYTES > > Sets the amount of RAM which the emulated video card will contain, which in turn limits the resolutions and bit depths which will be available. The default amount of video ram for stdvga is 8MB which is sufficient for e.g. 1600x1200 at 32bpp and videoram option is currently working only when using the qemu-xen-traditional device-model. > > When using the emulated Cirrus graphics card (vga="cirrus") the amount of video ram is fixed at 4MB which is sufficient for 1024x768 at 32 bpp and videoram option is currently working only when using the upstream qemu-xen device-model. > " > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > However, when I use xl to create a VM with cirrus graphics, I get 8MB of video RAM by default. Moreover, setting it to videoram=4 in the config file leads to complaints from libxl: > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram must be at least 8 mb > > Is there a bug in the logic in libxl_create.c? > > Cheers, > Rob >cirrus card support maximum of 4mb (which is also the default) so there is IMHO no point in reporting an error, just a warning would be enough Frediano
On Tue, 2013-09-17 at 14:29 +0100, Rob Hoes wrote:> > > -----Original Message----- > > From: Ian Campbell [mailto:ian.campbell@citrix.com] > > Sent: 17 September 2013 2:18 PM > > To: Rob Hoes > > Cc: xen-devel@lists.xen.org; Stefano Stabellini; Ian Jackson > > Subject: Re: [Xen-devel] libxl videoram for cirrus graphics > > > > On Tue, 2013-09-17 at 12:54 +0000, Rob Hoes wrote: > > > Hi, > > > > > > The videoram setting in xl config files is documented as follows: > > > > > > " > > > videoram=MBYTES > > > > > > Sets the amount of RAM which the emulated video card will contain, > > > which in turn limits the resolutions and bit depths which will be > > > available. The default amount of video ram for stdvga is 8MB which is > > > sufficient for e.g. 1600x1200 at 32bpp and videoram option is > > > currently working only when using the qemu-xen-traditional > > > device-model. > > > > > > When using the emulated Cirrus graphics card (vga="cirrus") the > > > amount of video ram is fixed at 4MB which is sufficient for 1024x768 > > > at 32 bpp and videoram option is currently working only when using the > > > upstream qemu-xen device-model. > > > " > > > > > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > > > > > However, when I use xl to create a VM with cirrus graphics, I get 8MB > > > of video RAM by default. Moreover, setting it to videoram=4 in the > > > config file leads to complaints from libxl: > > > > > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram > > > must be at least 8 mb > > > > > > Is there a bug in the logic in libxl_create.c? > > > > Either the docs of the code or both would seem to be wrong. Since you say > > you happily use 4MB in XenServer I guess it is both? > > > > I noticed that the docs also say the amount is fixed, but that''s not what the > > code implements either.. > > Yes, as far as I can see, XenServer has always used 4MB by default, and allows one to override it as well (so the amount is not fixed). Not allowing 4MB anymore, as well as not allowing the override, may therefore lead to upgrade problems for XenServer users when we switch to using libxl, so I am hoping that we can make the checks in libxl a little less strict. > > I think that something like this would work: > > diff -r ba248e555458 tools/libxl/libxl_create.c > --- a/tools/libxl/libxl_create.c > +++ b/tools/libxl/libxl_create.c > @@ -213,8 +213,13 @@ > if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) > b_info->shadow_memkb = 0; > > - if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_STD && > - b_info->device_model_version => + if (!b_info->u.hvm.vga.kind) > + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; > + > + if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_CIRRUS) { > + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > + b_info->video_memkb = 4 * 1024; > + } else if (b_info->device_model_version => LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { > if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > b_info->video_memkb = 16 * 1024;Do the following checks for b_info->video_memkb == LIBXL_MEMKB_DEFAULT and b_info->video_memkb < (8 * 1024) not need modifying then? Is the behaviour here any different to just changing the 8s into 4s? Can you also update the docs, it''s at least wrong about the 4MB being a fixed value.> @@ -251,8 +256,6 @@ > if (!b_info->u.hvm.boot) return ERROR_NOMEM; > } > > - if (!b_info->u.hvm.vga.kind) > - b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; > libxl_defbool_setdefault(&b_info->u.hvm.vnc.enable, true); > if (libxl_defbool_val(b_info->u.hvm.vnc.enable)) { > libxl_defbool_setdefault(&b_info->u.hvm.vnc.findunused, true); > > > I''m not really sure who, if anyone, might know definitively what is going on > > here. Stefano has some involvement in this video mem stuff once upon a > > time and Ian is the qemu-trad maintainer, so I''ve CCdthem both ;-) > > > > > > > > Cheers, > > > Rob > > > > > > _______________________________________________ > > > Xen-devel mailing list > > > Xen-devel@lists.xen.org > > > http://lists.xen.org/xen-devel > > >
> > I think that something like this would work: > > > > diff -r ba248e555458 tools/libxl/libxl_create.c > > --- a/tools/libxl/libxl_create.c > > +++ b/tools/libxl/libxl_create.c > > @@ -213,8 +213,13 @@ > > if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) > > b_info->shadow_memkb = 0; > > > > - if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_STD && > > - b_info->device_model_version => > + if (!b_info->u.hvm.vga.kind) > > + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; > > + > > + if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_CIRRUS) { > > + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > > + b_info->video_memkb = 4 * 1024; > > + } else if (b_info->device_model_version => > LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { > > if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > > b_info->video_memkb = 16 * 1024; > > Do the following checks for b_info->video_memkb => LIBXL_MEMKB_DEFAULT and b_info->video_memkb < (8 * 1024) not need > modifying then? > > Is the behaviour here any different to just changing the 8s into 4s?I was assuming that we need to keep the default of 8MB, as well as the restriction to have at least 8MB, for standard vga (when kind != CIRRUS)> Can you also update the docs, it''s at least wrong about the 4MB being a fixed > value.Yes, I''ll send a new patch. Rob> > @@ -251,8 +256,6 @@ > > if (!b_info->u.hvm.boot) return ERROR_NOMEM; > > } > > > > - if (!b_info->u.hvm.vga.kind) > > - b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; > > libxl_defbool_setdefault(&b_info->u.hvm.vnc.enable, true); > > if (libxl_defbool_val(b_info->u.hvm.vnc.enable)) { > > libxl_defbool_setdefault(&b_info->u.hvm.vnc.findunused, > > true); > > > > > I''m not really sure who, if anyone, might know definitively what is > > > going on here. Stefano has some involvement in this video mem stuff > > > once upon a time and Ian is the qemu-trad maintainer, so I''ve > > > CCdthem both ;-) > > > > > > > > > > > Cheers, > > > > Rob > > > > > > > > _______________________________________________ > > > > Xen-devel mailing list > > > > Xen-devel@lists.xen.org > > > > http://lists.xen.org/xen-devel > > > > > >
On Tue, 2013-09-17 at 15:52 +0100, Rob Hoes wrote:> > > I think that something like this would work: > > > > > > diff -r ba248e555458 tools/libxl/libxl_create.c > > > --- a/tools/libxl/libxl_create.c > > > +++ b/tools/libxl/libxl_create.c > > > @@ -213,8 +213,13 @@ > > > if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) > > > b_info->shadow_memkb = 0; > > > > > > - if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_STD && > > > - b_info->device_model_version => > > + if (!b_info->u.hvm.vga.kind) > > > + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; > > > + > > > + if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_CIRRUS) { > > > + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > > > + b_info->video_memkb = 4 * 1024; > > > + } else if (b_info->device_model_version => > > LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { > > > if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) > > > b_info->video_memkb = 16 * 1024; > > > > Do the following checks for b_info->video_memkb => > LIBXL_MEMKB_DEFAULT and b_info->video_memkb < (8 * 1024) not need > > modifying then? > > > > Is the behaviour here any different to just changing the 8s into 4s? > > I was assuming that we need to keep the default of 8MB, as well as the > restriction to have at least 8MB, for standard vga (when kind !> CIRRUS)Oh right, this nest of twisted conditionals had me confused.I thought at first it could be made a switch but then realised it was testing different properties down the if/else chain... I wonder if it might be better to duplication some code for clarities sake: switch(dm_versioN) case LIBXL...QEMU_TRAD: switch (vga.kind): case CIRRUS: if videomembk == default videomemkb= 4 if videomemkbv < 4 error break case STDVGA: some stuff break case LIBXL..QEMU_XEN switch(vga.kind) etc duplicating some of the above with default of 8 etc or maybe it would be even clearer to refactor into libxl__video_{cirrus,stdvga}_set defaults?> > Can you also update the docs, it''s at least wrong about the 4MB being a fixed > > value. > > Yes, I''ll send a new patch. > > Rob > > > > @@ -251,8 +256,6 @@ > > > if (!b_info->u.hvm.boot) return ERROR_NOMEM; > > > } > > > > > > - if (!b_info->u.hvm.vga.kind) > > > - b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; > > > libxl_defbool_setdefault(&b_info->u.hvm.vnc.enable, true); > > > if (libxl_defbool_val(b_info->u.hvm.vnc.enable)) { > > > libxl_defbool_setdefault(&b_info->u.hvm.vnc.findunused, > > > true); > > > > > > > I''m not really sure who, if anyone, might know definitively what is > > > > going on here. Stefano has some involvement in this video mem stuff > > > > once upon a time and Ian is the qemu-trad maintainer, so I''ve > > > > CCdthem both ;-) > > > > > > > > > > > > > > Cheers, > > > > > Rob > > > > > > > > > > _______________________________________________ > > > > > Xen-devel mailing list > > > > > Xen-devel@lists.xen.org > > > > > http://lists.xen.org/xen-devel > > > > > > > > > >
On Tue, Sep 17, 2013 at 03:03:20PM +0100, Frediano Ziglio wrote:> On Tue, 2013-09-17 at 12:54 +0000, Rob Hoes wrote: > > Hi, > > > > The videoram setting in xl config files is documented as follows: > > > > " > > videoram=MBYTES > > > > Sets the amount of RAM which the emulated video card will contain, which in turn limits the resolutions and bit depths which will be available. The default amount of video ram for stdvga is 8MB which is sufficient for e.g. 1600x1200 at 32bpp and videoram option is currently working only when using the qemu-xen-traditional device-model. > > > > When using the emulated Cirrus graphics card (vga="cirrus") the amount of video ram is fixed at 4MB which is sufficient for 1024x768 at 32 bpp and videoram option is currently working only when using the upstream qemu-xen device-model. > > " > > > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > > > However, when I use xl to create a VM with cirrus graphics, I get 8MB of video RAM by default. Moreover, setting it to videoram=4 in the config file leads to complaints from libxl: > > > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram must be at least 8 mb > > > > Is there a bug in the logic in libxl_create.c? > > > > Cheers, > > Rob > > > > cirrus card support maximum of 4mb (which is also the default) so there > is IMHO no point in reporting an error, just a warning would be enough >Uhm, I think Rob says above he''s able to use 8MB with Cirrus. Maybe there''s a difference between qemu-traditional and qemu-upstream? Maybe the old qemu-traditional only supports fixed 4MB with Cirrus? And new qemu-upstream allows more videomem, with the possibility of configuring the amount of videomem? Just guessing here..> Frediano >-- Pasi
With upstream qemu >1.4 videoram must be atleast 8 mb with cirrus and 16 mb with stdvga or domUs will be unable to start (critical xen memory error). All details should be on topic about my patch of some months ago. 2013/9/17 Ian Campbell <ian.campbell@citrix.com>> On Tue, 2013-09-17 at 14:24 +0100, Wei Liu wrote: > > On Tue, Sep 17, 2013 at 12:54:57PM +0000, Rob Hoes wrote: > > > Hi, > > > > > > The videoram setting in xl config files is documented as follows: > > > > > > " > > > videoram=MBYTES > > > > > > Sets the amount of RAM which the emulated video card will contain, > which in turn limits the resolutions and bit depths which will be > available. The default amount of video ram for stdvga is 8MB which is > sufficient for e.g. 1600x1200 at 32bpp and videoram option is currently > working only when using the qemu-xen-traditional device-model. > > > > > > When using the emulated Cirrus graphics card (vga="cirrus") the > amount of video ram is fixed at 4MB which is sufficient for 1024x768 at 32 > bpp and videoram option is currently working only when using the upstream > qemu-xen device-model. > > > " > > > > > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > > > > > However, when I use xl to create a VM with cirrus graphics, I get 8MB > of video RAM by default. Moreover, setting it to videoram=4 in the config > file leads to complaints from libxl: > > > > > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram > must be at least 8 mb > > > > > > Is there a bug in the logic in libxl_create.c? > > > > > > > I think the document needs to be updated. > > > > commit 2e814a017155b885e4d4b5a88dc05e7367a9722a > > Author: Fabio Fantoni <fabio.fantoni@heliman.it> > > Date: Fri Feb 15 13:32:27 2013 +0000 > > > > tools/libxl: Improve videoram setting > > > > - If videoram setting is less than 8 mb shows error and exit. > > I wonder why this is the case. Fabvio do you remmeberwhere this number > 8M came from for Cirrus? > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
On Tue, 2013-09-17 at 19:51 +0200, Fabio Fantoni wrote:> With upstream qemu >1.4 videoram must be atleast 8 mb with cirrus and > 16 mb with stdvga or domUs will be unable to start (critical xen > memory error).So we should make it 4mb for qemu-trad and 8 for qemu-xen?> > All details should be on topic about my patch of some months ago.Do you happen to have a link?> > > > 2013/9/17 Ian Campbell <ian.campbell@citrix.com> > On Tue, 2013-09-17 at 14:24 +0100, Wei Liu wrote: > > On Tue, Sep 17, 2013 at 12:54:57PM +0000, Rob Hoes wrote: > > > Hi, > > > > > > The videoram setting in xl config files is documented as > follows: > > > > > > " > > > videoram=MBYTES > > > > > > Sets the amount of RAM which the emulated video card > will contain, which in turn limits the resolutions and bit > depths which will be available. The default amount of video > ram for stdvga is 8MB which is sufficient for e.g. 1600x1200 > at 32bpp and videoram option is currently working only when > using the qemu-xen-traditional device-model. > > > > > > When using the emulated Cirrus graphics card > (vga="cirrus") the amount of video ram is fixed at 4MB which > is sufficient for 1024x768 at 32 bpp and videoram option is > currently working only when using the upstream qemu-xen > device-model. > > > " > > > > > > XenServer also uses a default of 4MB video ram for cirrus > graphics. > > > > > > However, when I use xl to create a VM with cirrus > graphics, I get 8MB of video RAM by default. Moreover, setting > it to videoram=4 in the config file leads to complaints from > libxl: > > > > > > > libxl_create.c:228:libxl__domain_build_info_setdefault: > videoram must be at least 8 mb > > > > > > Is there a bug in the logic in libxl_create.c? > > > > > > > I think the document needs to be updated. > > > > commit 2e814a017155b885e4d4b5a88dc05e7367a9722a > > Author: Fabio Fantoni <fabio.fantoni@heliman.it> > > Date: Fri Feb 15 13:32:27 2013 +0000 > > > > tools/libxl: Improve videoram setting > > > > - If videoram setting is less than 8 mb shows error and > exit. > > > I wonder why this is the case. Fabvio do you remmeberwhere > this number > 8M came from for Cirrus? > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > > >
> cirrus card support maximum of 4mb (which is also the default) so there is > IMHO no point in reporting an error, just a warning would be enoughFrediano, does what you said apply to traditional QEMU only? Fabio seems to suggest 8MB is needed on upstream QEMU. And did you really mean "maximum"? 8MB seems to work for cirrus on traditional-QEMU. Rob
Il 18/09/2013 11:13, Rob Hoes ha scritto:>> cirrus card support maximum of 4mb (which is also the default) so there is >> IMHO no point in reporting an error, just a warning would be enough > Frediano, does what you said apply to traditional QEMU only? Fabio seems to suggest 8MB is needed on upstream QEMU.After my patch the hvm domUs start correctly with both cirrus and stdvga with all upstream qemu versions (I tested up to 1.6). Without it the hvm domUs was unable to start in some case with qemu 1.3 and all case of qemu >=1.4.> > And did you really mean "maximum"? 8MB seems to work for cirrus on traditional-QEMU.If I remember good I did fast test with qemu traditional with my patch and was working with both vgas, the only case (but I not completely sure) is with qemu-trad and cirrus vga where 4 mb of videoram could be unused IF cirrus support only up 4 mb.> > Rob > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
> > cirrus card support maximum of 4mb (which is also the default) so > > there is IMHO no point in reporting an error, just a warning would be > > enough > > > > Uhm, I think Rob says above he''s able to use 8MB with Cirrus. > Maybe there''s a difference between qemu-traditional and qemu-upstream? > > Maybe the old qemu-traditional only supports fixed 4MB with Cirrus? > And new qemu-upstream allows more videomem, with the possibility of > configuring the amount of videomem?I just talked to Frediano. He says that it is likely that, for Cirrus, the videoram parameter on the QEMU command line is silently ignored. When I said that I was able to use 8MB on cirrus, I only looked at what was put on the command line, so perhaps I wasn''t actually getting 8MB. I think that for traditional, we should make the default 4MB, and also allow other values (but log a warning if a value other than 4MB is used). For upstream qemu, I think we should just leave things as they are, unless someone has a better idea (I am no expert in this field). I''ll shortly submit a patch along the lines of what Ian suggested. Rob> Just guessing here.. > > > Frediano > > > > -- Pasi
On Tue, 17 Sep 2013, Ian Campbell wrote:> On Tue, 2013-09-17 at 12:54 +0000, Rob Hoes wrote: > > Hi, > > > > The videoram setting in xl config files is documented as follows: > > > > " > > videoram=MBYTES > > > > Sets the amount of RAM which the emulated video card will contain, > > which in turn limits the resolutions and bit depths which will be > > available. The default amount of video ram for stdvga is 8MB which is > > sufficient for e.g. 1600x1200 at 32bpp and videoram option is > > currently working only when using the qemu-xen-traditional > > device-model. > > > > When using the emulated Cirrus graphics card (vga="cirrus") the > > amount of video ram is fixed at 4MB which is sufficient for 1024x768 > > at 32 bpp and videoram option is currently working only when using the > > upstream qemu-xen device-model. > > " > > > > XenServer also uses a default of 4MB video ram for cirrus graphics. > > > > However, when I use xl to create a VM with cirrus graphics, I get 8MB > > of video RAM by default. Moreover, setting it to videoram=4 in the > > config file leads to complaints from libxl: > > > > libxl_create.c:228:libxl__domain_build_info_setdefault: videoram must be at least 8 mb > > > > Is there a bug in the logic in libxl_create.c? > > Either the docs of the code or both would seem to be wrong. Since you > say you happily use 4MB in XenServer I guess it is both? > > I noticed that the docs also say the amount is fixed, but that''s not > what the code implements either.. > > I''m not really sure who, if anyone, might know definitively what is > going on here. Stefano has some involvement in this video mem stuff once > upon a time and Ian is the qemu-trad maintainer, so I''ve CCdthem > both ;-)AFAICT we always had 8 mb for Cirrus in libxl. I am not really sure where this discrepancy between the docs and the code comes from. I think that if 4mb actually works fine with different guests OSes then we should allow it.