mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
X86-MCE: fix a bug of xen-mceinj tool
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>
This commit is contained in:
1 parent
3494ff3292
commit
9ff59ff119
1 file changed
+5
-1
@@ -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;
|
||||
|
||||