From: "Jan Beulich" Subject: Re: [PATCH] switch hypercall restart indication from -EAGAIN to -ERESTART Date: Mon, 12 May 2014 15:24:11 +0100 Message-ID: <5370F5AB02000078000117B4@mail.emea.novell.com> References: <5370EDB40200007800011718@mail.emea.novell.com> <1399904027.4428.24.camel@kazak.uk.xensource.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 1Wjr9O-0002tz-5J for xen-devel@lists.xenproject.org; Mon, 12 May 2014 14:24:18 +0000 In-Reply-To: <1399904027.4428.24.camel@kazak.uk.xensource.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: Ian Campbell Cc: Kevin Tian , Keir Fraser , suravee.suthikulpanit@amd.com, Ian Jackson , Eddie Dong , Tim Deegan , StefanoStabellini , JunNakajima , xen-devel , Aravind Gopalakrishnan , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org >>> On 12.05.14 at 16:13, wrote: > On Mon, 2014-05-12 at 14:50 +0100, Jan Beulich wrote: >> -EAGAIN being a return value we want to return to the actual caller in >> a couple of cases makes this unsuitable for restart indication, and x86 >> already developed two cases where -EAGAIN could not be returned as >> intended due to this (which is being fixed here at once). >> >> Signed-off-by: Jan Beulich > > Acked-by: Ian Campbell > Two comments: > > I notice some existing ERESTART's in xen/drivers/passthrough/iommu.c -- > is that a problem or do the adjustments here take that into account? Yes, these were independent of the other call trees and hence I already used to new error code there when adding that code. > This struck me as odd: > >> @@ -590,6 +590,8 @@ int domain_kill(struct domain *d) >> rc = domain_relinquish_resources(d); >> if ( rc != 0 ) >> { >> + if ( rc == -ERESTART ) >> + rc = -EAGAIN; > > until I realised that you intended for ERESTART to only be used > internally within the hypervisor and not to be exposed to the guest. > Perhaps insert the word "internal" into the Subject? Good idea, done. Jan