From: "Jan Beulich" Subject: Re: [PATCH v2] domctl: fix IRQ permission granting/revocation Date: Fri, 12 Dec 2014 11:03:50 +0000 Message-ID: <548AD9A6020000780004F354@mail.emea.novell.com> References: <548AD05D020000780004F329@mail.emea.novell.com> <548AC83A.6020802@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XzO0o-0001Ib-6t for xen-devel@lists.xenproject.org; Fri, 12 Dec 2014 11:03:54 +0000 In-Reply-To: <548AC83A.6020802@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Keir Fraser , Stefano Stabellini , Ian Jackson , Tim Deegan , Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 12.12.14 at 11:49, wrote: > On 12/12/14 10:24, Jan Beulich wrote: >> Commit 545607eb3c ("x86: fix various issues with handling guest IRQs") >> wasn't really consistent in one respect: The granting of access to an >> IRQ shouldn't assume the pIRQ->IRQ translation to be the same in both >> domains. In fact it is wrong to assume that a translation is already/ >> still in place at the time access is being granted/revoked. >> >> What is wanted is to translate the incoming pIRQ to an IRQ for >> the invoking domain (as the pIRQ is the only notion the invoking >> domain has of the IRQ), and grant the subject domain access to >> the resulting IRQ. >> >> Signed-off-by: Jan Beulich > > Should domain_pirq_to_irq() be using 0 as its default invalid value, > rather than -1? irq 0 is a real irq and could plausibly be wanted to be > passed through to a guest. Not on x86. If another architecture would ever need this, I think we'd need to audit all current users of domain_pirq_to_irq() before doing such a change. Jan