From: Haozhong Zhang <haozhong.zhang@intel.com>
To: xen-devel@lists.xen.org, Ian Campbell <ian.campbell@citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Christoph Egger <chegger@amazon.de>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Liu Jinsong <jinsong.liu@alibaba-inc.com>,
Keir Fraser <keir@xen.org>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Haozhong Zhang <haozhong.zhang@intel.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH v2 0/4] Fix tools/xen-mceinj to handle >=4GB guest memory
Date: Wed, 16 Sep 2015 13:35:11 +0800 [thread overview]
Message-ID: <1442381715-30893-1-git-send-email-haozhong.zhang@intel.com> (raw)
The existing xen-mceinj can not inject MCE through MSR_MCI_ADDR to a
domain w/ more than 4GB memory, e.g. if domain 0 has more than 4GB
memory, the execution of the command
xen-mceinj -d 0 -t 0 -p 0x2721a900
will fail w/ a message "Failed to get pfn list ffffffff: Operation not
supported".
The cause is that the hypercall XEN_DOMCTL_getmemlist used by
xen-mceinj to translate the guest physical address (argument of '-p')
to the host machine address always fails if the domain has more than
4GB memory due to the mitigation of XSA-74.
This patchset fixes this problem by moving the translation from
xen-mceinj to the hypervisor, so that it is not necessary to use
XEN_DOMCTL_getmemlist.
The first two patches just fix serval code-style issues, while the
other two are the actual fix.
Changes from v1 to v2:
1. The correct trailing whitespaces are kept in patch 1 and 2.
2. Follow Xen code style in this version.
3. Fix several type and macro issues in patch 3.
4. Add a missing "put_gfn()" in patch 3.
5. Update the error messages in patch 3 to include more information.
6. Use parameterized domain id rather than a hardcoded 0 for several
functions in xen-mceinj.c.
7. Update the commit message of patch 4 to explicitly state that the
address translation is moved to the hypervisor.
Haozhong Zhang (4):
x86/mce: Fix code style
tools/xen-mceinj: Fix code style
x86/mce: Translate passed-in GPA to host machine address
tools/xen-mceinj: Pass in GPA when injecting through MSR_MCI_ADDR
tools/tests/mce-test/tools/xen-mceinj.c | 192 ++++++++------------------------
xen/arch/x86/cpu/mcheck/mce.c | 66 ++++++++---
xen/include/public/arch-x86/xen-mca.h | 33 +++---
3 files changed, 120 insertions(+), 171 deletions(-)
--
2.4.8
next reply other threads:[~2015-09-16 5:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 5:35 Haozhong Zhang [this message]
2015-09-16 5:35 ` [PATCH v2 1/4] x86/mce: Fix code style Haozhong Zhang
2015-09-16 8:28 ` Egger, Christoph
2015-09-16 5:35 ` [PATCH v2 2/4] tools/xen-mceinj: " Haozhong Zhang
2015-09-16 7:45 ` Wei Liu
2015-09-16 7:52 ` Haozhong Zhang
2015-09-16 7:56 ` Wei Liu
2015-09-16 7:58 ` Wei Liu
2015-09-16 8:02 ` Haozhong Zhang
2015-09-16 8:42 ` Egger, Christoph
2015-09-16 5:35 ` [PATCH v2 3/4] x86/mce: Translate passed-in GPA to host machine address Haozhong Zhang
2015-09-16 8:27 ` Egger, Christoph
2015-09-16 5:35 ` [PATCH v2 4/4] tools/xen-mceinj: Pass in GPA when injecting through MSR_MCI_ADDR Haozhong Zhang
2015-09-16 8:18 ` Egger, Christoph
2015-09-16 9:42 ` Jan Beulich
2015-09-16 10:40 ` Wei Liu
2015-09-16 10:54 ` [PATCH v2 0/4] Fix tools/xen-mceinj to handle >=4GB guest memory Ian Jackson
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=1442381715-30893-1-git-send-email-haozhong.zhang@intel.com \
--to=haozhong.zhang@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=chegger@amazon.de \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jinsong.liu@alibaba-inc.com \
--cc=keir@xen.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.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).