[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] common/vm_event: Initialize vm_event lists on domain creation
On Thu, Aug 24, 2017 at 5:48 AM, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx> wrote: > The patch splits the vm_event into three structures:vm_event_share, > vm_event_paging, vm_event_monitor. The allocation for the > structure is moved to vm_event_enable so that it can be > allocated/init when needed and freed in vm_event_disable. > > Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx> Thanks for doing this patch, I think it improves the code a lot! > @@ -51,8 +51,7 @@ int mem_access_memop(unsigned long cmd, > if ( rc ) > goto out; > Why are you removing setting the rc below? > - rc = -ENODEV; > - if ( unlikely(!d->vm_event->monitor.ring_page) ) > + if ( !d->vm_event_monitor || unlikely(!d->vm_event_monitor->ring_page) ) > goto out; > > switch ( mao.op ) ... > @@ -187,39 +194,45 @@ void vm_event_wake(struct domain *d, struct > vm_event_domain *ved) > vm_event_wake_blocked(d, ved); > } > > -static int vm_event_disable(struct domain *d, struct vm_event_domain *ved) > +static int vm_event_disable(struct domain *d, struct vm_event_domain **ved) > { I think you should check for *ved and *ved->ring_page all in one go below. > - if ( ved->ring_page ) > + if ( !*ved ) > + return 0; > + > + if ( (*ved)->ring_page ) > { > struct vcpu *v; > Thanks, Tamas _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |