From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] libxl: Don't ignore error when we fail to give access to ioport/irq Date: Fri, 09 Jan 2015 14:25:01 +0000 Message-ID: <54AFE4BD.1080207@linaro.org> References: <1420811662-18465-1-git-send-email-julien.grall@linaro.org> <20150109141517.GA32179@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Y9aVI-0001tt-3F for xen-devel@lists.xenproject.org; Fri, 09 Jan 2015 14:25:32 +0000 Received: by mail-wg0-f47.google.com with SMTP id n12so8382061wgh.6 for ; Fri, 09 Jan 2015 06:25:30 -0800 (PST) In-Reply-To: <20150109141517.GA32179@zion.uk.xensource.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: Wei Liu Cc: xen-devel@lists.xenproject.org, Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Hi Wei, On 09/01/15 14:15, Wei Liu wrote: > On Fri, Jan 09, 2015 at 01:54:22PM +0000, Julien Grall wrote: >> If we fail to give the access, the domain will unlikely work correctly. >> So we should bail out at the first error. >> >> Signed-off-by: Julien Grall >> Cc: Ian Jackson >> Cc: Stefano Stabellini >> Cc: Ian Campbell >> Cc: Wei Liu >> >> --- >> This patch is candidate for a backport for at least Xen 4.4 and Xen 4.5. > > The handling of io mem has same issue. You may also want to fix that? I forgot this one. I will fix in the next version. > Also do you need to clean up (revoke permission) the ports, irqs and io > mems that have already been assigned? We don't need to clean up ioport/irqs/iomems. It's already done implicitly when the domain is destroyed. > I presume that's done when domain > is destroyed? If domain destroyed doesn't correctly revoke the permission that would mean the code is buggy in the normal behavior. Regards, -- Julien Grall