qemu-e2k/hw/core
Yang Zhong 1105812382 numa: Enable numa for SGX EPC sections
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>
Message-Id: <20211101162009.62161-2-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-12-10 09:47:18 +01:00
..
Kconfig hw/core: Only build guest-loader if libfdt is available 2021-03-17 07:17:46 +00:00
bus.c qbus: Rename qbus_create() to qbus_new() 2021-09-30 13:44:08 +01:00
clock-vmstate.c clock: Provide builtin multiplier/divider 2021-09-01 11:08:19 +01:00
clock.c clock: Provide builtin multiplier/divider 2021-09-01 11:08:19 +01:00
cpu-common.c Revert "cpu: Move cpu_common_props to hw/core/cpu.c" 2021-10-15 16:39:15 -07:00
cpu-sysemu.c cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps 2021-05-26 15:33:59 -07:00
fw-path-provider.c
generic-loader.c hw: Do not include hw/sysbus.h if it is not necessary 2021-05-02 17:24:50 +02:00
gpio.c machine: Move gpio code to hw/core/gpio.c 2021-11-01 19:44:00 +01:00
guest-loader.c hw: Do not include hw/sysbus.h if it is not necessary 2021-05-02 17:24:50 +02:00
guest-loader.h hw/core: implement a guest-loader to support static hypervisor guests 2021-03-10 15:34:11 +00:00
hotplug-stubs.c hw/core: Restrict hotplug to system emulation 2021-11-01 19:44:11 +01:00
hotplug.c
irq.c
loader-fit.c
loader.c qapi: introduce x-query-roms QMP command 2021-11-02 15:55:13 +00:00
machine-hmp-cmds.c qapi: introduce x-query-numa QMP command 2021-11-02 15:55:14 +00:00
machine-qmp-cmds.c qapi: introduce x-query-numa QMP command 2021-11-02 15:55:14 +00:00
machine-smp.c hw/core/machine: Split out the smp parsing code 2021-11-01 19:44:11 +01:00
machine.c hw/nvme: change nvme-ns 'shared' default 2021-11-19 07:31:56 +01:00
meson.build hw/core/machine: Split out the smp parsing code 2021-11-01 19:44:11 +01:00
nmi.c
null-machine.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
numa.c numa: Enable numa for SGX EPC sections 2021-12-10 09:47:18 +01:00
or-irq.c
platform-bus.c
ptimer.c
qdev-clock.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
qdev-fw.c
qdev-hotplug.c hw/core: Extract hotplug-related functions to qdev-hotplug.c 2021-11-01 19:44:11 +01:00
qdev-prop-internal.h
qdev-properties-system.c net: Introduce NetClientInfo.check_peer_type() 2021-10-15 16:05:24 +02:00
qdev-properties.c qdev-properties: PropertyInfo: add realized_set_allowed field 2021-09-01 12:57:31 +02:00
qdev.c hw/core: Extract hotplug-related functions to qdev-hotplug.c 2021-11-01 19:44:11 +01:00
register.c hw/core/register: Add more 64-bit utilities 2021-09-01 11:59:12 +10:00
reset.c
resettable.c
split-irq.c
stream.c
sysbus.c qbus: Rename qbus_create_inplace() to qbus_init() 2021-09-30 13:42:10 +01:00
trace-events clock: Provide builtin multiplier/divider 2021-09-01 11:08:19 +01:00
trace.h
uboot_image.h
vm-change-state-handler.c
vmstate-if.c