aboutsummaryrefslogtreecommitdiffstats
path: root/tools/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tests')
-rw-r--r--tools/tests/mce-test/tools/xen-mceinj.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/tests/mce-test/tools/xen-mceinj.c b/tools/tests/mce-test/tools/xen-mceinj.c
index 1ca5c8c03c..4d72fe82ad 100644
--- 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;