[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 7/7] tools/xen-mceinj: add support of injecting LMCE
On Thu, Jul 13, 2017 at 10:10:05AM +0800, Haozhong Zhang wrote: > On 07/12/17 09:26 -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Jul 12, 2017 at 10:04:40AM +0800, Haozhong Zhang wrote: > > > If option '-l' or '--lmce' is specified and the host supports LMCE, > > > xen-mceinj will inject LMCE to CPU specified by '-c' (or CPU0 if '-c' > > > is not present). > > > > > > Signed-off-by: Haozhong Zhang <haozhong.zhang@xxxxxxxxx> > > > Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> > > > --- > > > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > > > Cc: Wei Liu <wei.liu2@xxxxxxxxxx> > > > --- > > > tools/tests/mce-test/tools/xen-mceinj.c | 50 > > > +++++++++++++++++++++++++++++++-- > > > 1 file changed, 48 insertions(+), 2 deletions(-) > > > > > > diff --git a/tools/tests/mce-test/tools/xen-mceinj.c > > > b/tools/tests/mce-test/tools/xen-mceinj.c > > > index bae5a46eb5..380e42190c 100644 > > > --- a/tools/tests/mce-test/tools/xen-mceinj.c > > > +++ b/tools/tests/mce-test/tools/xen-mceinj.c > [..] > > > > > > +static int inject_lmce(xc_interface *xc_handle, unsigned int cpu) > > > +{ > > > + uint8_t *cpumap = NULL; > > > + size_t cpumap_size, line, shift; > > > + unsigned int nr_cpus; > > > + int ret; > > > + > > > + nr_cpus = mca_cpuinfo(xc_handle); > > > + if ( !nr_cpus ) > > > + err(xc_handle, "Failed to get mca_cpuinfo"); > > > + if ( cpu >= nr_cpus ) > > > + err(xc_handle, "-c %u is larger than %u", cpu, nr_cpus - 1); > > > + > > > + cpumap_size = (nr_cpus + 7) / 8; > > > > bitmap_size > > > > IIUC, these bitmap_* functions/macros are libxc internals and should > not be used here. > Correct. Those aren't available to external users. If we want to export those we would need to add libxc_ prefix. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |