From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752539AbdGGRIu (ORCPT ); Fri, 7 Jul 2017 13:08:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:43147 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751032AbdGGRIt (ORCPT ); Fri, 7 Jul 2017 13:08:49 -0400 Subject: Re: Problem with commit bf22ff45bed664aefb5c4e43029057a199b7070c To: Thomas Gleixner Cc: jeffy.chen@rock-chips.com, Linux Kernel Mailing List , xen-devel , Boris Ostrovsky , Konrad Rzeszutek Wilk , Marc Zyngier , Peter Zijlstra References: From: Juergen Gross Message-ID: Date: Fri, 7 Jul 2017 19:08:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US 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 18:41, Thomas Gleixner wrote: > On Fri, 7 Jul 2017, 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. > > Rightfully so. Making assumptions about the inner workings of core code is > always wrong. That was my thought, too. :-) >> 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? > > Without looking at the patch (too lazy to fiddle with attachments right > now), this is definitely wrong. I'll have a look later tonight. Thank you very much Juergen