qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Guannan Ren <gren@redhat.com>
Cc: libvir-list@redhat.com, "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [libvirt] [PATCH] caps: use -device for primary video when qemu >=1.6
Date: Wed, 24 Jul 2013 14:44:14 -0600	[thread overview]
Message-ID: <51F03C9E.2050609@redhat.com> (raw)
In-Reply-To: <1374658874-27824-1-git-send-email-gren@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2524 bytes --]

[adding qemu-devel]

On 07/24/2013 03:41 AM, Guannan Ren wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=981094
> 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 >=1.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.

> 
> 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);
>      }
>  
> -    if (version >= 1002000)
> -        virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
>      return 0;
>  }
>  
> @@ -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);
>  }
>  
>  /* Capabilities that are architecture depending
> @@ -2597,6 +2594,9 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
>      if (qemuCaps->version >= 1003001)
>          virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_WEBSOCKET);
>  
> +    if (qemuCaps->version >= 1006000)
> +        virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
> +
>      if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
>          goto cleanup;
>      if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

           reply	other threads:[~2013-07-24 20:44 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1374658874-27824-1-git-send-email-gren@redhat.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51F03C9E.2050609@redhat.com \
    --to=eblake@redhat.com \
    --cc=gren@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).