[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v13 for-xen-4.5 13/21] x86/VPMU: Initialize PMU for PV(H) guests



>>> On 03.10.14 at 23:40, <boris.ostrovsky@xxxxxxxxxx> wrote:
> @@ -490,6 +496,18 @@ static int __init amd_vpmu_init(void)
>          return -EINVAL;
>      }
>  
> +    if ( sizeof(struct xen_pmu_data) +
> +         2 * sizeof(uint64_t) * num_counters > PAGE_SIZE )
> +    {
> +        gdprintk(XENLOG_WARNING,
> +                 "VPMU: Register bank does not fit into VPMU shared page. "
> +                 "VPMU will be disabled\n");

I again doubt this usefully is a gdprintk().

> +        counters = ctrls = NULL;
> +        num_counters = 0;
> +        vpmu_mode = XENPMU_MODE_OFF;
> +        return -ENOSPC;

And I don't think you mean to fail anything here. We currently don't
check the results of initcalls, but if we started to such an error return
could end up preventing the box from coming up.

Jan


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


 


Rackspace

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