xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Haozhong Zhang <haozhong.zhang@intel.com>
To: "Egger, Christoph" <chegger@amazon.de>
Cc: Liu Jinsong <jinsong.liu@alibaba-inc.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] x86/mce: handle DOMID_XEN properly in XEN_MC_msrinject
Date: Thu, 26 May 2016 16:03:48 +0800	[thread overview]
Message-ID: <20160526080348.GB3678@hz-desktop.sh.intel.com> (raw)
In-Reply-To: <431900e7-909a-82d5-31fe-a633f4416da1@amazon.de>

On 05/26/16 09:15, Egger, Christoph wrote:
> On 26/05/16 03:07, Haozhong Zhang wrote:
> > Commit 26646f3 "x86/mce: translate passed-in GPA to host machine
> > address" forgot to consider dom_xen, which fails tools/xen-mceinj when
> > it's going to inject into domain DOMID_XEN (e.g. when -d option is not
> > used) via XEN_MC_msrinject. Use dom_xen when the domain id DOMID_XEN is
> > passed in.
> > 
> > Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
> 
> Why not also consider DOMID_IO, DOMID_COW, DOMID_INVALID ?
> In "nature" a memory error can happen everywhere anytime.
>

This is to align to the original behavior before commit 26646f3 and a
later commit 4ddf474 "tools/xen-mceinj: Pass in GPA when injecting
through MSR_MCI_ADDR", which only supported injecting MCE of address
belonging to domains whose id is <= DOMID_FIRST_RESERVED (0x7FF0) or
DOMID_XEN (0x7FF2).

And I just found the fix in this patch is invalid. If a domain id >
DOMID_FIRST_RESERVED is passed, XEN_MC_msrinject should ensure that
MC_MSRINJ_F_GPADDR is not set in mc_msrinject->mcinj_flags and treat
the address passed-in as machine physical address (i.e. skip the
address translation in XEN_MCE_msrinject). In this way, DOMID_XEN,
DOMID_COW and DOMID_INVALID can be handled properly.

Thanks,
Haozhong

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

      reply	other threads:[~2016-05-26  8:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  1:07 [PATCH] x86/mce: handle DOMID_XEN properly in XEN_MC_msrinject Haozhong Zhang
2016-05-26  7:15 ` Egger, Christoph
2016-05-26  8:03   ` 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=20160526080348.GB3678@hz-desktop.sh.intel.com \
    --to=haozhong.zhang@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chegger@amazon.de \
    --cc=jbeulich@suse.com \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=xen-devel@lists.xen.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).