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

Re: [Xen-devel] [PATCH v6 03/19] x86/VPMU: Minor VPMU cleanup



>>> On 13.05.14 at 17:53, <boris.ostrovsky@xxxxxxxxxx> wrote:
> Update macros that modify VPMU flags to allow changing multiple bits at once.
> 
> Make sure that we only touch MSR bitmap on HVM guests (both VMX and SVM). 
> This is needed by subsequent PMU patches.

This part is at least questionable - why would these bitmaps not
similarly be used by PVH? And if so, this second change is kind of
a policy one, while the first change is a purely mechanical one. I.e.
I don't think they fit well together into a single patch.

> --- a/xen/arch/x86/hvm/vmx/vpmu_core2.c
> +++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c
> @@ -326,16 +326,14 @@ static int core2_vpmu_save(struct vcpu *v)
>  {
>      struct vpmu_struct *vpmu = vcpu_vpmu(v);
>  
> -    if ( !vpmu_is_set(vpmu, VPMU_CONTEXT_SAVE) )
> -        return 0;
> -
> -    if ( !vpmu_is_set(vpmu, VPMU_CONTEXT_LOADED) ) 
> +    if ( !vpmu_is_set_all(vpmu, VPMU_CONTEXT_SAVE | VPMU_CONTEXT_LOADED) )

Is this really a good name? How about vpmu_are_all_set() or
vpmu_all_set()?

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