Fabio Fantoni
2013-Jul-05 12:17 UTC
[PATCH] libxl: Add qxl vga interface support for upstream qemu
Usage: vga="qxl" Reposted for xen 4.4, require SSE support on hvm domU otherwise it works only as a standard vga. Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> Signed-off-by: Zhou Peng <zpengxen@gmail.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> --- docs/man/xl.cfg.pod.5 | 10 +++++++++- tools/libxl/libxl_create.c | 16 ++++++++++++++++ tools/libxl/libxl_dm.c | 11 +++++++++++ tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 2 ++ 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 index 069b73f..48c2669 100644 --- a/docs/man/xl.cfg.pod.5 +++ b/docs/man/xl.cfg.pod.5 @@ -1018,6 +1018,9 @@ 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. +For B<qxl> vga, the default is both default and minimal 128MB. +If B<videoram> is set less than 128MB, an error will be triggered. + =item B<stdvga=BOOLEAN> Select a standard VGA card with VBE (VESA BIOS Extensions) as the @@ -1029,9 +1032,14 @@ This option is deprecated, use vga="stdvga" instead. =item B<vga="STRING"> -Selects the emulated video card (stdvga|cirrus). +Selects the emulated video card (stdvga|cirrus|qxl). The default is cirrus. +In general, QXL should work with the Spice remote display protocol +for acceleration, and QXL driver is necessary in guest in this case. +QXL can also work with the VNC protocol, but it will be like a standard +VGA without acceleration. + =item B<vnc=BOOLEAN> Allow access to the display via the VNC protocol. This enables the diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 0c32d0b..cb9c822 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -213,6 +213,22 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, if (b_info->shadow_memkb == LIBXL_MEMKB_DEFAULT) b_info->shadow_memkb = 0; + if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_QXL) { + if (b_info->device_model_version =+ LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { + if (b_info->video_memkb == LIBXL_MEMKB_DEFAULT) { + b_info->video_memkb = (128 * 1024); + } else if (b_info->video_memkb < (128 * 1024)) { + LOG(ERROR, + "128 Mib videoram is the minimum for qxl default"); + return ERROR_INVAL; + } + } else { + LOG(ERROR,"qemu upstream required for qxl vga"); + return ERROR_INVAL; + } + } + if (b_info->u.hvm.vga.kind == LIBXL_VGA_INTERFACE_TYPE_STD && b_info->device_model_version = LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) { diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 7e54c02..a53eceb 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -191,6 +191,8 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc, break; case LIBXL_VGA_INTERFACE_TYPE_CIRRUS: break; + case LIBXL_VGA_INTERFACE_TYPE_QXL: + break; } if (b_info->u.hvm.boot) { @@ -477,6 +479,15 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc, libxl__sizekb_to_mb(b_info->video_memkb)), NULL); } break; + case LIBXL_VGA_INTERFACE_TYPE_QXL: + /* QXL have 2 ram regions, ram and vram */ + flexarray_vappend(dm_args, "-vga", "qxl", NULL); + if (b_info->video_memkb) { + flexarray_vappend(dm_args, "-global", + GCSPRINTF("qxl-vga.vram_size_mb=%lu", + (b_info->video_memkb/2/1024)), "-global", + GCSPRINTF("qxl-vga.ram_size_mb=%lu", + (b_info->video_memkb/2/1024)), NULL); } if (b_info->u.hvm.boot) { diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index d218a2d..8262cba 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -130,6 +130,7 @@ libxl_shutdown_reason = Enumeration("shutdown_reason", [ libxl_vga_interface_type = Enumeration("vga_interface_type", [ (1, "CIRRUS"), (2, "STD"), + (3, "QXL"), ], init_val = 0) # diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8a478ba..c5292f4 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1456,6 +1456,8 @@ skip_vfb: b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_STD; } else if (!strcmp(buf, "cirrus")) { b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_CIRRUS; + } else if (!strcmp(buf, "qxl")) { + b_info->u.hvm.vga.kind = LIBXL_VGA_INTERFACE_TYPE_QXL; } else { fprintf(stderr, "Unknown vga \"%s\" specified\n", buf); exit(1); -- 1.7.9.5
George Dunlap
2013-Jul-05 15:27 UTC
Re: [PATCH] libxl: Add qxl vga interface support for upstream qemu
On Fri, Jul 5, 2013 at 1:17 PM, Fabio Fantoni <fabio.fantoni@m2r.biz> wrote:> Usage: > vga="qxl" > > Reposted for xen 4.4, require SSE support on hvm domU otherwise it works > only as a standard vga. > > Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> > Signed-off-by: Zhou Peng <zpengxen@gmail.com> > Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>I haven''t done a detailed review, but it looks just like the patch we reverted. Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
George Dunlap
2013-Jul-05 16:34 UTC
Re: [PATCH] libxl: Add qxl vga interface support for upstream qemu
On Fri, Jul 5, 2013 at 4:27 PM, George Dunlap <George.Dunlap@eu.citrix.com> wrote:> On Fri, Jul 5, 2013 at 1:17 PM, Fabio Fantoni <fabio.fantoni@m2r.biz> wrote: >> Usage: >> vga="qxl" >> >> Reposted for xen 4.4, require SSE support on hvm domU otherwise it works >> only as a standard vga. >> >> Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> >> Signed-off-by: Zhou Peng <zpengxen@gmail.com> >> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> >> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> > > I haven''t done a detailed review, but it looks just like the patch we reverted. > > Acked-by: George Dunlap <george.dunlap@eu.citrix.com>I do want to say, however, that although this is on my list, as the person proposing the new feature, ultimately it is your responsibility to make sure that this feature is in a useable state for 4.4, and for pro-actively reporting bugs and chasing people to make sure that the bugs get noticed. :-) -George
Fabio Fantoni
2013-Jul-08 09:02 UTC
Re: [PATCH] libxl: Add qxl vga interface support for upstream qemu
Il 05/07/2013 18:34, George Dunlap ha scritto:> On Fri, Jul 5, 2013 at 4:27 PM, George Dunlap > <George.Dunlap@eu.citrix.com> wrote: >> On Fri, Jul 5, 2013 at 1:17 PM, Fabio Fantoni <fabio.fantoni@m2r.biz> wrote: >>> Usage: >>> vga="qxl" >>> >>> Reposted for xen 4.4, require SSE support on hvm domU otherwise it works >>> only as a standard vga. >>> >>> Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> >>> Signed-off-by: Zhou Peng <zpengxen@gmail.com> >>> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> >>> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> >> I haven''t done a detailed review, but it looks just like the patch we reverted. >> >> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> > I do want to say, however, that although this is on my list, as the > person proposing the new feature, ultimately it is your responsibility > to make sure that this feature is in a useable state for 4.4, and for > pro-actively reporting bugs and chasing people to make sure that the > bugs get noticed. :-) > > -GeorgeAbout SSE support I''m not able to do required modification. About massive testing of qxl on linux and windows domUs, I''ll glad to do all sort of testing/reporting when the SSE support will be ready, probably I''ll able to do also libxl fix/improvement if necessary.
Possibly Parallel Threads
- Re: [PATCH v16] libxl: Add qxl vga interface support for upstream qemu
- [PATCH QXL 2/2] libxl: Add qxl vga interface support.
- [PATCH v4] libxl: Spice vdagent support for upstream qemu
- [PATCH v3] libxl: spice usbredirection support for upstream qemu
- [PATCH v7 1/2] libxl: usb2 and usb3 controller support for upstream qemu