xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix tools/xen-mceinj to handle >=4GB guest memory
@ 2015-09-15  8:29 Haozhong Zhang
  2015-09-15  8:29 ` [PATCH 1/4] x86/mce: Fix code style Haozhong Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Haozhong Zhang @ 2015-09-15  8:29 UTC (permalink / raw)
  To: xen-devel
  Cc: Haozhong Zhang, Wei Liu, Ian Campbell, Stefano Stabellini,
	Liu Jinsong, Christoph Egger, Ian Jackson, Jan Beulich,
	Andrew Cooper, Keir Fraser

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.

Haozhong Zhang (4):
  x86/mce: Fix code style
  tools/mceinject: 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 | 141 +++++---------------------------
 xen/arch/x86/cpu/mcheck/mce.c           |  43 ++++++++--
 xen/include/public/arch-x86/xen-mca.h   |  31 +++----
 3 files changed, 77 insertions(+), 138 deletions(-)

--
2.4.8

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2015-09-16  0:38 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15  8:29 [PATCH 0/4] Fix tools/xen-mceinj to handle >=4GB guest memory Haozhong Zhang
2015-09-15  8:29 ` [PATCH 1/4] x86/mce: Fix code style Haozhong Zhang
2015-09-15  8:47   ` Egger, Christoph
2015-09-15 13:13   ` Jan Beulich
2015-09-15 13:19     ` Haozhong Zhang
2015-09-15  8:29 ` [PATCH 2/4] tools/mceinject: " Haozhong Zhang
2015-09-15  8:48   ` Egger, Christoph
2015-09-15 10:15     ` Ian Campbell
2015-09-15 13:11   ` Wei Liu
2015-09-15  8:29 ` [PATCH 3/4] x86/mce: Translate passed-in GPA to host machine address Haozhong Zhang
2015-09-15  9:14   ` Egger, Christoph
2015-09-15  9:48     ` Haozhong Zhang
2015-09-15 13:24   ` Jan Beulich
2015-09-15 13:42     ` Haozhong Zhang
2015-09-15 13:47       ` Jan Beulich
2015-09-15 13:51         ` Haozhong Zhang
2015-09-15 13:50       ` Andrew Cooper
2015-09-16  0:38         ` Haozhong Zhang
2015-09-15  8:29 ` [PATCH 4/4] tools/xen-mceinj: Pass in GPA when injecting through MSR_MCI_ADDR Haozhong Zhang
2015-09-15 10:02   ` Wei Liu
2015-09-15 10:08     ` Egger, Christoph
2015-09-15 10:16       ` Wei Liu
2015-09-15 10:17   ` Egger, Christoph
2015-09-15 10:28     ` Haozhong Zhang
2015-09-15 10:34       ` Egger, Christoph
2015-09-15 10:20   ` Ian Campbell
2015-09-15 10:38     ` Haozhong Zhang

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).