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

Re: [Xen-devel] [PATCH 3/6] x86/vpmu: Remove core2_no_vpmu_ops



On 11/16/2016 07:31 AM, Andrew Cooper wrote:
> diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c
> index a542f4d..1f822ca 100644
> --- a/xen/arch/x86/cpu/vpmu.c
> +++ b/xen/arch/x86/cpu/vpmu.c
> @@ -136,9 +136,10 @@ int vpmu_do_msr(unsigned int msr, uint64_t *msr_content,
>      const struct arch_vpmu_ops *ops;
>      int ret = 0;
>  
> +    /* Don't leak PMU MSRs to unprivileged domains. */

This was a somewhat incorrect comment originally and since you are
moving it then perhaps it's worth adding something along the lines of
"if VPMU is off or if the privileged domain is profiling whole system".
Otherwise it gives impression that unprivileged domains never access
those MSRs.

-boris

>      if ( likely(vpmu_mode == XENPMU_MODE_OFF) ||
>           ((vpmu_mode & XENPMU_MODE_ALL) &&
> -          !is_hardware_domain(current->domain)) )
> +          !is_hardware_domain(curr->domain)) )
>           goto nop;
>  
>      vpmu = vcpu_vpmu(curr);



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