My build of qemu-system-x86_64 has device sgx-epc:
--> {"execute": "qom-list-types", "arguments": {"implements": "sgx-epc"}}
<-- {"return": [{"name": "sgx-epc", "parent": "device"}]}
The device as a link property to a memory-backend-epc:
--> {"execute": "qom-list-properties", "arguments": {"typename": "sgx-epc"}}
<-- {"return": [...
{"name": "memdev", "type": "link<memory-backend-epc>"},
...]}
However, type memory-backend-epc does not exist:
--> {"execute": "qom-list-types", "arguments": {"implements":
"memory-backend"}}
<-- {"return": [{"name": "memory-backend-ram", "parent": "memory-backend"},
{"name": "memory-backend-file", "parent": "memory-backend"}, {"name":
"memory-backend-memfd", "parent": "memory-backend"}, {"name":
"memory-backend-shm", "parent": "memory-backend"}]}
The example from docs/system/i386/sgx.rst
Launching a guest
-----------------
To launch a SGX guest:
.. parsed-literal::
|qemu_system_x86| \\
-cpu host,+sgx-provisionkey \\
-object memory-backend-epc,id=mem1,size=64M,prealloc=on \\
-M sgx-epc.0.memdev=mem1,sgx-epc.0.node=0
does not work:
qemu-system-x86_64: invalid object type: memory-backend-epc
CONFIG_SGX is enabled in my build:
$ find bld-x86 -name \*.h -exec grep CONFIG_SGX {} +
bld-x86/x86_64-softmmu-config-devices.h:#define CONFIG_SGX 1
bld-x86/config-poison.h:#pragma GCC poison CONFIG_SGX