From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Peng Subject: Re: [PATCH for-4.5] xl: correct test condition on libxl_domain_info Date: Thu, 13 Nov 2014 09:01:21 +0800 Message-ID: <20141113010121.GA3106@pengc-linux.bj.intel.com> References: <1415790358-16787-1-git-send-email-wei.liu2@citrix.com> <1415790652.29592.3.camel@citrix.com> <20141112152207.GF6017@laptop.dumpdata.com> Reply-To: Chao Peng Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20141112152207.GF6017@laptop.dumpdata.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: Konrad Rzeszutek Wilk Cc: Ian Jackson , Dongxiao Xu , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Nov 12, 2014 at 10:22:07AM -0500, Konrad Rzeszutek Wilk wrote: > On Wed, Nov 12, 2014 at 11:10:52AM +0000, Ian Campbell wrote: > > CCing the folks who signed-of-by is on the original patch > > > > On Wed, 2014-11-12 at 11:05 +0000, Wei Liu wrote: > > > The `if' statement considered return value 0 from libxl_domain_info an > > > error, while 0 actually means success. > > > > > > Signed-off-by: Wei Liu > > > > Acked-by: Ian Campbell > > > > > Cc: Ian Jackson > > > --- > > > This is a bug fix for PSR feature. This feature was added recently and it's > > > not an regression. However, it would be good to have it working correctly > > > since the beginning, and the fix is straightforward, which should be of > > > very low risk. > > > > Ack. > > I concur and I think it should go in Xen 4.5, but I would like their > input first. Yeah, I'd like it to go in. Thanks Wei for your quick fix. Chao > > > > > > --- > > > tools/libxl/xl_cmdimpl.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > > index 3c9f146..9afef3f 100644 > > > --- a/tools/libxl/xl_cmdimpl.c > > > +++ b/tools/libxl/xl_cmdimpl.c > > > @@ -7908,7 +7908,7 @@ static int psr_cmt_show_cache_occupancy(uint32_t domid) > > > /* Each domain */ > > > if (domid != INVALID_DOMID) { > > > libxl_dominfo dominfo; > > > - if (!libxl_domain_info(ctx, &dominfo, domid)) { > > > + if (libxl_domain_info(ctx, &dominfo, domid)) { > > > fprintf(stderr, "Failed to get domain info for %d\n", domid); > > > return -1; > > > } > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel