From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752256AbdGGRJy (ORCPT ); Fri, 7 Jul 2017 13:09:54 -0400 Received: from foss.arm.com ([217.140.101.70]:49744 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750848AbdGGRJx (ORCPT ); Fri, 7 Jul 2017 13:09:53 -0400 Subject: Re: Problem with commit bf22ff45bed664aefb5c4e43029057a199b7070c To: Juergen Gross , jeffy.chen@rock-chips.com, Linux Kernel Mailing List References: Cc: xen-devel , Thomas Gleixner , Boris Ostrovsky , Konrad Rzeszutek Wilk , Peter Zijlstra From: Marc Zyngier Organization: ARM Ltd Message-ID: <9bcc2acd-1349-a834-c141-921d703c77cb@arm.com> Date: Fri, 7 Jul 2017 18:09:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/07/17 15:51, Juergen Gross wrote: > Commit bf22ff45bed664aefb5c4e43029057a199b7070c ("genirq: Avoid > unnecessary low level irq function calls") breaks Xen guest > save/restore handling. > > The main problem are the PV devices using Xen event channels as > interrupt sources which are represented as an "irq chip" in the kernel. > When saving the guest the event channels are masked internally. At > restore time event channels are re-established and unmasked via > irq_startup(). Unfortunately above commit will let the unmask operation > be a nop as the irq handling doesn't know about the masking done before. > > I have a patch repairing the issue, but I'm not sure if this way to do > it would be accepted. I have exported mask_irq() and I'm doing the > masking now through this function. Would the attached patch be > acceptable? Or is there a better way to solve the problem? The correct API to prevent an interrupt from firing would be disable_irq(), which is much more straightforward and is readily exported. I'm unsure of what the expected flow is though, so there might be some more fixes to be made in your code. Thanks, M. -- Jazz is not dead. It just smells funny...