From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4 3/4] tools: add tools support for Intel CDP Date: Fri, 25 Sep 2015 10:19:20 +0100 Message-ID: <1443172760.25250.80.camel@citrix.com> References: <1442482536-12024-1-git-send-email-he.chen@linux.intel.com> <1442482536-12024-4-git-send-email-he.chen@linux.intel.com> <1443092847.10338.283.camel@citrix.com> <1443093767.10338.293.camel@citrix.com> <20150925090432.GB12290@HE> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZfPA5-00077Y-1i for xen-devel@lists.xenproject.org; Fri, 25 Sep 2015 09:19:25 +0000 In-Reply-To: <20150925090432.GB12290@HE> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: He Chen Cc: wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, jbeulich@suse.com, chao.p.peng@linux.intel.com, xen-devel@lists.xenproject.org, keir@xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2015-09-25 at 17:04 +0800, He Chen wrote: > On Thu, Sep 24, 2015 at 12:22:47PM +0100, Ian Campbell wrote: > > On Thu, 2015-09-24 at 12:07 +0100, Ian Campbell wrote: > > > @@ -8517,8 +8535,19 @@ int main_psr_cat_cbm_set(int argc, char > > > **argv) > > > > libxl_string_list_dispose(&socket_list); > > > > free(value); > > > > break; > > > > + case 'd': > > > > + type = LIBXL_PSR_CBM_TYPE_L3_DATA; > > > > + opt_data = 1; > > > > + break; > > > > + case 'c': > > > > + type = LIBXL_PSR_CBM_TYPE_L3_CODE; > > > > + opt_code = 1; > > > > + break; > > > > } > > > > > > > > + if (opt_data && opt_code) > > > > > > Do you not mean !opt_data && !opt_code? > > > > > > But also, isn't this assignment unnecessary since type is initialised > > > to > > > the same value when it is declared? > > > > > > In fact, because of that initialisation, aren't opt_data and opt_code > > > unnecessary, since you set type appropriately elsewhere. > > > > > > Are -d and -c mutually exclusive, or is it expected that both can be > > > given? > > > > Also, is there error checking for passing -c or -d when CDP is not > > enabled > > somewhere else? > > > > Ian. > > Yes, there is error checking in hypervisor. > hypervisor would reture an error code if -c or -d is given when CDP is > not enable. > > In fact, the reture error code would be catched by > `libxl__psr_cat_log_err_msg`, and that is exactly what you and Jan > discussed in Patch 3. Great, thanks.