xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Haozhong Zhang <haozhong.zhang@intel.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	pengtaox.zhang@intel.com,
	Liu Jinsong <jinsong.liu@alibaba-inc.com>,
	Christoph Egger <chegger@amazon.de>,
	xudong.hao@intel.com, xen-devel@lists.xen.org,
	Andrew Cooper <andrew.cooper3@citrix.com>
Subject: Re: [PATCH v2] x86/mce: handle reserved domain ID in XEN_MC_msrinject
Date: Fri, 27 May 2016 20:35:36 +0800	[thread overview]
Message-ID: <20160527123536.GG3678@hz-desktop.sh.intel.com> (raw)
In-Reply-To: <5748596A02000078000EF355@prv-mh.provo.novell.com>

On 05/27/16 06:27, Jan Beulich wrote:
> >>> On 27.05.16 at 14:13, <haozhong.zhang@intel.com> wrote:
> > --- a/tools/tests/mce-test/tools/xen-mceinj.c
> > +++ b/tools/tests/mce-test/tools/xen-mceinj.c
> > @@ -317,7 +317,9 @@ static int inject_mci_addr(xc_interface *xc_handle,
> >                             domid_t domid)
> >  {
> >      return add_msr_bank_intpose(xc_handle, cpu_nr,
> > -                                MC_MSRINJ_F_INTERPOSE | MC_MSRINJ_F_GPADDR,
> > +                                MC_MSRINJ_F_INTERPOSE |
> > +                                (domid > DOMID_FIRST_RESERVED ?
> 
> Simply by the name of it I would say this ought to be >=. However,
> DOMID_FIRST_RESERVED == DOMID_SELF, so the > seems right
> here (on the hypervisor side it should be changed though). But for
> clarity I would suggest either adding a respective comment or
> indeed using
> 
> 	domid >= DOMID_FIRST_RESERVED && domid != DOMID_SELF
> 
> (which I would hope the compiler can fold).
> 

I'll change on both sides in the next version.

Thanks,
Haozhong

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

      reply	other threads:[~2016-05-27 12:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27 12:13 [PATCH v2] x86/mce: handle reserved domain ID in XEN_MC_msrinject Haozhong Zhang
2016-05-27 12:27 ` Jan Beulich
2016-05-27 12:35   ` Haozhong Zhang [this message]

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=20160527123536.GG3678@hz-desktop.sh.intel.com \
    --to=haozhong.zhang@intel.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chegger@amazon.de \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=pengtaox.zhang@intel.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xudong.hao@intel.com \
    /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).