From nobody Thu Nov 6 12:14:11 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1540903202049986.6940826389216; Tue, 30 Oct 2018 05:40:02 -0700 (PDT) Received: from localhost ([::1]:52968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHTJQ-0001ws-Nq for importer@patchew.org; Tue, 30 Oct 2018 08:40:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHTFS-0006Cw-AO for qemu-devel@nongnu.org; Tue, 30 Oct 2018 08:35:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHTFJ-0002o1-7g for qemu-devel@nongnu.org; Tue, 30 Oct 2018 08:35:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54848) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gHTFI-0002k0-Sy for qemu-devel@nongnu.org; Tue, 30 Oct 2018 08:35:45 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B0CF530AAD8A for ; Tue, 30 Oct 2018 12:35:43 +0000 (UTC) Received: from paraplu.localdomain (ovpn-112-33.ams2.redhat.com [10.36.112.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id F27C06046B; Tue, 30 Oct 2018 12:35:39 +0000 (UTC) From: Kashyap Chamarthy To: qemu-devel@nongnu.org Date: Tue, 30 Oct 2018 13:35:25 +0100 Message-Id: <20181030123526.26415-3-kchamart@redhat.com> In-Reply-To: <20181030123526.26415-1-kchamart@redhat.com> References: <20181030123526.26415-1-kchamart@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 30 Oct 2018 12:35:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 2/3] Deprecate HMP `cpu-add` X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, ehabkost@redhat.com, Kashyap Chamarthy , armbru@redhat.com, imammedo@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Since we're deprecating the QMP `cpu-add`, let's deprecate its HMP equivalent, too. Suggested-by: Thomas Huth Signed-off-by: Kashyap Chamarthy --- hmp-commands.hx | 6 ++++-- hmp.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index db0c681f74..ba71558c25 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1849,14 +1849,16 @@ ETEXI .name =3D "cpu-add", .args_type =3D "id:i", .params =3D "id", - .help =3D "add cpu", + .help =3D "add cpu (deprecated, use device_add instead)", .cmd =3D hmp_cpu_add, }, =20 STEXI @item cpu-add @var{id} @findex cpu-add -Add CPU with id @var{id} +Add CPU with id @var{id}. This command is deprecated, please ++use @code{device_add} instead. For details, refer to +'docs/cpu-hotplug.rst'. ETEXI =20 { diff --git a/hmp.c b/hmp.c index 4975fa56b0..c3f3db7795 100644 --- a/hmp.c +++ b/hmp.c @@ -2353,6 +2353,8 @@ void hmp_cpu_add(Monitor *mon, const QDict *qdict) int cpuid; Error *err =3D NULL; =20 + 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); --=20 2.17.1