qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Yang Zhong <yang.zhong@intel.com>
To: qemu-devel@nongnu.org
Cc: yang.zhong@intel.com, pbonzini@redhat.com, jarkko@kernel.org,
	eblake@redhat.com, philmd@redhat.com
Subject: [PATCH v3 2/5] monitor: Support 'info numa' command
Date: Mon,  1 Nov 2021 12:20:06 -0400	[thread overview]
Message-ID: <20211101162009.62161-3-yang.zhong@intel.com> (raw)
In-Reply-To: <20211101162009.62161-1-yang.zhong@intel.com>

Add the MEMORY_DEVICE_INFO_KIND_SGX_EPC case for SGX numa info
with 'info numa' command in the monitor.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 hw/core/numa.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/core/numa.c b/hw/core/numa.c
index 510d096a88..1aa05dcf42 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -756,6 +756,7 @@ static void numa_stat_memory_devices(NumaNodeMem node_mem[])
     PCDIMMDeviceInfo     *pcdimm_info;
     VirtioPMEMDeviceInfo *vpi;
     VirtioMEMDeviceInfo *vmi;
+    SgxEPCDeviceInfo *se;
 
     for (info = info_list; info; info = info->next) {
         MemoryDeviceInfo *value = info->value;
@@ -781,6 +782,11 @@ static void numa_stat_memory_devices(NumaNodeMem node_mem[])
                 node_mem[vmi->node].node_mem += vmi->size;
                 node_mem[vmi->node].node_plugged_mem += vmi->size;
                 break;
+            case MEMORY_DEVICE_INFO_KIND_SGX_EPC:
+                se = value->u.sgx_epc.data;
+                node_mem[se->node].node_mem += se->size;
+                node_mem[se->node].node_plugged_mem = 0;
+                break;
             default:
                 g_assert_not_reached();
             }


  parent reply	other threads:[~2021-11-01  7:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 16:20 [PATCH v3 0/5] SGX NUMA support plus vepc reset Yang Zhong
2021-11-01 16:20 ` [PATCH v3 1/5] numa: Enable numa for SGX EPC sections Yang Zhong
2021-11-01 16:20 ` Yang Zhong [this message]
2021-11-01 16:20 ` [PATCH v3 3/5] numa: Support SGX numa in the monitor and Libvirt interfaces Yang Zhong
2021-11-10 16:55   ` Eric Blake
2021-11-11  6:18     ` Yang Zhong
2021-11-11  7:55       ` Philippe Mathieu-Daudé
2021-11-11  8:07         ` Yang Zhong
2021-11-11  7:39     ` Paolo Bonzini
2021-11-01 16:20 ` [PATCH v3 4/5] doc: Add the SGX numa description Yang Zhong
2021-11-01 16:20 ` [PATCH v3 5/5] sgx: Reset the vEPC regions during VM reboot Yang Zhong
2021-11-10 12:52 ` [PATCH v3 0/5] SGX NUMA support plus vepc reset Paolo Bonzini
2021-11-10 12:56   ` Yang Zhong
2021-11-10 16:07     ` Paolo Bonzini
2021-11-11  6:20       ` Yang Zhong

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=20211101162009.62161-3-yang.zhong@intel.com \
    --to=yang.zhong@intel.com \
    --cc=eblake@redhat.com \
    --cc=jarkko@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=philmd@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).