From: Wei Liu Subject: Re: [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured Date: Fri, 11 Sep 2015 15:11:53 +0100 Message-ID: <20150911141153.GM1695@zion.uk.xensource.com> References: <1441896651-24735-1-git-send-email-wei.liu2@citrix.com> <1441896651-24735-3-git-send-email-wei.liu2@citrix.com> <1441901457.24450.392.camel@citrix.com> <20150910161515.GG1695@zion.uk.xensource.com> <1441904015.3549.5.camel@citrix.com> <20150910170526.GH1695@zion.uk.xensource.com> <1441968648.3549.19.camel@citrix.com> <1441977677.3549.30.camel@citrix.com> <20150911134308.GK1695@zion.uk.xensource.com> <1441979947.3549.40.camel@citrix.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 1ZaP3V-0004iz-3C for xen-devel@lists.xenproject.org; Fri, 11 Sep 2015 14:11:57 +0000 Content-Disposition: inline In-Reply-To: <1441979947.3549.40.camel@citrix.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: Ian Campbell Cc: Xen-devel , Wei Liu , Ian Jackson , andrew.cooper3@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, Sep 11, 2015 at 02:59:07PM +0100, Ian Campbell wrote: > On Fri, 2015-09-11 at 14:43 +0100, Wei Liu wrote: > > On Fri, Sep 11, 2015 at 02:21:17PM +0100, Ian Campbell wrote: > > > On Fri, 2015-09-11 at 11:50 +0100, Ian Campbell wrote: > > > > But "is d->vnuma" corresponds to there being vnuma config for the > > > > domain. > > > > > > We discussed this IRL and concluded that we should stop trying to > > > differentiate "no vnuma configuration" from "has empty vnuma > > > configuration". > > > > > > So this code should raise this error if xc_domain_getvnuma returns > > > anything > > > other than rc == -1 && errno == XEN_EOPNOTSUPP. So the check is > > > > > > if ( rc != -1 || errno != XEN_EOPNOTSUPP ) > > > > > > > To be precise, this should be > > > > if ( rc != -1 || errno == XEN_EOPNOTSUPP ) > > > > (your if expression contradicts what you said) > > I don't think it did, but they are inverses of each other, due to the > "other than" wording in the prose. > errno == OPNOTSUPP errno != OPNOTSUPP > rc >=0 ??? Some vnuma config > rc ==-1 No vnuma config(*) Some other error > > (*) is the only situation which is allowed, which is what I described in > the text. > > But the if needs to reject the other 3 cases, so it is in the inverse test. > rc != -1 covers the top row, and errno != OPNOTSUPP covers the second > column, if either are true then we do not want to proceed. > Oh, right, I misinterpreted your expression. Sorry for the noise. Wei. > Ian.