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

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

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

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

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-16  5:35 [PATCH v2 0/4] Fix tools/xen-mceinj to handle >=4GB guest memory Haozhong Zhang
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.