qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Can I have someone's feedback on [bug 1809075] Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel
@ 2018-12-19  9:31 Gao Zhiyuan
  2019-01-03 11:05 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Gao Zhiyuan @ 2018-12-19  9:31 UTC (permalink / raw)
  To: qemu-devel

Hi everyone.

Can I please have someone's feedback on this bug? 
https://bugs.launchpad.net/qemu/+bug/1809075
Briefly, guest OS loses characters sent to it via vnc. And I spot the 
bug in relation to ps2 driver.

I'm thinking of possible fixes and I might want to use a memory barrier. 
But I would really like to have some suggestion from a qemu developer 
first. For example, can we brutally drop capslock LED key events in ps2 
queue?

It is actually relevant to openQA, an automated QA tool for openSUSE. 
And this bug blocks a few test cases for us.

Thank you in advance!

Kind regards,
Gao Zhiyuan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Can I have someone's feedback on [bug 1809075] Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel
  2018-12-19  9:31 [Qemu-devel] Can I have someone's feedback on [bug 1809075] Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel Gao Zhiyuan
@ 2019-01-03 11:05 ` Philippe Mathieu-Daudé
  2019-01-07  8:16   ` Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-03 11:05 UTC (permalink / raw)
  To: Gao Zhiyuan, Marc-André Lureau, Gerd Hoffmann
  Cc: qemu-devel, Paolo Bonzini

Cc'ing Marc-André & Gerd.

On 12/19/18 10:31 AM, Gao Zhiyuan wrote:
> Hi everyone.
> 
> Can I please have someone's feedback on this bug?
> https://bugs.launchpad.net/qemu/+bug/1809075
> Briefly, guest OS loses characters sent to it via vnc. And I spot the
> bug in relation to ps2 driver.
> 
> I'm thinking of possible fixes and I might want to use a memory barrier.
> But I would really like to have some suggestion from a qemu developer
> first. For example, can we brutally drop capslock LED key events in ps2
> queue?
> 
> It is actually relevant to openQA, an automated QA tool for openSUSE.
> And this bug blocks a few test cases for us.
> 
> Thank you in advance!
> 
> Kind regards,
> Gao Zhiyuan
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Can I have someone's feedback on [bug 1809075] Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel
  2019-01-03 11:05 ` Philippe Mathieu-Daudé
@ 2019-01-07  8:16   ` Gerd Hoffmann
  0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2019-01-07  8:16 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Gao Zhiyuan, Marc-André Lureau, qemu-devel, Paolo Bonzini

On Thu, Jan 03, 2019 at 12:05:54PM +0100, Philippe Mathieu-Daudé wrote:
> Cc'ing Marc-André & Gerd.
> 
> On 12/19/18 10:31 AM, Gao Zhiyuan wrote:
> > Hi everyone.
> > 
> > Can I please have someone's feedback on this bug?
> > https://bugs.launchpad.net/qemu/+bug/1809075
> > Briefly, guest OS loses characters sent to it via vnc. And I spot the
> > bug in relation to ps2 driver.
> > 
> > I'm thinking of possible fixes and I might want to use a memory barrier.
> > But I would really like to have some suggestion from a qemu developer
> > first. For example, can we brutally drop capslock LED key events in ps2
> > queue?

There is no "capslock LED key event".  0xfa is KBD_REPLY_ACK, and the
device queues it in response to guest port writes.  Yes, the ack can
race with actual key events.  But IMO that isn't a bug in qemu.

Probably the linux kernel just throws away everything until it got the
ack for the port write, and that way the key event gets lost.  On
physical hardware you will not notice because it is next to impossible
to type fast enough to hit the race window.

So, go fix the kernel.

Alternatively fix vncdotool to send uppercase letters properly with
shift key pressed.  Then qemu wouldn't generate capslock key events
(that happens because qemu thinks guest and host capslock state is out
of sync) and the guests's capslock led update request wouldn't get into
the way.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-07  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-19  9:31 [Qemu-devel] Can I have someone's feedback on [bug 1809075] Concurrency bug on keyboard events: capslock LED messing up keycode streams causes character misses at guest kernel Gao Zhiyuan
2019-01-03 11:05 ` Philippe Mathieu-Daudé
2019-01-07  8:16   ` Gerd Hoffmann

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).