qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, armbru@redhat.com, ehabkost@redhat.com,
	pkrempa@redhat.com, david@gibson.dropbear.id.au,
	peter.maydell@linaro.org, pbonzini@redhat.com
Subject: [Qemu-devel] [RFC v2 3/4] QMP: add set-numa-node command
Date: Thu, 28 Dec 2017 18:22:58 +0100	[thread overview]
Message-ID: <1514481779-184817-4-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1514481779-184817-1-git-send-email-imammedo@redhat.com>

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 hw/core/machine.c |  1 +
 numa.c            |  5 +++++
 qapi-schema.json  | 13 +++++++++++++
 3 files changed, 19 insertions(+)

diff --git a/hw/core/machine.c b/hw/core/machine.c
index c857f3f..212dfec 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -21,6 +21,7 @@
 #include "qemu/error-report.h"
 #include "qemu/cutils.h"
 #include "sysemu/qtest.h"
+#include "qmp-commands.h"
 
 static char *machine_get_accel(Object *obj, Error **errp)
 {
diff --git a/numa.c b/numa.c
index d157961..fd2bf1c 100644
--- a/numa.c
+++ b/numa.c
@@ -442,6 +442,11 @@ void parse_numa_opts(MachineState *ms)
     }
 }
 
+void qmp_set_numa_node(NumaOptions *cmd, Error **errp)
+{
+    parse_NumaOptions(MACHINE(qdev_get_machine()), cmd, errp);
+}
+
 void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **errp)
 {
     int node_id = object_property_get_int(OBJECT(dev), "node-id", &error_abort);
diff --git a/qapi-schema.json b/qapi-schema.json
index 5c06745..94ef197 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3189,3 +3189,16 @@
 # Since: 2.11
 ##
 { 'command': 'watchdog-set-action', 'data' : {'action': 'WatchdogAction'} }
+
+##
+# @set-numa-node:
+#
+# Runtime equivalent of '-numa' CLI option, available at
+# preconfigure stage to configure numa mapping before initializing
+# machine.
+#
+# Since 2.10
+##
+{ 'command': 'set-numa-node', 'boxed': true,
+  'data': 'NumaOptions'
+}
-- 
2.7.4

  parent reply	other threads:[~2017-12-28 17:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-28 17:22 [Qemu-devel] [RFC v2 0/4] enable numa configuration before machine is running from HMP/QMP Igor Mammedov
2017-12-28 17:22 ` [Qemu-devel] [RFC v2 1/4] numa: split out NumaOptions parsing into parse_NumaOptions() Igor Mammedov
2017-12-28 17:22 ` [Qemu-devel] [RFC v2 2/4] HMP: add set-numa-node command Igor Mammedov
2017-12-28 17:22 ` Igor Mammedov [this message]
2017-12-28 17:22 ` [Qemu-devel] [RFC v2 4/4] numa: pc: reset machine if numa config has changed in prelaunch time Igor Mammedov
2018-01-03  5:52 ` [Qemu-devel] [RFC v2 0/4] enable numa configuration before machine is running from HMP/QMP David Gibson
2018-01-03 14:17 ` Markus Armbruster
2018-01-08  8:35   ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1514481779-184817-4-git-send-email-imammedo@redhat.com \
    --to=imammedo@redhat.com \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=eblake@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).