[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Re: Losing PS/2 Interrupts


  • To: "Jan Beulich" <JBeulich@xxxxxxxxxx>
  • From: Thomas Goetz <tcgoetz@xxxxxxxxx>
  • Date: Mon, 23 May 2011 08:09:35 -0400
  • Cc: Simon Graham <simon.graham@xxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
  • Delivery-date: Mon, 23 May 2011 05:10:18 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to:x-mailer; b=pz1NilHTMhnS2lc5U1odWoZdXd9orNfpV0ArGLAtG67m31VIOvNT+bQaXPBVzvnFnD wGW8X+ee6k+buIvh/GBU4Yiuza4HZKnHA6spwCppGuviDACVYO0nflCzHOXs0l+olm2A oFKjqSIWXkoGY3Wl8jcz5/XyVzESjecHo0SH8=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>


On May 23, 2011, at 4:26 AM, Jan Beulich wrote:



The PS/2 port has a one character buffer. It will only ever send one
interrupt until it has been serviced. When __do_IRQ_guest calls
send_guest_pirq and sees that it is already pending, what part of the between
the bottom of __do_IRQ_guest and _irq_guest_eoi results in the pending
interrupt being issued to the guest? I haven't found that and it looks like
Xen is merging the ACKTYPE_NONE edge interrupt resulting in the deice never
being serviced when it's buffer is full and never interrupting again.

It would be a bug of the 8042 if it sent a second interrupt when the
first one wasn't serviced (status and data port read) yet. It's the
nature of edge triggered interrupts that secondary instances are
lost when the primary instance doesn't get handled (in time).

Jan


My assumption is that at the point that the i8042 driver reads the data register a new interrupt happens. There is gap in time between when the data register is read and when the event channel pending state is cleared. Since the hypervisor ACKed the previous real interrupt before delivering it to the guest, there is nothing to stop the i8042 device from interrupting immediately after the data register is read. If it interrupt before the event channel pending state is cleared, then it will not be delivered to the guest and the EOI mechanism will be set up, but I haven't found anything in that that will set up a delayed delivery of the second interrupt.

In this situation the i8042 device has every reason to believe the second interrupt will be delivered. The previous interrupt was received and handled. Nothing is masked.

Am I missing something?

---
Tom Goetz




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.