xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, He Chen <he.chen@linux.intel.com>
Cc: wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com,
	andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
	xen-devel@lists.xenproject.org, chao.p.peng@linux.intel.com,
	keir@xen.org
Subject: Re: [PATCH v4 3/4] tools: add tools support for Intel CDP
Date: Thu, 24 Sep 2015 13:07:42 +0100	[thread overview]
Message-ID: <1443096462.25250.7.camel@citrix.com> (raw)
In-Reply-To: <5603FFB302000078000A5446@prv-mh.provo.novell.com>

On Thu, 2015-09-24 at 05:50 -0600, Jan Beulich wrote:
> > > > On 24.09.15 at 13:00, <ian.campbell@citrix.com> wrote:
> > On Thu, 2015-09-17 at 17:35 +0800, He Chen wrote:
> > > diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c
> > > index 3378239..62963cf 100644
> > > --- a/tools/libxl/libxl_psr.c
> > > +++ b/tools/libxl/libxl_psr.c
> > > @@ -87,6 +87,9 @@ static void libxl__psr_cat_log_err_msg(libxl__gc
> > > *gc,
> > > int err)
> > >      case EEXIST:
> > >          msg = "The same CBM is already set to this domain";
> > >          break;
> > > +    case EINVAL:
> > > +        msg = "Unable to set code or data CBM when CDP is disabled";
> > > +        break;
> > 
> > These overloading of the errno values are getting a bit thinly
> > stretched.
> > The more so that EINVAL has a widely used more generic meaning.
> > 
> > Hypervisor maintainers, what is your opinion of this?
> > 
> > Since this is a sysctl I suppose we could consider adding a new PSR
> > specific error type with appropriate codes?
> 
> I'd prefer using recognizable -E... values;

_If_ the -E values somehow map sensibly onto the PSR errors, otherwise they
aren't really recognisable any more.

>  a specific error type
> to me seems to go too far. Surely out of the several dozen
> possibilities a handful of not-so-common ones can be picked?

I was thinking in particular EINVAL was not in the not-so-common bracket.

The current code already uses 9 values FWIW.

Ian.

  reply	other threads:[~2015-09-24 12:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  9:35 [PATCH v4 0/4] detect and initialize CDP (Code/Data Prioritization) feature He Chen
2015-09-17  9:35 ` [PATCH v4 1/4] x86: Support enable CDP by boot parameter and add get CDP status He Chen
2015-09-17 10:20   ` Andrew Cooper
2015-09-24 15:57   ` Jan Beulich
2015-09-17  9:35 ` [PATCH v4 2/4] x86: add domctl cmd to set/get CDP code/data CBM He Chen
2015-09-17 10:25   ` Andrew Cooper
2015-09-17  9:35 ` [PATCH v4 3/4] tools: add tools support for Intel CDP He Chen
2015-09-17 10:38   ` Andrew Cooper
2015-09-24 10:56     ` Ian Campbell
2015-09-24 10:57     ` Ian Campbell
2015-09-24 11:12       ` Andrew Cooper
2015-09-24 11:00   ` Ian Campbell
2015-09-24 11:50     ` Jan Beulich
2015-09-24 12:07       ` Ian Campbell [this message]
2015-09-24 12:20         ` Jan Beulich
2015-09-24 12:31           ` Ian Campbell
2015-09-24 11:07   ` Ian Campbell
2015-09-24 11:22     ` Ian Campbell
2015-09-25  9:04       ` He Chen
2015-09-25  9:19         ` Ian Campbell
2015-09-25  8:43     ` He Chen
2015-09-25  9:18       ` Ian Campbell
2015-09-25  9:53         ` He Chen
2015-09-25 10:30           ` Ian Campbell
2015-09-17  9:35 ` [PATCH v4 4/4] docs: add document to introduce CDP command He Chen
2015-09-24 11:22   ` Ian Campbell
2015-09-24 11:53     ` Jan Beulich
2015-09-25  9:29     ` He Chen
2015-09-25  9:58       ` Ian Campbell
2015-09-25 10:16         ` He Chen
2015-09-25 10:38           ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1443096462.25250.7.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=he.chen@linux.intel.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).