[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 Tue, Jul 18, 2017 at 11:33:04AM +0100, Wei Liu wrote:
> On Wed, Jul 12, 2017 at 10:04:40AM +0800, Haozhong Zhang wrote:
> >  
> > +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;
> > +    cpumap = malloc(cpumap_size);
> > +    if ( !cpumap )
> > +        err(xc_handle, "Failed to allocate cpumap\n");
> > +    memset(cpumap, 0, cpumap_size);
> > +    line = cpu / 8;
> > +    shift = cpu % 8;
> > +    memset(cpumap + line, 1 << shift, 1);
> > +
> > +    ret = xc_mca_op_inject_v2(xc_handle, XEN_MC_INJECT_TYPE_LMCE,
> > +                              cpumap, cpumap_size * 8);
> 
> This doesn't compile because XEN_MC_INJECT_TYPE_LMCE is not defined.
> 
> Please rework this patch and make sure it compiles before submitting.

Oh, actually that's my fault. I forgot to pull in your hypervisor
patches.

Sorry for the noise.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.