Re: [Xen-devel] [PATCH for 4.5] x86/VPMU: Clear last_vcpu when destroying VPMU

2014-12-16 Thread Jan Beulich
>>> On 15.12.14 at 18:15, wrote: > On 12/15/2014 05:07 AM, Jan Beulich wrote: > On 12.12.14 at 22:20, wrote: >>> --- a/xen/arch/x86/hvm/vpmu.c >>> +++ b/xen/arch/x86/hvm/vpmu.c >>> @@ -247,10 +247,32 @@ void vpmu_initialise(struct vcpu *v) >>> } >>> } >>> >>> +static void vpmu_clea

Re: [Xen-devel] [PATCH for 4.5] x86/VPMU: Clear last_vcpu when destroying VPMU

2014-12-15 Thread Boris Ostrovsky
On 12/15/2014 05:07 AM, Jan Beulich wrote: On 12.12.14 at 22:20, wrote: --- a/xen/arch/x86/hvm/vpmu.c +++ b/xen/arch/x86/hvm/vpmu.c @@ -247,10 +247,32 @@ void vpmu_initialise(struct vcpu *v) } } +static void vpmu_clear_last(void *arg) +{ +struct vcpu *v = (struct vcpu *)arg; Pl

Re: [Xen-devel] [PATCH for 4.5] x86/VPMU: Clear last_vcpu when destroying VPMU

2014-12-15 Thread Jan Beulich
>>> On 12.12.14 at 22:20, wrote: > --- a/xen/arch/x86/hvm/vpmu.c > +++ b/xen/arch/x86/hvm/vpmu.c > @@ -247,10 +247,32 @@ void vpmu_initialise(struct vcpu *v) > } > } > > +static void vpmu_clear_last(void *arg) > +{ > +struct vcpu *v = (struct vcpu *)arg; Please drop this pointless cas

Re: [Xen-devel] [PATCH for 4.5] x86/VPMU: Clear last_vcpu when destroying VPMU

2014-12-13 Thread Boris Ostrovsky
On 12/13/2014 02:08 PM, Konrad Rzeszutek Wilk wrote: On Fri, Dec 12, 2014 at 04:20:48PM -0500, Boris Ostrovsky wrote: We need to make sure that last_vcpu is not pointing to VCPU whose VPMU is being destroyed. Otherwise we may try dereference it in the future, when VCPU is gone. Signed-off-by: B

Re: [Xen-devel] [PATCH for 4.5] x86/VPMU: Clear last_vcpu when destroying VPMU

2014-12-13 Thread Konrad Rzeszutek Wilk
On Fri, Dec 12, 2014 at 04:20:48PM -0500, Boris Ostrovsky wrote: > We need to make sure that last_vcpu is not pointing to VCPU whose > VPMU is being destroyed. Otherwise we may try dereference it in > the future, when VCPU is gone. > > Signed-off-by: Boris Ostrovsky Release-Acked-by: Konrad Rzes

[Xen-devel] [PATCH for 4.5] x86/VPMU: Clear last_vcpu when destroying VPMU

2014-12-12 Thread Boris Ostrovsky
We need to make sure that last_vcpu is not pointing to VCPU whose VPMU is being destroyed. Otherwise we may try dereference it in the future, when VCPU is gone. Signed-off-by: Boris Ostrovsky --- xen/arch/x86/hvm/vpmu.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletion