From nobody Mon Feb 9 11:30:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1600687840; cv=none; d=zohomail.com; s=zohoarc; b=NdYA+yWhguigYuKyd2YlZdvL8pVatI9SKzBeF38dkhPAh2BcbPxj/ef//hsrpPnNaSAZwRrL21yc13HX/zwjpe3ri10p+qaVURkxEU3Uh0Jy8HIVGyEfjmKfbImQMyFRjIh5K4DWK0hxFTRmEZ4piZNFp0ZTnaTjbICL4k1lXwY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600687840; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p+UkMbHw7A0wZD6E1HsNyZ5qPFAY5u5AZjBJxMTg5x8=; b=S6u7cPPY6YuAMAq75OZUygIFm53inAH75C0si11ToXb8MJvu7rqAVBcBmQsqPcISgwCQaZ9alzCLdEG8pP7btF7sxOfTyt9ufdaenisJEDEj3d9NA/3j/i01cJJQzWk0pASQGy6pPgyhL4bx2ucilb+v/G16mW85MvFopMsHXJ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1600687840188361.0176876658601; Mon, 21 Sep 2020 04:30:40 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-288-kF7DRGyVNSmn655stJ3Xog-1; Mon, 21 Sep 2020 07:30:36 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D5D11091078; Mon, 21 Sep 2020 11:30:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D89045D9E4; Mon, 21 Sep 2020 11:30:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5A8388C7CA; Mon, 21 Sep 2020 11:30:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08LBUMLu009255 for ; Mon, 21 Sep 2020 07:30:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 83BC62142F49; Mon, 21 Sep 2020 11:30:22 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7F1CF2142F4B for ; Mon, 21 Sep 2020 11:30:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D484101AA41 for ; Mon, 21 Sep 2020 11:30:19 +0000 (UTC) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-361-DbEK9sXbMY2TMjbsisf72g-1; Mon, 21 Sep 2020 07:30:17 -0400 Received: by mail-wm1-f71.google.com with SMTP id a7so3628241wmc.2 for ; Mon, 21 Sep 2020 04:30:17 -0700 (PDT) Received: from redhat.com (bzq-109-65-116-225.red.bezeqint.net. [109.65.116.225]) by smtp.gmail.com with ESMTPSA id s80sm19361197wme.41.2020.09.21.04.30.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 04:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600687838; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=p+UkMbHw7A0wZD6E1HsNyZ5qPFAY5u5AZjBJxMTg5x8=; b=bp/iR75rJpFXQ6AeTdr851ZDHvuPVWbgVMCC01hdFnJCe8GcrB4JtMGrFxT88VxkeWhVnE sj3Sws6FiOnccfJctPCYDtrcDvZjJIr6z5Ycleg5FH/t1CjPLUZHsgcj8j4f+ygt5SL2uk Vq9TaYRSCzNMz5E5OmnID7P0oyMgoEE= X-MC-Unique: kF7DRGyVNSmn655stJ3Xog-1 X-MC-Unique: DbEK9sXbMY2TMjbsisf72g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=p+UkMbHw7A0wZD6E1HsNyZ5qPFAY5u5AZjBJxMTg5x8=; b=HURc0z+uykGPqI4IVjEJ7JQjbSjUF28i3iKiN+3Fp9jh62GBe/l4SScRTmQnhtFo4u 69dmvDu+qTMz74R9VYzJsLl8MqHv7AdpqQxQhjnrCntg/wAQp4V+JAn8ikhgdzmCM9hf GWmgpISTlI6n7iwzNemomIvssg27D/ukpzY0HWVETgmdkGnlLj5ioZWHmljZApRJHdYO /E8KGhQZs+4MqByL0I9Fm8Q5Yfu/wO2CAZcf0y1dG/UVnsRTIGPAj7mQT7oVR5HydBmX oqM5MOJH4MSOZCDTmHlH0H096+CF0+cb2/nYWxuaQ0t+vneJOytqCI6CowY3C71CDNgr Rbkg== X-Gm-Message-State: AOAM5337+9JdC6sgtaZoJV9EN86GsrTsxoGvGVtUYx+ZZXDpwbgS5YZF ZKTSJ/aR5dx2U2UU5U67tGuZsXUG7dWu0/g20u9P1ZVeKl5dGN52GYWFRNEh4eo9ogtQBn9bfKF sZ1+Pqi8FXVV7Y+P8CP4= X-Received: by 2002:adf:fd90:: with SMTP id d16mr52269832wrr.52.1600687815854; Mon, 21 Sep 2020 04:30:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcXi3hl34PcrzExFIpTlVMKSF30AxmFIDkVa0VYHJtIwbiJAIIJ8Zz0YUoaT5c4KC2VjLyrg== X-Received: by 2002:adf:fd90:: with SMTP id d16mr52269786wrr.52.1600687815480; Mon, 21 Sep 2020 04:30:15 -0700 (PDT) Date: Mon, 21 Sep 2020 07:30:12 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v3 13/15] cphp: remove deprecated cpu-add command(s) Message-ID: <20200921112913.555392-14-mst@redhat.com> References: <20200921112913.555392-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200921112913.555392-1-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Eduardo Habkost , David Hildenbrand , libvir-list@redhat.com, Michal Privoznik , Cornelia Huck , "Dr . David Alan Gilbert" , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, Marcel Apfelbaum , Paolo Bonzini , Igor Mammedov , Richard Henderson X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Igor Mammedov These were deprecated since 4.0, remove both HMP and QMP variants. Users should use device_add command instead. To get list of possible CPUs and options, use 'info hotpluggable-cpus' HMP or query-hotpluggable-cpus QMP command. Signed-off-by: Igor Mammedov Reviewed-by: Thomas Huth Acked-by: Dr. David Alan Gilbert Reviewed-by: Michal Privoznik Acked-by: Cornelia Huck Message-Id: <20200915120403.1074579-1-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- qapi/machine.json | 24 --------- include/hw/boards.h | 1 - include/hw/i386/pc.h | 1 - include/monitor/hmp.h | 1 - hw/core/machine-hmp-cmds.c | 12 ----- hw/core/machine-qmp-cmds.c | 12 ----- hw/i386/pc.c | 27 ---------- hw/i386/pc_piix.c | 1 - hw/s390x/s390-virtio-ccw.c | 12 ----- tests/qtest/cpu-plug-test.c | 100 ++++-------------------------------- tests/qtest/test-hmp.c | 1 - docs/system/deprecated.rst | 25 +++++---- hmp-commands.hx | 15 ------ 13 files changed, 21 insertions(+), 211 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 0ac1880e4a..d8ed096e9a 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -307,30 +307,6 @@ ## { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] } =20 -## -# @cpu-add: -# -# Adds CPU with specified ID. -# -# @id: ID of CPU to be created, valid values [0..max_cpus) -# -# Features: -# @deprecated: This command is deprecated. Use `device_add` instead. -# See the `query-hotpluggable-cpus` command for details. -# -# Returns: Nothing on success -# -# Since: 1.5 -# -# Example: -# -# -> { "execute": "cpu-add", "arguments": { "id": 2 } } -# <- { "return": {} } -# -## -{ 'command': 'cpu-add', 'data': {'id': 'int'}, - 'features': [ 'deprecated' ] } - ## # @MachineInfo: # diff --git a/include/hw/boards.h b/include/hw/boards.h index 795910d01b..7abd5d889c 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -169,7 +169,6 @@ struct MachineClass { void (*init)(MachineState *state); void (*reset)(MachineState *state); void (*wakeup)(MachineState *state); - void (*hot_add_cpu)(MachineState *state, const int64_t id, Error **err= p); int (*kvm_type)(MachineState *machine, const char *arg); void (*smp_parse)(MachineState *ms, QemuOpts *opts); =20 diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c14e14dfe0..be42fe3599 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -134,7 +134,6 @@ extern int fd_bootchk; =20 void pc_acpi_smi_interrupt(void *opaque, int irq, int level); =20 -void pc_hot_add_cpu(MachineState *ms, const int64_t id, Error **errp); void pc_smp_parse(MachineState *ms, QemuOpts *opts); =20 void pc_guest_info_init(PCMachineState *pcms); diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index c986cfd28b..642e9e91f9 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -89,7 +89,6 @@ void hmp_chardev_add(Monitor *mon, const QDict *qdict); void hmp_chardev_change(Monitor *mon, const QDict *qdict); void hmp_chardev_remove(Monitor *mon, const QDict *qdict); void hmp_chardev_send_break(Monitor *mon, const QDict *qdict); -void hmp_cpu_add(Monitor *mon, const QDict *qdict); void hmp_object_add(Monitor *mon, const QDict *qdict); void hmp_object_del(Monitor *mon, const QDict *qdict); void hmp_info_memdev(Monitor *mon, const QDict *qdict); diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c index 39999c47c5..f4092b98cc 100644 --- a/hw/core/machine-hmp-cmds.c +++ b/hw/core/machine-hmp-cmds.c @@ -46,18 +46,6 @@ void hmp_info_cpus(Monitor *mon, const QDict *qdict) qapi_free_CpuInfoFastList(cpu_list); } =20 -void hmp_cpu_add(Monitor *mon, const QDict *qdict) -{ - int cpuid; - Error *err =3D NULL; - - error_report("cpu_add is deprecated, please use device_add instead"); - - cpuid =3D qdict_get_int(qdict, "id"); - qmp_cpu_add(cpuid, &err); - hmp_handle_error(mon, err); -} - void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict) { Error *err =3D NULL; diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 21551221ad..5362c80a18 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -284,18 +284,6 @@ HotpluggableCPUList *qmp_query_hotpluggable_cpus(Error= **errp) return machine_query_hotpluggable_cpus(ms); } =20 -void qmp_cpu_add(int64_t id, Error **errp) -{ - MachineClass *mc; - - mc =3D MACHINE_GET_CLASS(current_machine); - if (mc->hot_add_cpu) { - mc->hot_add_cpu(current_machine, id, errp); - } else { - error_setg(errp, "Not supported"); - } -} - void qmp_set_numa_node(NumaOptions *cmd, Error **errp) { if (!runstate_check(RUN_STATE_PRECONFIG)) { diff --git a/hw/i386/pc.c b/hw/i386/pc.c index b55369357e..5e1911fba0 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -777,32 +777,6 @@ void pc_smp_parse(MachineState *ms, QemuOpts *opts) } } =20 -void pc_hot_add_cpu(MachineState *ms, const int64_t id, Error **errp) -{ - X86MachineState *x86ms =3D X86_MACHINE(ms); - int64_t apic_id =3D x86_cpu_apic_id_from_index(x86ms, id); - Error *local_err =3D NULL; - - if (id < 0) { - error_setg(errp, "Invalid CPU id: %" PRIi64, id); - return; - } - - if (apic_id >=3D ACPI_CPU_HOTPLUG_ID_LIMIT) { - error_setg(errp, "Unable to add CPU: %" PRIi64 - ", resulting APIC ID (%" PRIi64 ") is too large", - id, apic_id); - return; - } - - - x86_cpu_new(X86_MACHINE(ms), apic_id, &local_err); - if (local_err) { - error_propagate(errp, local_err); - return; - } -} - static void pc_machine_done(Notifier *notifier, void *data) { @@ -1699,7 +1673,6 @@ static void pc_machine_class_init(ObjectClass *oc, vo= id *data) mc->auto_enable_numa_with_memdev =3D true; mc->has_hotpluggable_cpus =3D true; mc->default_boot_order =3D "cad"; - mc->hot_add_cpu =3D pc_hot_add_cpu; mc->smp_parse =3D pc_smp_parse; mc->block_default_type =3D IF_IDE; mc->max_cpus =3D 255; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 6f3e78bb60..2d8413a0ce 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -752,7 +752,6 @@ static void pc_i440fx_1_4_machine_options(MachineClass = *m) { pc_i440fx_1_5_machine_options(m); m->hw_version =3D "1.4.0"; - m->hot_add_cpu =3D NULL; compat_props_add(m->compat_props, pc_compat_1_4, pc_compat_1_4_len); } =20 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 3106bbea33..28266a3a35 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -553,17 +553,6 @@ static HotplugHandler *s390_get_hotplug_handler(Machin= eState *machine, return NULL; } =20 -static void s390_hot_add_cpu(MachineState *machine, - const int64_t id, Error **errp) -{ - ObjectClass *oc; - - g_assert(machine->possible_cpus->cpus[0].cpu); - oc =3D OBJECT_CLASS(CPU_GET_CLASS(machine->possible_cpus->cpus[0].cpu)= ); - - s390x_new_cpu(object_class_get_name(oc), id, errp); -} - static void s390_nmi(NMIState *n, int cpu_index, Error **errp) { CPUState *cs =3D qemu_get_cpu(cpu_index); @@ -604,7 +593,6 @@ static void ccw_machine_class_init(ObjectClass *oc, voi= d *data) s390mc->hpage_1m_allowed =3D true; mc->init =3D ccw_init; mc->reset =3D s390_machine_reset; - mc->hot_add_cpu =3D s390_hot_add_cpu; mc->block_default_type =3D IF_VIRTIO; mc->no_cdrom =3D 1; mc->no_floppy =3D 1; diff --git a/tests/qtest/cpu-plug-test.c b/tests/qtest/cpu-plug-test.c index e8ffbbce4b..a1c689414b 100644 --- a/tests/qtest/cpu-plug-test.c +++ b/tests/qtest/cpu-plug-test.c @@ -25,54 +25,6 @@ struct PlugTestData { }; typedef struct PlugTestData PlugTestData; =20 -static void test_plug_with_cpu_add(gconstpointer data) -{ - const PlugTestData *s =3D data; - char *args; - QDict *response; - unsigned int i; - - args =3D g_strdup_printf("-machine %s -cpu %s " - "-smp 1,sockets=3D%u,cores=3D%u,threads=3D%u,ma= xcpus=3D%u", - s->machine, s->cpu_model, - s->sockets, s->cores, s->threads, s->maxcpus); - qtest_start(args); - - for (i =3D 1; i < s->maxcpus; i++) { - response =3D qmp("{ 'execute': 'cpu-add'," - " 'arguments': { 'id': %d } }", i); - g_assert(response); - g_assert(!qdict_haskey(response, "error")); - qobject_unref(response); - } - - qtest_end(); - g_free(args); -} - -static void test_plug_without_cpu_add(gconstpointer data) -{ - const PlugTestData *s =3D data; - char *args; - QDict *response; - - args =3D g_strdup_printf("-machine %s -cpu %s " - "-smp 1,sockets=3D%u,cores=3D%u,threads=3D%u,ma= xcpus=3D%u", - s->machine, s->cpu_model, - s->sockets, s->cores, s->threads, s->maxcpus); - qtest_start(args); - - response =3D qmp("{ 'execute': 'cpu-add'," - " 'arguments': { 'id': %d } }", - s->sockets * s->cores * s->threads); - g_assert(response); - g_assert(qdict_haskey(response, "error")); - qobject_unref(response); - - qtest_end(); - g_free(args); -} - static void test_plug_with_device_add(gconstpointer data) { const PlugTestData *td =3D data; @@ -144,36 +96,13 @@ static void add_pc_test_case(const char *mname) data->cores =3D 3; data->threads =3D 2; data->maxcpus =3D data->sockets * data->cores * data->threads; - if (g_str_has_suffix(mname, "-1.4") || - (strcmp(mname, "pc-1.3") =3D=3D 0) || - (strcmp(mname, "pc-1.2") =3D=3D 0) || - (strcmp(mname, "pc-1.1") =3D=3D 0) || - (strcmp(mname, "pc-1.0") =3D=3D 0)) { - path =3D g_strdup_printf("cpu-plug/%s/init/%ux%ux%u&maxcpus=3D%u", - mname, data->sockets, data->cores, - data->threads, data->maxcpus); - qtest_add_data_func_full(path, data, test_plug_without_cpu_add, - test_data_free); - g_free(path); - } else { - PlugTestData *data2 =3D g_memdup(data, sizeof(PlugTestData)); =20 - data2->machine =3D g_strdup(data->machine); - data2->device_model =3D g_strdup(data->device_model); - - path =3D g_strdup_printf("cpu-plug/%s/cpu-add/%ux%ux%u&maxcpus=3D%= u", - mname, data->sockets, data->cores, - data->threads, data->maxcpus); - qtest_add_data_func_full(path, data, test_plug_with_cpu_add, - test_data_free); - g_free(path); - path =3D g_strdup_printf("cpu-plug/%s/device-add/%ux%ux%u&maxcpus= =3D%u", - mname, data2->sockets, data2->cores, - data2->threads, data2->maxcpus); - qtest_add_data_func_full(path, data2, test_plug_with_device_add, - test_data_free); - g_free(path); - } + path =3D g_strdup_printf("cpu-plug/%s/device-add/%ux%ux%u&maxcpus=3D%u= ", + mname, data->sockets, data->cores, + data->threads, data->maxcpus); + qtest_add_data_func_full(path, data, test_plug_with_device_add, + test_data_free); + g_free(path); } =20 static void add_pseries_test_case(const char *mname) @@ -205,7 +134,7 @@ static void add_pseries_test_case(const char *mname) static void add_s390x_test_case(const char *mname) { char *path; - PlugTestData *data, *data2; + PlugTestData *data; =20 if (!g_str_has_prefix(mname, "s390-ccw-virtio-")) { return; @@ -220,21 +149,10 @@ static void add_s390x_test_case(const char *mname) data->threads =3D 1; data->maxcpus =3D data->sockets * data->cores * data->threads; =20 - data2 =3D g_memdup(data, sizeof(PlugTestData)); - data2->machine =3D g_strdup(data->machine); - data2->device_model =3D g_strdup(data->device_model); - - path =3D g_strdup_printf("cpu-plug/%s/cpu-add/%ux%ux%u&maxcpus=3D%u", + path =3D g_strdup_printf("cpu-plug/%s/device-add/%ux%ux%u&maxcpus=3D%u= ", mname, data->sockets, data->cores, data->threads, data->maxcpus); - qtest_add_data_func_full(path, data, test_plug_with_cpu_add, - test_data_free); - g_free(path); - - path =3D g_strdup_printf("cpu-plug/%s/device-add/%ux%ux%u&maxcpus=3D%u= ", - mname, data2->sockets, data2->cores, - data2->threads, data2->maxcpus); - qtest_add_data_func_full(path, data2, test_plug_with_device_add, + qtest_add_data_func_full(path, data, test_plug_with_device_add, test_data_free); g_free(path); } diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c index aea1384bac..94a8023173 100644 --- a/tests/qtest/test-hmp.c +++ b/tests/qtest/test-hmp.c @@ -27,7 +27,6 @@ static const char *hmp_cmds[] =3D { "chardev-change testchardev1 ringbuf", "chardev-remove testchardev1", "commit all", - "cpu-add 1", "cpu 0", "device_add ?", "device_add usb-mouse,id=3Dmouse1", diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 0cb8b01424..cc31d79177 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -284,13 +284,6 @@ The ``query-cpus`` command is replaced by the ``query-= cpus-fast`` command. The ``arch`` output member of the ``query-cpus-fast`` command is replaced by the ``target`` output member. =20 -``cpu-add`` (since 4.0) -''''''''''''''''''''''' - -Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``. See -documentation of ``query-hotpluggable-cpus`` for additional -details. - ``query-events`` (since 4.0) '''''''''''''''''''''''''''' =20 @@ -306,12 +299,6 @@ the 'wait' field, which is only applicable to sockets = in server mode Human Monitor Protocol (HMP) commands ------------------------------------- =20 -``cpu-add`` (since 4.0) -''''''''''''''''''''''' - -Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``. See -documentation of ``query-hotpluggable-cpus`` for additional details. - ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (= since 4.0.0) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= '''''''''''' =20 @@ -529,6 +516,12 @@ QEMU Machine Protocol (QMP) commands The "autoload" parameter has been ignored since 2.12.0. All bitmaps are automatically loaded from qcow2 images. =20 +``cpu-add`` (removed in 5.2) +'''''''''''''''''''''''''''' + +Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``. See +documentation of ``query-hotpluggable-cpus`` for additional details. + Human Monitor Protocol (HMP) commands ------------------------------------- =20 @@ -538,6 +531,12 @@ The ``hub_id`` parameter of ``hostfwd_add`` / ``hostfw= d_remove`` (removed in 5.0 The ``[hub_id name]`` parameter tuple of the 'hostfwd_add' and 'hostfwd_remove' HMP commands has been replaced by ``netdev_id``. =20 +``cpu-add`` (removed in 5.2) +'''''''''''''''''''''''''''' + +Use ``device_add`` for hotplugging vCPUs instead of ``cpu-add``. See +documentation of ``query-hotpluggable-cpus`` for additional details. + Guest Emulator ISAs ------------------- =20 diff --git a/hmp-commands.hx b/hmp-commands.hx index 60f395c276..d1e3e0e1c6 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1761,21 +1761,6 @@ SRST Executes a qemu-io command on the given block device. ERST =20 - { - .name =3D "cpu-add", - .args_type =3D "id:i", - .params =3D "id", - .help =3D "add cpu (deprecated, use device_add instead)", - .cmd =3D hmp_cpu_add, - }, - -SRST -``cpu-add`` *id* - Add CPU with id *id*. This command is deprecated, please - +use ``device_add`` instead. For details, refer to - 'docs/cpu-hotplug.rst'. -ERST - { .name =3D "qom-list", .args_type =3D "path:s?", --=20 MST