From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj6r5-0007hf-2O for qemu-devel@nongnu.org; Thu, 24 Mar 2016 11:07:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj6qz-0008Ic-BI for qemu-devel@nongnu.org; Thu, 24 Mar 2016 11:07:23 -0400 From: Igor Mammedov Date: Thu, 24 Mar 2016 16:07:09 +0100 Message-Id: <1458832031-71472-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH v4 0/2] spapr: QMP: add query-hotpluggable-cpus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mjrosato@linux.vnet.ibm.com, thuth@redhat.com, pkrempa@redhat.com, ehabkost@redhat.com, aik@ozlabs.ru, armbru@redhat.com, agraf@suse.de, borntraeger@de.ibm.com, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com, pbonzini@redhat.com, dgibson@redhat.com, mdroth@linux.vnet.ibm.com, afaerber@suse.de Changes since v3: - replace qmp_query_hotpluggable_cpus with MachineClass->query_hotpluggable_cpus callback. (Eduardo Habkost ) - fix cover letter to explain why new command is needed. (Markus Armbruster ) Changes since v2: - rebase on top of hte lates spapr cpu hotpug series - add 'vcpus-count' field, pkrempa@redhat.com - s/CpuInstanceProps/CpuInstanceProperties/ - use '#optional' marker - make "props" as always present even if it's empty - fix JSON examples - fix minor typos - drop pre_plug spapr impl out of series as not related to QMP command - drop generic pre hotplug callback as not related to QMP command Changes since RFC: - drop arch_id - move CPU properties into separate structure - target implements its own qmp callback version - rebased on top of [RFC PATCH v1 00/10] Core based CPU hotplug for PowerPC sPAPR https://www.mail-archive.com/qemu-devel@nongnu.org/msg357567.html - convert slot name to core id hack - drop links - add generic pre hotplug callback - implement query-hotpluggable-cpus Series adds query-hotpluggable-cpus QMP command to allow mgmt query board specific configuration of possible CPU objects with their properties, which is target specific and also depends on CLI options (like -smp/-cpu/-numa). Returned information includes QOM type of CPU objects and a set of properties that are necessary for hotplugging them. Information will be used with device_add/-device when hotplugging a CPU and migrating QEMU instance with hotplugged CPUs. PS: The first patch (QMP API) in this series could go in first allowing individual targets to post their hotplug implementation independently on top of it. PS2: Summary on QMP vs QOM interface discussion: a QMP command is 1. a single / atomic command 2. well documented 3. fixed at compile time/staic so it's easy for mgmt to discover it. while a considered alternative QOM interface via qom-get(path) is 1. not atomic, i.e. requires a lot of qom-get requests over the wire to traverse QOM tree and fetch information 2. not documented 3. dynamically generated and would require more complicated coding even to create a simplistic interface similar to proposed QMP command (for example: possible_cpu QOM objects with a related properties) Igor Mammedov (2): QMP: add query-hotpluggable-cpus spapr: implement query-hotpluggable-cpus callback hw/ppc/spapr.c | 33 +++++++++++++++++++++++++++++++++ include/hw/boards.h | 5 +++++ monitor.c | 13 +++++++++++++ qapi-schema.json | 41 +++++++++++++++++++++++++++++++++++++++++ qmp-commands.hx | 43 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+) -- 1.8.3.1