From nobody Thu Apr 18 12:41:29 2024 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=1600069602; cv=none; d=zohomail.com; s=zohoarc; b=ZtobrM4QP5NNIvmNcQIkbH5oSxlfQB5HiIKBx/8uEHMTqlRg1EN/wvQmNrInjmIv/KdEURIxGwW1thQ8nw/jvbvg8twsznqI5ZvWGzW7o3pfsf//rxWo4sTi6sIg9yr5RuSP7Z/9aBjp865HBe/5IkApn+rJkOPMPNoYg4xiNwQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600069602; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=SwPAO+rg7pKczjzT3R9rurtdQIjo8Hhv/hosHLEgbtE=; b=NVrZzwpguKM4o2ZVKYd8QYlLZiiP68XnukONxc5iNM0Qvc9/322w+iVGyVPMeY4+gg1m4+37A38rsxi3TS1CsiHPl8o3Dn5GQw6dzqadBYTsRX9537+ee8n2leostTY+26BhMDYApYx0ymV9DRpD4G0PwIwbiYXQ3RqC4trAeuQ= 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 1600069602939772.7853975061225; Mon, 14 Sep 2020 00:46:42 -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-424-ZFjtq_LdN_WbU7tCqZRR4w-1; Mon, 14 Sep 2020 03:46:39 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8BD5564083; Mon, 14 Sep 2020 07:46:31 +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 2102F100EBA4; Mon, 14 Sep 2020 07:46:31 +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 A9CA78C7BF; Mon, 14 Sep 2020 07:46:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08E7kRpJ006935 for ; Mon, 14 Sep 2020 03:46:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id 533787B7AE; Mon, 14 Sep 2020 07:46:27 +0000 (UTC) Received: from dell-r430-03.lab.eng.brq.redhat.com (dell-r430-03.lab.eng.brq.redhat.com [10.37.153.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 114077B7B0; Mon, 14 Sep 2020 07:46:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600069601; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SwPAO+rg7pKczjzT3R9rurtdQIjo8Hhv/hosHLEgbtE=; b=aHWIPA4nmAqACF1gDtCu0FYp4K4Rl2pKI3gibQNpEaxJbleiAK+GawG1YYbccxCWwpEkaf yy6xbjAAYvMzn2NiT0ede5ybsCvYIeAzGu13QWyDNJUfWQXo19SKXqT3jwZXieE41if/Dy rOxkHIadNKdgJOMDqvDzrg/VMiKyBeA= X-MC-Unique: ZFjtq_LdN_WbU7tCqZRR4w-1 From: Igor Mammedov To: qemu-devel@nongnu.org Subject: [PATCH v2] cphp: remove deprecated cpu-add command(s) Date: Mon, 14 Sep 2020 03:46:14 -0400 Message-Id: <20200914074614.973112-1-imammedo@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: lvivier@redhat.com, thuth@redhat.com, ehabkost@redhat.com, mst@redhat.com, libvir-list@redhat.com, cohuck@redhat.com, david@redhat.com, dgilbert@redhat.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, pbonzini@redhat.com, rth@twiddle.net 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.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" theses 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 Acked-by: Cornelia Huck Reviewed-by: Michal Privoznik --- include/hw/boards.h | 1 - include/hw/i386/pc.h | 1 - include/monitor/hmp.h | 1 - docs/system/deprecated.rst | 25 +++++---- hmp-commands.hx | 15 ------ 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 ----- qapi/machine.json | 24 --------- tests/qtest/cpu-plug-test.c | 100 ++++-------------------------------- tests/qtest/test-hmp.c | 1 - 13 files changed, 21 insertions(+), 211 deletions(-) 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 421a77acc2..79b7ab17bc 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -135,7 +135,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/docs/system/deprecated.rst b/docs/system/deprecated.rst index a158e765c3..c43c53f432 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 @@ -521,6 +508,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 @@ -530,6 +523,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?", 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 d11daacc23..d071da787b 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 rtc_set_cpus_count(ISADevice *rtc, uint16_t cpus_count) { if (cpus_count > 0xff) { @@ -1966,7 +1940,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 33fa035fb7..8ce7dda464 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/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/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)); - - data2->machine =3D g_strdup(data->machine); - data2->device_model =3D g_strdup(data->device_model); =20 - 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", --=20 2.27.0