[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 12/20] xen/domctl: Merge max_vcpus into createdomain
> On 19. Mar 2018, at 19:13, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote: > > XEN_DOMCTL_max_vcpus is a mandatory hypercall, but nothing actually prevents a > toolstack from unpausing a domain with no vcpus. > > Originally, d->vcpus[] was an embedded array in struct domain, but c/s > fb442e217 "x86_64: allow more vCPU-s per guest" in Xen 4.0 altered it to being > dynamically allocated. A side effect of this is that d->vcpu[] is NULL until > XEN_DOMCTL_max_vcpus has completed, but a lot of hypercalls blindly > dereference it. > > Even today, the behaviour of XEN_DOMCTL_max_vcpus is a mandatory singleton > call which can't change the number of vcpus once a value has been chosen. > Therefore, delete XEN_DOMCTL_max_vcpus (including XSM hooks and toolstack > wrappers) and retain the functionality in XEN_DOMCTL_createdomain. > > This will allow future cleanup to ensure that d->vcpus[] is always valid for a > locatable domain, and allow simplification of some creation logic which needs > to size domain-wide objects based on max_cpus, which currently have to be > deferred until vcpu construction. > > For the python stubs, extend the domain_create keyword list to take a > max_vcpus parameter, in lieu of deleting the pyxc_domain_max_vcpus function. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |