|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 3/8] libxl: Replace deprecated "cpu-add" QMP command by "device_add"
On Fri, Apr 23, 2021 at 12:16 PM Anthony PERARD
<anthony.perard@xxxxxxxxxx> wrote:
>
> The command "cpu-add" for CPU hotplug is deprecated and has been
> removed from QEMU 6.0 (April 2021). We need to add cpus with the
> command "device_add" now.
>
> In order to find out which parameters to pass to "device_add" we first
> make a call to "query-hotpluggable-cpus" which list the cpus drivers
> and properties.
>
> The algorithm to figure out which CPU to add, and by extension if any
> CPU needs to be hotplugged, is in the function that adds the cpus.
> Because of that, the command "query-hotpluggable-cpus" is always
> called, even when not needed.
>
> In case we are using a version of QEMU older than 2.7 (Sept 2016)
> which don't have "query-hotpluggable-cpus", we fallback to using
> "cpu-add".
>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
> tools/libs/light/libxl_domain.c | 87 ++++++++++++++++++++++++++++++++-
> 1 file changed, 85 insertions(+), 2 deletions(-)
>
> diff --git a/tools/libs/light/libxl_domain.c b/tools/libs/light/libxl_domain.c
> index 8c003aa7cb04..e130deb0757f 100644
> --- a/tools/libs/light/libxl_domain.c
> +++ b/tools/libs/light/libxl_domain.c
> +
> +/* Fallback function for QEMU older than 2.7, when
> + * 'query-hotpluggable-cpus' wasn't available and vcpu object couldn't be
> + * added with 'device_add'. */
> +static void set_vcpuonline_qmp_add_cpu(libxl__egc *egc, libxl__ev_qmp *qmp,
> + const libxl__json_object *response,
> + int rc) { STATE_AO_GC(qmp->ao);
STATE_AO_GC should be on a new line.
With that,
Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx>
Thanks,
Jason
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |