From nobody Mon Oct 6 14:39:58 2025 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=1601364104; cv=none; d=zohomail.com; s=zohoarc; b=WZrltUhq90rvJY8lRdNEkQAB/FMY4GGbN8pmXd321uVI4Pv3OmP6ZxW7+j71LsvCRNaXANN/rT341UPaqVuclXWwL2EGW00p8hqEr31uW6HFOWHlhoXuYBuR+dtvAk4lUdE4yqBHtUYJbR9Kt7fLKBUTL82Nsa1bT3XaRyenly0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601364104; 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=ggobvKRt4FkY49FTToc3BsJTkPMkTEyDnNZb0ODAaYk=; b=ONOPbpBD/dyVdK8PBgGKQMkQKxO6ej/owrvwnCSDKYuByncCdg5omSZHqI2ZoT5RghQNdJssTy/Uz+bH4nRMR/hVz4XsuYI10g1Ub5GTwy0mxQDH0XG+wC+/alBhDpvymUAoGtp2034G4fuSGB6zlvvnFBRM4tLkq+9hqVoKePA= 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 1601364104101817.357758127683; Tue, 29 Sep 2020 00:21:44 -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-526-D5XvXIpAO9eSrZeQoZlecg-1; Tue, 29 Sep 2020 03:21:38 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6D0BC420ED; Tue, 29 Sep 2020 07:21:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 627C35578B; Tue, 29 Sep 2020 07:21:30 +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 D7990180B655; Tue, 29 Sep 2020 07:21:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08T7LOhD026890 for ; Tue, 29 Sep 2020 03:21:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2E8821C67F; Tue, 29 Sep 2020 07:21:24 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 298342EF83 for ; Tue, 29 Sep 2020 07:21:22 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (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 EFFF8800296 for ; Tue, 29 Sep 2020 07:21:21 +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-252-zoSkjtbANwOoRbgvAIio-g-1; Tue, 29 Sep 2020 03:21:19 -0400 Received: by mail-wm1-f71.google.com with SMTP id b20so3037409wmj.1 for ; Tue, 29 Sep 2020 00:21:19 -0700 (PDT) Received: from redhat.com (bzq-79-179-71-128.red.bezeqint.net. [79.179.71.128]) by smtp.gmail.com with ESMTPSA id 92sm5021292wra.19.2020.09.29.00.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 00:21:17 -0700 (PDT) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601364102; 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=ggobvKRt4FkY49FTToc3BsJTkPMkTEyDnNZb0ODAaYk=; b=JZesm/iUTnJECRxqOA3gYd3cNcwYrO2IDjXGfn1YfyJQHsimw4OteSCZrFrePFBXKXsrzc AfQgoXsAJGBTliV0E0HMx49H0DxsjEPD4ciKr1fycU45keBE0bZYJ5FJISpVaxaGVNfURN mJ3Qu3stYCw4P14D7Taefij9LUg/DCc= X-MC-Unique: D5XvXIpAO9eSrZeQoZlecg-1 X-MC-Unique: zoSkjtbANwOoRbgvAIio-g-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=ggobvKRt4FkY49FTToc3BsJTkPMkTEyDnNZb0ODAaYk=; b=KepKGoXR00Mfuxhi+Xlpe5wdIugzXSi7aRh7txKu/Ofh3IaehZ5oPebEHC1cbyaEVI xeS9+Xd92V05zLRlI3Ri7vrJvdUxhlW5sLx9dkvX4kPZ2vRUtMkCwc5xi5jHH4gSdhA4 m66wfiS7ZPAp/h0mP6IefSlnCjN9X0CUUnpei3v1hSV8/V/0pW0SGM7iBsMlKBNoFn+7 ogUbLG/4mciPgtBiWSoTHgAlHgLwjNtJy4IIrhrQ6eF94o3ApE975BCTdIgcoPYOFJBz xFdumym5wOUwbrU2U2Q30mIwWK8aGT7JagtwJ69z0xCOIfBjjSzasJyQwqr2gjiMIJbR G44w== X-Gm-Message-State: AOAM532JkuJHrVihtNYsgL1xR31m2hf7vRM39r8PM3z3LDU5pmO9RNGx CEzpxjbqRbgiEyT3VXVmSllZ6+vW9fp43l1WU4R6QGr7sl53MctmT22HBnrHYBXFYf8GRWS7Evh krFF0OTOBaf7HBhD80qc= X-Received: by 2002:a7b:cc8f:: with SMTP id p15mr3015978wma.18.1601364078222; Tue, 29 Sep 2020 00:21:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyATLQQ4w+TYgMfCL/U96xC1WoJ6AA2LacInJsWJVsl0EEzUMdyULWCnGV64Z73a91YAk8TzA== X-Received: by 2002:a7b:cc8f:: with SMTP id p15mr3015934wma.18.1601364077863; Tue, 29 Sep 2020 00:21:17 -0700 (PDT) Date: Tue, 29 Sep 2020 03:21:14 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL v4 09/48] cphp: remove deprecated cpu-add command(s) Message-ID: <20200929071948.281157-10-mst@redhat.com> References: <20200929071948.281157-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200929071948.281157-1-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 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.15 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 56aa1ca335..482d2833f6 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -168,7 +168,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 b2da2c8d2b..c71b02cafd 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -132,7 +132,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 1e2ab5ebe7..50e8317342 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -769,32 +769,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) { @@ -1691,7 +1665,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 17aa74531c..5326141cee 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -272,13 +272,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 @@ -294,12 +287,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 @@ -517,6 +504,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 @@ -526,6 +519,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 27c4bbe0f2..1088d64503 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