Open 512yottabytes opened 3 years ago
@512yottabytes, sorry for late response.
Did this issue still exist? If yes, this issue should be caused by different sgx device nodes with kernel and qemu.
(1). kernel/kvm side please check /dev/sgx*
(2) qemu, backends/hostmem-epc.c sgx_epc_backend_memory_alloc() register_types()
Or you can sync the latest code from kvm-sgx and qemu-sgx upstream branch to check again, thanks!
Any issue, please directly contact me.
I recently saw same issue when run the vm with a different user, with root it works. the problem is /dev/sgx_vepc require root user privilege to access. I chown the device to the user, then I'm able to run the VM with SGX-EPC as expected.
Is there a standard way to run SGX VM?
Thanks @xjtuwjp for this hint! I had the same problem.
I guess the more or less standard way to use it is this. /dev/sgx_vepc
has a sgx
group associated. So I added this group to my user (dimakuv
), and everything works nicely (sudo usermod -a -G sgx dimakuv
).
Hello, I've compiled sgx-kvm, installed kernel and modules, rebooted, then compiled qemu-sgx. Trying to launch it, like in readme.md I got:
qemu-system-x86_64: -object memory-backend-epc,id=mem1,size=28M: invalid object type: memory-backend-epc
(I've done it as root, ofcource) Hove to solve it?