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

Re: [Xen-devel] [PATCH v18 15/16] x86/VPMU: VPMU should not exist when vpmu_initialise() is called



>>> On 16.02.15 at 23:26, <boris.ostrovsky@xxxxxxxxxx> wrote:
> We don't need to try to destroy it since it can't be already allocated at the
> time we try to initialize it.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
>  xen/arch/x86/hvm/vpmu.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/vpmu.c b/xen/arch/x86/hvm/vpmu.c
> index cdead13..fa34127 100644
> --- a/xen/arch/x86/hvm/vpmu.c
> +++ b/xen/arch/x86/hvm/vpmu.c
> @@ -480,10 +480,8 @@ void vpmu_initialise(struct vcpu *v)
>      BUILD_BUG_ON(sizeof(struct xen_pmu_regs) > XENPMU_REGS_PAD_SZ);
>      BUILD_BUG_ON(sizeof(struct compat_pmu_regs) > XENPMU_REGS_PAD_SZ);
>  
> -    if ( vpmu_is_set(vpmu, VPMU_CONTEXT_ALLOCATED) )
> -        vpmu_destroy(v);
> -    vpmu_clear(vpmu);
> -    vpmu->context = NULL;
> +    ASSERT(!vpmu->flags && !vpmu->context);
> +

If this is legitimately a separate patch, it would seem to belong at
the beginning of the series. Otherwise it should be integrated into
whatever patch arranges for this no longer being possible.

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