[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/mce: handle DOMID_XEN properly in XEN_MC_msrinject



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@xxxxxxxxx>
> 
> 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.