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

Re: [Xen-devel] [PATCH v6 18/29] xen/x86: allow disabling the emulated pmu



>>> On 04.09.15 at 14:08, <roger.pau@xxxxxxxxxx> wrote:

Hmm - this seems questionable to me: Isn't the vPMU an optional
feature anyway? I.e. doesn't need separate handling here? Boris?

Jan

> Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> Changes since v4:
>  - Add Andrew Cooper Acked-by.
> ---
>  xen/arch/x86/cpu/vpmu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c
> index 8af3df1..d5bb77d 100644
> --- a/xen/arch/x86/cpu/vpmu.c
> +++ b/xen/arch/x86/cpu/vpmu.c
> @@ -439,6 +439,9 @@ void vpmu_initialise(struct vcpu *v)
>      int ret;
>      bool_t is_priv_vpmu = is_hardware_domain(v->domain);
>  
> +    if ( !has_vpmu(v->domain) )
> +        return;
> +
>      BUILD_BUG_ON(sizeof(struct xen_pmu_intel_ctxt) > XENPMU_CTXT_PAD_SZ);
>      BUILD_BUG_ON(sizeof(struct xen_pmu_amd_ctxt) > XENPMU_CTXT_PAD_SZ);
>      BUILD_BUG_ON(sizeof(struct xen_pmu_regs) > XENPMU_REGS_PAD_SZ);
> -- 
> 1.9.5 (Apple Git-50.3)



_______________________________________________
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®.