[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 4/5] xen/domain: Allocate d->vcpu[] earlier during domain_create()
>>> On 12.11.18 at 17:16, <andrew.cooper3@xxxxxxxxxx> wrote: > The ARM code has a chicken-and-egg problem. One of the vGIC_v3 emulations > wants to know d->max_vcpus to be able to size itself appropriately, but the > current order of initialisation requires the vGIC to be set up before the > requested number of vcpus can be checked. > > Move the range checking of config->max_vcpus into sanitise_domain_config() > path, which allows for the allocation of d->vcpu[] and d->max_vcpus to happen > earlier during create, and in particular, before the call to > arch_domain_create(). > > The x86 side is fairly easy, and implements the logical equivalent of > domain_max_vcpus() but using XEN_DOMCTL_CDF_hvm_guest rather than > is_hvm_domain(). > > For the ARM side, re-purpose vgic_max_vcpus() to take a domctl vGIC version, > and return the maximum number of supported vCPUs, reusing 0 for "version not > supported". To avoid exporting the vgic_ops structures (which are in the > process of being replaced), hard code the upper limits. > > This allows for the removal of the domain_max_vcpus() infrastructure, which is > done to prevent it being reused incorrectly in the future. > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Non-Arm bits Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |