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

Re: [Xen-devel] [PATCH v3 14/16] x86/VPMU: Save VPMU state for PV guests during context switch



>>> On 06.01.14 at 20:24, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:
> Save VPMU state during context switch for both HVM and PV guests unless we
> are in PMU privileged mode (i.e. dom0 is doing all profiling).

This description doesn't seem to be in line with ...

> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -1444,17 +1444,15 @@ void context_switch(struct vcpu *prev, struct vcpu 
> *next)
>      }
>  
>      if (prev != next)
> -        update_runstate_area(prev);
> -
> -    if ( is_hvm_vcpu(prev) )
>      {
> -        if (prev != next)
> +        update_runstate_area(prev);
> +        if ( !(vpmu_mode & XENPMU_MODE_PRIV) || prev->domain != dom0 )

... this condition: vpmu_save() is being called when in privileged
mode and the switched out domain is other than Dom0 (yet above
you say all prifiling is done by Dom0 in that mode).

Apart from that - the latter condition likely wants to become
!is_control_domain() to be in line with earlier patches (although,
as can be seem by an earlier similar comment of mine, you aren't
really consistent throughout your patches in the regard, which
needs to be fixed).

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