cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
60061b
From e8377e3f4d540e2594a50985523e87d1f3cabbc7 Mon Sep 17 00:00:00 2001
60061b
From: Yang Zhong <yang.zhong@intel.com>
60061b
Date: Mon, 1 Nov 2021 12:20:08 -0400
60061b
Subject: [PATCH 3/7] doc: Add the SGX numa description
60061b
60061b
RH-Author: Paul Lai <None>
60061b
RH-MergeRequest: 111: numa: Enable numa for SGX EPC sections
60061b
RH-Commit: [3/5] 41c74688c9662b966c243566a837135ff52341c4
60061b
RH-Bugzilla: 1518984
60061b
RH-Acked-by: Paolo Bonzini <None>
60061b
RH-Acked-by: Bandan Das <None>
60061b
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
60061b
60061b
Add the SGX numa reference command and how to check if
60061b
SGX numa is support or not with multiple EPC sections.
60061b
60061b
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
60061b
Message-Id: <20211101162009.62161-5-yang.zhong@intel.com>
60061b
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
60061b
(cherry picked from commit d1889b36098c79e2e6ac90faf3d0dc5ec0057677)
60061b
Signed-off-by: Paul Lai <plai@redhat.com>
60061b
---
60061b
 docs/system/i386/sgx.rst | 31 +++++++++++++++++++++++++++----
60061b
 1 file changed, 27 insertions(+), 4 deletions(-)
60061b
60061b
diff --git a/docs/system/i386/sgx.rst b/docs/system/i386/sgx.rst
60061b
index f8fade5ac2..0f0a73f758 100644
60061b
--- a/docs/system/i386/sgx.rst
60061b
+++ b/docs/system/i386/sgx.rst
60061b
@@ -141,8 +141,7 @@ To launch a SGX guest:
60061b
   |qemu_system_x86| \\
60061b
    -cpu host,+sgx-provisionkey \\
60061b
    -object memory-backend-epc,id=mem1,size=64M,prealloc=on \\
60061b
-   -object memory-backend-epc,id=mem2,size=28M \\
60061b
-   -M sgx-epc.0.memdev=mem1,sgx-epc.1.memdev=mem2
60061b
+   -M sgx-epc.0.memdev=mem1,sgx-epc.0.node=0
60061b
 
60061b
 Utilizing SGX in the guest requires a kernel/OS with SGX support.
60061b
 The support can be determined in guest by::
60061b
@@ -152,8 +151,32 @@ The support can be determined in guest by::
60061b
 and SGX epc info by::
60061b
 
60061b
   $ dmesg | grep sgx
60061b
-  [    1.242142] sgx: EPC section 0x180000000-0x181bfffff
60061b
-  [    1.242319] sgx: EPC section 0x181c00000-0x1837fffff
60061b
+  [    0.182807] sgx: EPC section 0x140000000-0x143ffffff
60061b
+  [    0.183695] sgx: [Firmware Bug]: Unable to map EPC section to online node. Fallback to the NUMA node 0.
60061b
+
60061b
+To launch a SGX numa guest:
60061b
+
60061b
+.. parsed-literal::
60061b
+
60061b
+  |qemu_system_x86| \\
60061b
+   -cpu host,+sgx-provisionkey \\
60061b
+   -object memory-backend-ram,size=2G,host-nodes=0,policy=bind,id=node0 \\
60061b
+   -object memory-backend-epc,id=mem0,size=64M,prealloc=on,host-nodes=0,policy=bind \\
60061b
+   -numa node,nodeid=0,cpus=0-1,memdev=node0 \\
60061b
+   -object memory-backend-ram,size=2G,host-nodes=1,policy=bind,id=node1 \\
60061b
+   -object memory-backend-epc,id=mem1,size=28M,prealloc=on,host-nodes=1,policy=bind \\
60061b
+   -numa node,nodeid=1,cpus=2-3,memdev=node1 \\
60061b
+   -M sgx-epc.0.memdev=mem0,sgx-epc.0.node=0,sgx-epc.1.memdev=mem1,sgx-epc.1.node=1
60061b
+
60061b
+and SGX epc numa info by::
60061b
+
60061b
+  $ dmesg | grep sgx
60061b
+  [    0.369937] sgx: EPC section 0x180000000-0x183ffffff
60061b
+  [    0.370259] sgx: EPC section 0x184000000-0x185bfffff
60061b
+
60061b
+  $ dmesg | grep SRAT
60061b
+  [    0.009981] ACPI: SRAT: Node 0 PXM 0 [mem 0x180000000-0x183ffffff]
60061b
+  [    0.009982] ACPI: SRAT: Node 1 PXM 1 [mem 0x184000000-0x185bfffff]
60061b
 
60061b
 References
60061b
 ----------
60061b
-- 
60061b
2.27.0
60061b