From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] xen: do not loose level interrupt notifications Date: Thu, 27 Oct 2011 12:18:45 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , Stefan Bader , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 27/10/2011 11:37, "Stefano Stabellini" wrote: > PV on HVM guests can loose level interrupts coming from emulated > devices: we are missing code to retry to inject a pirq in the guest if > it corresponds to a level interrupt and the interrupt has been raised > while the guest is servicing the first one. > > The same thing could also happen with PV guests, including dom0, even > though it is much more unlikely. In case of PV guests the scenario would > be the following: > > 1) a device raises a level interrupt and xen injects it into the > guest; > > 2) the guest is temporarely stuck: it does not ack it or eoi it; > > 3) the xen timer kicks in and eois the interrupt; > > 4) the device thinks it is all fine and sends a second interrupt; > > 5) Xen fails to inject the second interrupt into the guest because the > guest has still the event channel pending bit set; > > at this point the guest looses the second interrupt notification, that > is not supposed to happen with level interrupts and it might cause > problems with some devices. You can't really lose a level-triggered interrupt. In step (4) the device isn't really actively involved in sending another interrupt -- it never deasserted its INTx line, and nor will it until the guest's ISR quenches the interrupt at the device. If the guest misses such an interrupt, and doesn't execute the relevant ISR when it should, then another interrupt will simply be raised by the interrupt controller when the guest does finally EOI the interrupt. Because the device is *still* asserting the line. Well, that's the PV case anyway. I don't see any problem with our handling of the PV case. Is PV-HVM so different? -- Keir