On Tue, Feb 09, 2010 at 09:07:30PM +0100, Matthias Bolte wrote:
2010/2/5 Daniel Veillard <veillard(a)redhat.com>:
> Comments for commit grabbed from gitorious and apparently not updated as
> this commit now inclides the spice activating code and tests too...
>
> Daniel
>
> Author: Daniel P. Berrange <berrange(a)redhat.com>
>
> Implement RHEL-5.4 KVM QXL support in QEMU driver
>
> This supports the -qxl argument in RHEL-5's fork of KVM
> which has SPICE support. QXL is a graphics card, but
> inexplicably doesn't use the standard -vga syntax for
> generic configuration. Also -qxl is rather useless unless
> you also supply -spice (coming in next patch)
>
> * src/qemu_conf.c: Probe for -qxl arg in QEMU help. Format a
> -qxl arg for launching VMs
> * src/qemu_conf.h: Add flag for -qxl arg availability
> * tests/qemuhelpdata/kvm-83-rhel, tests/qemuhelptest.c: test
> for -qxl arg help parsing
> * tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c,
> tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args,
> tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml: add
> tests for -qxl graphics XML to ARGV handling
>
> @@ -3943,6 +3997,26 @@ int qemudBuildCommandLine(virConnectPtr conn,
> goto error;
> }
> }
> +
> + if (def->videos[0]->type == VIR_DOMAIN_VIDEO_TYPE_QXL) {
> +
> + if (qemuCmdFlags & QEMUD_CMD_FLAG_QXL) {
> + char *optstr;
> +
> + if (virAsprintf(&optstr, "%u,ram=%u",
> + def->videos[0]->heads,
> + (def->videos[0]->vram /1024)) < 0)
> + goto no_memory;
> +
> + ADD_ARG_LIT("-qxl");
> + ADD_ARG(optstr);
> + } else {
> + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"%s",
> + _("qxl graphics are not supported with this
QEMU"));
s/graphics/video/ because QXL is the video device and SPICE the graphics device.
Updating the website section about the domain XML format would be a
nice bonus :)
ACK
Thanks for the ACK Matthias, but this is not really ready for commit,
this need progress in Spice acceptance in QEmu upstream and as Dan
pointed out privately this code need to be revamped to match the new
device addressing method in QEmu. But I wanted to rebase those patches
to make it easier once things speeds up on Spice front.
So not to be commited yet :-)
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/