From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] domctl: fix IRQ permission granting/revocation Date: Wed, 10 Dec 2014 10:12:15 +0000 Message-ID: <1418206335.19809.49.camel@eu.citrix.com> References: <54880D6B020000780004E6AA@mail.emea.novell.com> <1418205196.19809.34.camel@eu.citrix.com> <548827E5020000780004E780@mail.emea.novell.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 1XyeFo-0005mu-Sl for xen-devel@lists.xenproject.org; Wed, 10 Dec 2014 10:12:21 +0000 In-Reply-To: <548827E5020000780004E780@mail.emea.novell.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: Jan Beulich Cc: xen-devel , Tim Deegan , Keir Fraser , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Wed, 2014-12-10 at 10:00 +0000, Jan Beulich wrote: > >>> On 10.12.14 at 10:53, wrote: > > On Wed, 2014-12-10 at 08:07 +0000, 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. > > > > Specifically you need to do the translation using the mapping of the > > domain doing the granting, not the domain being granted too, correct? > > > > It takes a little bit of thought to figure out which domain to check > > here, it would be worth a sentence or two explaining why this is the > > right one. > > Would > > "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." > > make this more clear without being purely redundant with the code? Yes, thanks. Ian.