From patchwork Tue Oct 30 12:35:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kashyap Chamarthy X-Patchwork-Id: 10660855 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D58CE1932 for ; Tue, 30 Oct 2018 12:37:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8958293A5 for ; Tue, 30 Oct 2018 12:37:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACBCA29663; Tue, 30 Oct 2018 12:37:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5B20C293A5 for ; Tue, 30 Oct 2018 12:37:14 +0000 (UTC) Received: from localhost ([::1]:52958 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHTGj-0007Ju-Qo for patchwork-qemu-devel@patchwork.kernel.org; Tue, 30 Oct 2018 08:37:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHTFK-00060O-Tv for qemu-devel@nongnu.org; Tue, 30 Oct 2018 08:35:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHTFI-0002lh-Ok for qemu-devel@nongnu.org; Tue, 30 Oct 2018 08:35:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53802) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gHTFG-0002ZC-EW for qemu-devel@nongnu.org; Tue, 30 Oct 2018 08:35:43 -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 60DBF65871 for ; Tue, 30 Oct 2018 12:35:38 +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 071046046B; Tue, 30 Oct 2018 12:35:33 +0000 (UTC) From: Kashyap Chamarthy To: qemu-devel@nongnu.org Date: Tue, 30 Oct 2018 13:35:24 +0100 Message-Id: <20181030123526.26415-2-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.38]); Tue, 30 Oct 2018 12:35:38 +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 1/3] Deprecate QMP `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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The intended functionality of QMP `cpu-add` is replaced with `device_add` (and `query-hotpluggable-cpus`). So let's deprecate `cpu-add`. A complete example of vCPU hotplug with the recommended way (using `device_add`) is provided as part of a seperate docs patch. Suggested-by: Eduardo Habkost Reviewed-by: Thomas Huth --- --- qapi/misc.json | 8 +++++++- qemu-deprecated.texi | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/qapi/misc.json b/qapi/misc.json index d450cfef21..fbee1e6d34 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -1104,7 +1104,7 @@ ## # @cpu-add: # -# Adds CPU with specified ID +# Adds CPU with specified ID. # # @id: ID of CPU to be created, valid values [0..max_cpus) # @@ -1112,6 +1112,10 @@ # # Since: 1.5 # +# Note: This command is deprecated. The `device_add` command should be +# used instead. See the `query-hotpluggable-cpus` command for +# details. +# # Example: # # -> { "execute": "cpu-add", "arguments": { "id": 2 } } @@ -3213,6 +3217,8 @@ ## # @query-hotpluggable-cpus: # +# TODO: Better documentation; currently there is none. +# # Returns: a list of HotpluggableCPU objects. # # Since: 2.7 diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 1b9c007f12..c86924ad9a 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -155,6 +155,11 @@ 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. +@subsection cpu-add (since 3.1) + +Use ``device_add'' for hotplugging vCPUs instead of ``cpu-add''. See +documentation of ``query-hotpluggable-cpus'' for additional details. + @section System emulator devices @subsection ivshmem (since 2.6.0)