qemu-e2k/qapi
Sean Christopherson dfce81f1b9 vl: Add sgx compound properties to expose SGX EPC sections to guest
Because SGX EPC is enumerated through CPUID, EPC "devices" need to be
realized prior to realizing the vCPUs themselves, i.e. long before
generic devices are parsed and realized.  From a virtualization
perspective, the CPUID aspect also means that EPC sections cannot be
hotplugged without paravirtualizing the guest kernel (hardware does
not support hotplugging as EPC sections must be locked down during
pre-boot to provide EPC's security properties).

So even though EPC sections could be realized through the generic
-devices command, they need to be created much earlier for them to
actually be usable by the guest.  Place all EPC sections in a
contiguous block, somewhat arbitrarily starting after RAM above 4g.
Ensuring EPC is in a contiguous region simplifies calculations, e.g.
device memory base, PCI hole, etc..., allows dynamic calculation of the
total EPC size, e.g. exposing EPC to guests does not require -maxmem,
and last but not least allows all of EPC to be enumerated in a single
ACPI entry, which is expected by some kernels, e.g. Windows 7 and 8.

The new compound properties command for sgx like below:
 ......
 -object memory-backend-epc,id=mem1,size=28M,prealloc=on \
 -object memory-backend-epc,id=mem2,size=10M \
 -M sgx-epc.0.memdev=mem1,sgx-epc.1.memdev=mem2

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20210719112136.57018-6-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-09-30 14:50:20 +02:00
..
acpi.json
audio.json
authz.json
block-core.json qapi: Convert simple union ImageInfoSpecific to flat one 2021-09-27 08:23:25 +02:00
block-export.json qapi: make 'if' condition strings simple identifiers 2021-08-26 13:53:56 +02:00
block.json
char.json qapi: Convert simple union ChardevBackend to flat one 2021-09-27 08:23:09 +02:00
common.json
compat.json qapi: New -compat deprecated-input=crash 2021-03-19 16:05:11 +01:00
control.json
crypto.json crypto: replace 'des-rfb' cipher with 'des' 2021-07-14 14:15:52 +01:00
dump.json
error.json
introspect.json
job.json
machine-target.json qapi: make 'if' condition strings simple identifiers 2021-08-26 13:53:56 +02:00
machine.json vl: Add sgx compound properties to expose SGX EPC sections to guest 2021-09-30 14:50:20 +02:00
meson.build qapi: introduce forwarding visitor 2021-07-23 18:17:17 +02:00
migration.json qapi: make 'if' condition strings simple identifiers 2021-08-26 13:53:56 +02:00
misc-target.json qapi: make 'if' condition strings simple identifiers 2021-08-26 13:53:56 +02:00
misc.json iothread: add aio-max-batch parameter 2021-07-21 13:47:50 +01:00
net.json netdev: add more commands to preconfig mode 2021-06-11 10:30:13 +08:00
opts-visitor.c
pci.json
pragma.json block: Remove monitor command block_passwd 2021-03-23 22:31:56 +01:00
qapi-clone-visitor.c
qapi-dealloc-visitor.c
qapi-forward-visitor.c qapi: introduce forwarding visitor 2021-07-23 18:17:17 +02:00
qapi-schema.json
qapi-util.c
qapi-visit-core.c
qdev.json
qmp-dispatch.c qapi: New -compat deprecated-input=crash 2021-03-19 16:05:11 +01:00
qmp-event.c
qmp-registry.c
qobject-input-visitor.c qapi: New -compat deprecated-input=crash 2021-03-19 16:05:11 +01:00
qobject-output-visitor.c
qom.json qom: Add memory-backend-epc ObjectOptions support 2021-09-30 14:50:19 +02:00
rdma.json
replay.json
rocker.json
run-state.json
sockets.json qapi: Convert simple union SocketAddressLegacy to flat one 2021-09-27 08:23:25 +02:00
string-input-visitor.c
string-output-visitor.c
tpm.json qapi: Convert simple union TpmTypeOptions to flat one 2021-09-27 08:22:25 +02:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h
trace.json qapi: Set boolean value correctly in examples 2021-09-03 17:03:05 +02:00
transaction.json qapi: Convert simple union TransactionAction to flat one 2021-09-27 08:23:25 +02:00
ui.json qapi: Convert simple union InputEvent to flat one 2021-09-25 06:55:54 +02:00
yank.json