From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V25v0-0001OU-CS for qemu-devel@nongnu.org; Wed, 24 Jul 2013 16:44:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V25uz-0001Wi-Bm for qemu-devel@nongnu.org; Wed, 24 Jul 2013 16:44:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V25uz-0001WU-45 for qemu-devel@nongnu.org; Wed, 24 Jul 2013 16:44:17 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6OKiFHq016062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Jul 2013 16:44:15 -0400 Message-ID: <51F03C9E.2050609@redhat.com> Date: Wed, 24 Jul 2013 14:44:14 -0600 From: Eric Blake MIME-Version: 1.0 References: <1374658874-27824-1-git-send-email-gren@redhat.com> In-Reply-To: <1374658874-27824-1-git-send-email-gren@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qRqshwEt87r5BEeTBStdvbasOcS54B2n8" Subject: Re: [Qemu-devel] [libvirt] [PATCH] caps: use -device for primary video when qemu >=1.6 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Guannan Ren Cc: libvir-list@redhat.com, "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qRqshwEt87r5BEeTBStdvbasOcS54B2n8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable [adding qemu-devel] On 07/24/2013 03:41 AM, Guannan Ren wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=3D981094 > The commit 0ad9025ef introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY= > for using -device VGA, -device cirrus-vga, -device vmware-svga and > -device qxl-vga. In use, for -device qxl-vga, mouse doesn't display > in guest window like the desciption in above bug. s/desciption/description/ As someone that was hit by the qemu bug of no mouse cursor display on a qxl guest, I'm more than willing to agree to this patch. Upstream qemu has a patch in their queue to fix the qxl mouse display bug for qemu 1.6.= > This patch try to use -device for primary video when qemu >=3D1.6 which= > is safe. > --- > src/qemu/qemu_capabilities.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) ACK. I hate hard-coded version checks for capability bits, but don't know if we can do any better. It would be nice if we had some other capability bit that we could query in QMP to know for certain whether '-device qxl-vga' properly works without eating the mouse cursor. >=20 > diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.= c > index 5dc3c9e..08406b8 100644 > --- a/src/qemu/qemu_capabilities.c > +++ b/src/qemu/qemu_capabilities.c > @@ -1189,8 +1189,6 @@ virQEMUCapsComputeCmdFlags(const char *help, > virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY); > } > =20 > - if (version >=3D 1002000) > - virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); > return 0; > } > =20 > @@ -2424,7 +2422,6 @@ virQEMUCapsInitQMPBasic(virQEMUCapsPtr qemuCaps) > virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_OPT); > virQEMUCapsSet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE); > virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY); > - virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); > } > =20 > /* Capabilities that are architecture depending > @@ -2597,6 +2594,9 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps, > if (qemuCaps->version >=3D 1003001) > virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_WEBSOCKET); > =20 > + if (qemuCaps->version >=3D 1006000) > + virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); > + > if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0) > goto cleanup; > if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0) >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qRqshwEt87r5BEeTBStdvbasOcS54B2n8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR8DyeAAoJEKeha0olJ0NqPJcH/23mVuT8pBz7fVPUxGFuxPEa JCu3qlzKFg6MBZBrvP8rsyk0cmC13nJPj36HAns3hjvDVWLP2bli9Sw1p136tvoE Ba74RfMDVbGf3KR70bg/uMVlL5zNuYC8P1gHFMFH+sjsKy2IfFCaxjdVuRRUZUTG MvZDUz8RTGjWo928Y1I5U2i/fiGD2z29VCLVaf4tlgaANS/SIEUumQiPWtFFNJRK DTSaIVEPhjQ1aWbvBj6WW00vG4tbke2h2cLxms5KoZjt33CmTe0HD8FSZXYCzk5m 5uVcKEwxK6st7T/vglvs4eU86rGuWLXGPv2LGvRGaKo7b8+sgROQ26+RULNBVLM= =I9YN -----END PGP SIGNATURE----- --qRqshwEt87r5BEeTBStdvbasOcS54B2n8--