[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 11/20] xen/domctl: Merge set_gnttab_limits into createdomain
>>> On 19.03.18 at 20:13, <andrew.cooper3@xxxxxxxxxx> wrote: > --- a/xen/common/domctl.c > +++ b/xen/common/domctl.c > @@ -539,14 +539,37 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) > u_domctl) > break; > } > > + /* Stash the new domid for the toolstack. */ > + op->domain = d->domain_id; > + copyback = true; > + > d->max_evtchn_port = > min_t(unsigned int, op->u.createdomain.max_evtchn_port, INT_MAX); > > - ret = 0; > - op->domain = d->domain_id; > - copyback = 1; > + ret = grant_table_set_limits(d, op->u.createdomain.max_grant_frames, > + op->u.createdomain.max_maptrack_frames); > + if ( !ret ) > + goto createdomain_fail_late; > + > d = NULL; > break; > + > + createdomain_fail_late: > + /* > + * We've hit an error after putting the domain into the domain list, > + * meaning that other entities in the system can refer to it. > + * > + * Unwinding is substantially more complicated, and without > + * returning success, the toolstack wont know to clean up. > + * > + * Reuse the continuation logic to turn this hypercall into a > + * destroydomain on behalf of the toolstack. > + */ > + op->cmd = XEN_DOMCTL_destroydomain; > + d = NULL; > + > + ret = hypercall_create_continuation(__HYPERVISOR_domctl, "h", > u_domctl); > + break; > } Nice idea, but what exactly is the reason you can't do this before inserting the domain into the list? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |