WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Losing PS/2 Interrupts
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to:x-mailer; bh=4PStJT5lFsECKgZVlHyMvBoPPkc7Zw3JHZdreK75NTk=; b=WGduZoe/uxCWSji1PR7vvtBJvtdtfmCuvb/++GZFy7gr+WzB8lrm/PMJGUZcI9lFGh HyGX+hOJbEcyz+loA0vG5TFNyRG2BSK2B9zYDcdqZhg0sNH86QTT0tpi5HcLLUPShMx0 lYDBOpzkkBCX2PM3dN52vJ++HGnTV/ONpIvZU=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4DDA366E0200007800042C71@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <3E2050B5-59DC-4E4F-9C8D-8C04A6B465EB@xxxxxxxxx> <F85CBA5B-F58C-416A-BF2C-ECE8BC62614F@xxxxxxxxx> <20110520175044.GA30367@xxxxxxxxxxxx> <5D477258-8216-48BD-8A93-186E044118B9@xxxxxxxxx> <4DDA366E0200007800042C71@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

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