qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Liu Jingqi <jingqi.liu@intel.com>
To: pbonzini@redhat.com, rth@twiddle.net, ehabkost@redhat.com
Cc: mst@redhat.com, imammedo@redhat.com, marcel.apfelbaum@gmail.com,
	qemu-devel@nongnu.org, Liu Jingqi <jingqi.liu@intel.com>
Subject: [Qemu-devel] [PATCH v1 4/7] numa: Classify the numa nodes as memory initiators and memory targets
Date: Wed,  9 May 2018 16:36:29 +0800	[thread overview]
Message-ID: <1525854989-14165-1-git-send-email-jingqi.liu@intel.com> (raw)

An initiator proximity domain (memory initiator) is any device
such as a CPU or a separate memory I/O device that can initiate
a memory request. A target proximity domain (memory target)
is a CPU-accessible physical address range.

Signed-off-by: Liu Jingqi <jingqi.liu@intel.com>
---
 numa.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/numa.c b/numa.c
index 70b150e..fe0009c 100644
--- a/numa.c
+++ b/numa.c
@@ -40,6 +40,7 @@
 #include "qemu/option.h"
 #include "qemu/config-file.h"
 #include "qemu/cutils.h"
+#include "hw/acpi/hmat.h"
 
 QemuOptsList qemu_numa_opts = {
     .name = "numa",
@@ -100,6 +101,10 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
         machine_set_cpu_numa_node(ms, &props, &error_fatal);
     }
 
+    if (node->cpus) {
+        initiator_pxm[num_initiator++] = nodenr;
+    }
+
     if (node->has_mem && node->has_memdev) {
         error_setg(errp, "cannot specify both mem= and memdev=");
         return;
@@ -116,6 +121,7 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
 
     if (node->has_mem) {
         numa_info[nodenr].node_mem = node->mem;
+        target_pxm[num_target++] = nodenr;
     }
     if (node->has_memdev) {
         Object *o;
@@ -128,6 +134,7 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
         object_ref(o);
         numa_info[nodenr].node_mem = object_property_get_uint(o, "size", NULL);
         numa_info[nodenr].node_memdev = MEMORY_BACKEND(o);
+        target_pxm[num_target++] = nodenr;
     }
     numa_info[nodenr].present = true;
     max_numa_nodeid = MAX(max_numa_nodeid, nodenr + 1);
-- 
2.7.4

             reply	other threads:[~2018-05-09  8:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  8:36 Liu Jingqi [this message]
2018-05-11 14:33 ` [Qemu-devel] [PATCH v1 4/7] numa: Classify the numa nodes as memory initiators and memory targets Eduardo Habkost
2018-05-14  5:22   ` Liu, Jingqi

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=1525854989-14165-1-git-send-email-jingqi.liu@intel.com \
    --to=jingqi.liu@intel.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).