xcp-1.6-updates/xen-4.1.hg

changeset 23205:e2af3c4e4c1d

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>
xen-unstable changeset: 24429:9587ccc2ae31
xen-unstable date: Sun Dec 18 14:40:00 2011 +0000
author Liu, Jinsong <jinsong.liu@intel.com>
date Sun Dec 18 14:48:28 2011 +0000 (2011-12-18)
parents 6ccf1820fb94
children 14dbd6be46c8
files tools/tests/mce-test/tools/xen-mceinj.c
line diff
     1.1 --- a/tools/tests/mce-test/tools/xen-mceinj.c	Sun Dec 18 14:47:23 2011 +0000
     1.2 +++ b/tools/tests/mce-test/tools/xen-mceinj.c	Sun Dec 18 14:48:28 2011 +0000
     1.3 @@ -134,8 +134,12 @@ static int mca_cpuinfo(xc_interface *xc_
     1.4  {
     1.5      struct xen_mc mc;
     1.6  
     1.7 +    memset(&mc, 0, sizeof(struct xen_mc));
     1.8 +
     1.9      mc.cmd = XEN_MC_physcpuinfo;
    1.10 -    if (xc_mca_op(xc_handle, &mc))
    1.11 +    mc.interface_version = XEN_MCA_INTERFACE_VERSION;
    1.12 +
    1.13 +    if (!xc_mca_op(xc_handle, &mc))
    1.14          return mc.u.mc_physcpuinfo.ncpus;
    1.15      else
    1.16          return 0;