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

Re: [Xen-devel] [PATCH 2/8] viridian: separately allocate domain and vcpu structures



> -----Original Message-----
> From: Wei Liu [mailto:wei.liu2@xxxxxxxxxx]
> Sent: 02 January 2019 15:55
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Jan Beulich <jbeulich@xxxxxxxx>;
> Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Wei Liu <wei.liu2@xxxxxxxxxx>;
> Roger Pau Monne <roger.pau@xxxxxxxxxx>
> Subject: Re: [PATCH 2/8] viridian: separately allocate domain and vcpu
> structures
> 
> On Thu, Dec 20, 2018 at 04:33:39PM +0000, Paul Durrant wrote:
> >
> >  void viridian_vcpu_deinit(struct vcpu *v)
> >  {
> > -    viridian_synic_wrmsr(v, HV_X64_MSR_VP_ASSIST_PAGE, 0);
> > +    if ( !v->arch.hvm.viridian )
> > +        return;
> > +
> > +    if ( is_viridian_vcpu(v) )
> > +        viridian_synic_wrmsr(v, HV_X64_MSR_VP_ASSIST_PAGE, 0);
> > +
> > +    xfree(v->arch.hvm.viridian);
> > +    v->arch.hvm.viridian = NULL;
> 
> Please use XFREE() here and below.

Ooh, I didn't know about that bit of macro magic.

> 
> With it fixed:
> 
> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

Thanks,

  Paul

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.