From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen/arm: implement GICD_ICACTIVER read/write Date: Mon, 30 Nov 2015 13:59:27 +0000 Message-ID: <565C563F.6030505@citrix.com> References: <1448469640-27663-1-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448469640-27663-1-git-send-email-stefano.stabellini@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini , xen-devel@lists.xensource.com Cc: ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Stefano, On 25/11/15 16:40, Stefano Stabellini wrote: > Implement GICD_ICACTIVER and GICD_ISACTIVER reads by looking for the > GIC_IRQ_GUEST_ACTIVE bit in the relevant struct pending_irq. However > given that the pending to active transaction for irqs in LRs in done in > hardware, the GIC_IRQ_GUEST_ACTIVE bit might be out of date. We'll have > to live with that. Looking to the Linux tree again, I found this commit: commit 1c7d4dd46ee048afe19e1294634df6fa66862519 Author: Marc Zyngier Date: Mon Nov 16 19:13:28 2015 +0000 irqchip/gic: Add save/restore of the active state When using EOImode==1, we may mark interrupts as being forwarded to a virtual machine. In that case, the interrupt is left active while being passed to the VM. If we suspend the system before the VM has deactivated the interrupt, the active state will be lost (which may be very annoying, as this may result in spurious interrupts and a confused guest). To avoid this, save and restore the active state together with the rest of the GIC registers. Signed-off-by: Marc Zyngier Cc: Cc: Jason Cooper Cc: Russell King Link: http://lkml.kernel.org/r/1447701208-18150-5-git-send-email-marc.zyngier@arm.com Signed-off-by: Thomas Gleixner So, we have to handle properly active/deactivate in order to get suspend/resume working correctly. Regards, -- Julien Grall