From: Yang Zhong <yang.zhong@intel.com>
To: Eric Blake <eblake@redhat.com>
Cc: yang.zhong@intel.com, pbonzini@redhat.com, philmd@redhat.com,
qemu-devel@nongnu.org
Subject: Re: [PATCH 1/6] numa: Enable numa for SGX EPC sections
Date: Wed, 20 Oct 2021 15:02:32 +0800 [thread overview]
Message-ID: <20211020070232.GA31332@yangzhon-Virtual> (raw)
In-Reply-To: <20211011163239.kcpgv3ixmuxbfqtv@redhat.com>
On Mon, Oct 11, 2021 at 11:32:39AM -0500, Eric Blake wrote:
> On Mon, Oct 11, 2021 at 07:15:49PM +0800, Yang Zhong wrote:
> > The basic SGX did not enable numa for SGX EPC sections, which
> > result in all EPC sections located in numa node 0. This patch
> > enable SGX numa function in the guest and the EPC section can
> > work with RAM as one numa node.
> >
> > The Guest kernel related log:
> > [ 0.009981] ACPI: SRAT: Node 0 PXM 0 [mem 0x180000000-0x183ffffff]
> > [ 0.009982] ACPI: SRAT: Node 1 PXM 1 [mem 0x184000000-0x185bfffff]
> > The SRAT table can normally show SGX EPC sections menory info in different
> > numa nodes.
> >
> > The SGX EPC numa related command:
> > ......
> > -m 4G,maxmem=20G \
> > -smp sockets=2,cores=2 \
> > -cpu host,+sgx-provisionkey \
> > -object memory-backend-ram,size=2G,host-nodes=0,policy=bind,id=node0 \
> > -object memory-backend-epc,id=mem0,size=64M,prealloc=on,host-nodes=0,policy=bind \
> > -numa node,nodeid=0,cpus=0-1,memdev=node0 \
> > -object memory-backend-ram,size=2G,host-nodes=1,policy=bind,id=node1 \
> > -object memory-backend-epc,id=mem1,size=28M,prealloc=on,host-nodes=1,policy=bind \
> > -numa node,nodeid=1,cpus=2-3,memdev=node1 \
> > -M sgx-epc.0.memdev=mem0,sgx-epc.0.node=0,sgx-epc.1.memdev=mem1,sgx-epc.1.node=1 \
> > ......
> >
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > ---
> > qapi/machine.json | 6 +++++-
> > include/hw/i386/sgx-epc.h | 3 +++
> > hw/i386/acpi-build.c | 4 ++++
> > hw/i386/sgx-epc.c | 3 +++
> > hw/i386/sgx.c | 44 +++++++++++++++++++++++++++++++++++++++
> > monitor/hmp-cmds.c | 1 +
> > qemu-options.hx | 4 ++--
> > 7 files changed, 62 insertions(+), 3 deletions(-)
> >
> > diff --git a/qapi/machine.json b/qapi/machine.json
> > index 5db54df298..09b6188e6f 100644
> > --- a/qapi/machine.json
> > +++ b/qapi/machine.json
> > @@ -1213,6 +1213,7 @@
> > 'data': { '*id': 'str',
> > 'memaddr': 'size',
> > 'size': 'size',
> > + 'node': 'int',
> > 'memdev': 'str'
> > }
> > }
> > @@ -1288,7 +1289,10 @@
> > # Since: 6.2
> > ##
> > { 'struct': 'SgxEPC',
> > - 'data': { 'memdev': 'str' } }
> > + 'data': { 'memdev': 'str',
> > + 'node': 'int'
> > + }
> > +}
>
> Missing documentation of the new member.
>
Sorry for delay response, i will add this in next version, thanks!
Yang
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-10-20 7:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 11:15 [PATCH 0/6] SGX NUMA support Yang Zhong
2021-10-11 11:15 ` [PATCH 1/6] numa: Enable numa for SGX EPC sections Yang Zhong
2021-10-11 16:32 ` Eric Blake
2021-10-20 7:02 ` Yang Zhong [this message]
2021-10-11 11:15 ` [PATCH 2/6] monitor: Support 'info numa' command Yang Zhong
2021-10-11 11:15 ` [PATCH 3/6] numa: Add SGXEPCSection list for multiple sections Yang Zhong
2021-10-11 17:03 ` Eric Blake
2021-10-12 11:01 ` Paolo Bonzini
2021-10-20 8:06 ` Yang Zhong
2021-10-12 11:01 ` Paolo Bonzini
2021-10-20 8:08 ` Yang Zhong
2021-10-11 11:15 ` [PATCH 4/6] monitor: numa support for 'info sgx' command Yang Zhong
2021-10-12 10:59 ` Paolo Bonzini
2021-10-20 7:08 ` Yang Zhong
2021-10-11 11:15 ` [PATCH 5/6] numa: Enable numa for libvirt interface Yang Zhong
2021-10-12 10:59 ` Paolo Bonzini
2021-10-11 11:15 ` [PATCH 6/6] doc: Add the SGX numa description 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=20211020070232.GA31332@yangzhon-Virtual \
--to=yang.zhong@intel.com \
--cc=eblake@redhat.com \
--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).