qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Amos Kong <akong@redhat.com>, qemu-devel@nongnu.org
Cc: mtosatti@redhat.com, kraxel@redhat.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH for-2.2 2/2] QMP/input-send-event: make console parameter optional
Date: Fri, 07 Nov 2014 09:53:13 +0100	[thread overview]
Message-ID: <545C8879.7010303@redhat.com> (raw)
In-Reply-To: <1415335285-1579-2-git-send-email-akong@redhat.com>

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

On 11/07/2014 05:41 AM, Amos Kong wrote:
> The 'QemuConsole' is the input source for handler, we share some
> input handlers to process the input events from different QemuConsole.
> 
> Normally we only have one set of keyboard, mouse, usbtablet, etc.
> The devices have different mask, it's fine to just checking mask to
> insure that the handler has the ability to process the event.
> 
> I saw we try to bind console to handler in usb/dev-hid.c, but display
> always isn't available at that time.
> 
> If we have multiseat setup (as Gerd said), we only have 'problem' in
> this case. Actually event from different devices have the same effect
> for system, it's fine to always use the first available handler
> without caring about the console.
> 
> For send-key command, we just pass a NULL for console parameter in
> calling qemu_input_event_send_key(NULL, ..), but 'input-send-event'
> needs to care more devices.
> 
> Conclusion:
> Generally assigning the special console is meanless, and we can't

s/meanless/meaningless/

> directly remove the QMP parameter for compatibility.
> 
> So we can make the parameter optional. The parameter might be useful
> for some special condition: we have multiple devices without binding
> console and they all have the ability(mask) to process events, and
> we don't want to use the first one.
> 
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Markus Armbruster <armbru@redhat.com>
> Cc: Marcelo Tosatti <mtosatti@redhat.com>
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
>  qapi-schema.json |  4 ++--
>  qmp-commands.hx  |  4 ++--
>  ui/input.c       | 15 +++++++++------
>  3 files changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index a1573d8..367fb8e 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3249,7 +3249,7 @@
>  #
>  # Send input event(s) to guest.
>  #
> -# @console: Which console to send event(s) to.
> +# @console: #optional console to send event(s) to.

Might be worth mentioning that the default is the first available
console.  The change is safe from back-compat perspective.

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
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: 539 bytes --]

  reply	other threads:[~2014-11-07  8:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07  4:41 [Qemu-devel] [PATCH for-2.2 1/2] QMP/input-send-event: update document of union InputEvent Amos Kong
2014-11-07  4:41 ` [Qemu-devel] [PATCH for-2.2 2/2] QMP/input-send-event: make console parameter optional Amos Kong
2014-11-07  8:53   ` Eric Blake [this message]
2014-11-07  8:49 ` [Qemu-devel] [PATCH for-2.2 1/2] QMP/input-send-event: update document of union InputEvent Eric Blake
2014-11-07  8:50   ` Eric Blake
2014-11-13 10:27     ` Gerd Hoffmann

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=545C8879.7010303@redhat.com \
    --to=eblake@redhat.com \
    --cc=akong@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mtosatti@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).