projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3494ff3
)
X86-MCE: fix a bug of xen-mceinj tool
author
Liu, Jinsong
<jinsong.liu@intel.com>
Sun, 18 Dec 2011 14:40:00 +0000
(14:40 +0000)
committer
Liu, Jinsong
<jinsong.liu@intel.com>
Sun, 18 Dec 2011 14:40:00 +0000
(14:40 +0000)
Fix a bug of xen-mceinj tool which used to test mce by software way.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
tools/tests/mce-test/tools/xen-mceinj.c
patch
|
blob
|
history
diff --git
a/tools/tests/mce-test/tools/xen-mceinj.c
b/tools/tests/mce-test/tools/xen-mceinj.c
index 1ca5c8c03c69eb8a81eb004401eba24515515ae7..4d72fe82ad5ca7f1c25ea6f6caa8be0866d777b4 100644
(file)
--- a/
tools/tests/mce-test/tools/xen-mceinj.c
+++ b/
tools/tests/mce-test/tools/xen-mceinj.c
@@
-134,8
+134,12
@@
static int mca_cpuinfo(xc_interface *xc_handle)
{
struct xen_mc mc;
+ memset(&mc, 0, sizeof(struct xen_mc));
+
mc.cmd = XEN_MC_physcpuinfo;
- if (xc_mca_op(xc_handle, &mc))
+ mc.interface_version = XEN_MCA_INTERFACE_VERSION;
+
+ if (!xc_mca_op(xc_handle, &mc))
return mc.u.mc_physcpuinfo.ncpus;
else
return 0;