From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 2/3] tools:libxl: Add qxl vga interface support v2 Date: Mon, 22 Oct 2012 15:36:24 +0100 Message-ID: <508559E8.10102@eu.citrix.com> References: <1338987918.32319.84.camel@zakaz.uk.xensource.com> <1339049291.6557.11.camel@dagon.hellion.org.uk> <1341325462.21547.20.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ZhouPeng Cc: "Xen-Devel (E-mail)" , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 18/10/12 11:19, ZhouPeng wrote: > v4 > > test and fix conflict with the latest Xen > ----- > > > tools:libxl: Add qxl vga interface support for upstream-qemu-xen. > > Usage: > qxl=1|0 > > Signed-off-by: Zhou Peng Thanks, Zhou Peng. Just a couple of comments below: > > diff -r c1c549c4fe9e docs/man/xl.cfg.pod.5 > --- a/docs/man/xl.cfg.pod.5 Mon Oct 15 16:51:44 2012 +0100 > +++ b/docs/man/xl.cfg.pod.5 Thu Oct 18 17:53:25 2012 +0800 > @@ -930,10 +930,13 @@ in the B for configurin > > 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. This option is only available when using the B > -option (see below). > +available. This option is only available when using the B and > +B option (see below). > The default amount of video ram for stdvga is 8MB which is sufficient > for e.g. 1600x1200 at 32bpp. > +For B option, the default is 128MB. If B is set greater > +than 128MB, it will be trimmed to 128MB; if set less than 128MB, an > +error will be triggered. Is this a fixed value in qemu, or is this something that can be changed via the command-line? > + > + if (b_info->device_model_version == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN > + && b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_QXL) { > + /* > + * QXL needs 128 Mib video ram by default. > + */ > + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) { > + b_info->video_memkb = 128 * 1024; > + } > + if (b_info->video_memkb < 128 * 1024) { > + LIBXL__LOG(CTX, LIBXL__LOG_ERROR, > + "128 Mib videoram is necessary for qxl default"); > + return ERROR_INVAL; > + } > + if (b_info->video_memkb > 128 * 1024) { > + b_info->video_memkb = 128 * 1024; > + LIBXL__LOG(CTX, LIBXL__LOG_WARNING, > + "trim videoram to qxl default: 128 Mib"); > + } > + } It would be better to have a single #define for the required QXL video mem size, rather than duplicating "128*1024" several times. Other than that, looks pretty good to me. Thanks, -George