[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
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>
- From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
- Date: Tue, 20 Mar 2018 15:27:40 -0400
- Cc: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Jon Ludlam <jonathan.ludlam@xxxxxxxxxxxxx>, Rob Hoes <Rob.Hoes@xxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, David Scott <dave@xxxxxxxxxx>
- Delivery-date: Tue, 20 Mar 2018 19:27:50 +0000
- Ironport-phdr: 9a23:KJg9UhZ/NhqWxC6XmHef9LD/LSx+4OfEezUN459isYplN5qZpsi7Yx7h7PlgxGXEQZ/co6odzbaO6Oa4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahb75+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v9LlgRgP2hygbNj456GDXhdJ2jKJHuxKquhhzz5fJbI2JKPZye6XQct0ARWpFQ81fSSpPDI2hZIcLFuYNI/pUo4z7qlATrxWxGBOsCfvyxDFWiH/43a403eovHg7J3gMvA90AvW/IrNj3LqoeTfy5wafKwDjFcvhY2S396I/Nch05r/+DR7RwccvPxkkrCgjLgEufopHkMTOPzOsCqWab5PdnWO2yhG4oth9+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hJoKa2EyFNBay+Y3ZfoN73SMGby5hWvZLTM2l7A09ab4aYP6PImq1XipwGpF1Et83F53NlJ03uc55PKDAUJUZL1SEk47AJ2qK3dYik4tMvo0ihFN6WuvyCK8NUuHOY/gkKpedtFPbzCHwj1C8AAXOClKfAwmkjvZRUBaqQaxKMyes+rafaCkPq7MeAlkD+4gGBv5IFmzlnK5yd6DOnS0MBW7euf216rXjH9gVPpns2/tppNbD9aSmawxSXrHod5erx5fYFND3ynZcKw2IMt1NbWR3dE+Qv7VBs908izdE/XNgal0A==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 03/19/2018 03:13 PM, Andrew Cooper 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: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|