Comment 0 for bug 1982896

Revision history for this message
Juro Bystricky (jurobystricky) wrote :

$ lsb_release -rd
Description: Ubuntu 22.04 LTS
Release: 22.04

Package: libvirt-daemon-system (8.0.0-1ubuntu7.1).

Note that Ubuntu kernel and qemu-system-x86_64 support SGX.
However, when attempting to launch a VM with SGX enabled, the following error is reported:

libvirt.libvirtError: internal error: unable to execute QEMU command 'qom-get': Property 'sgx-epc.unavailable-features' not found

This issue was fixed in libvirt 8.1. Please see the attached file for relevant patches.
Considering Ubuntu 22.04 is LTS distribution, please back port the libvirt 8.1 SGX functionality to liibvirt 8.0.0 (or upgrade the whole libvirt).

Being able to launch VMs with SGX support is a very important security feature.

=====
Steps to reproduce
1. Create a simple VM image:

$ wget https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220125.1.x86_64.qcow2

$ sudo cp https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220125.1.x86_64.qcow2 /var/lib/libvirt/images

$ virt-customize -a /var/lib/libvirt/images/CentOS-Stream-GenericCloud-8-20220125.1.x86_64.qcow2 --root-password password:123456

2. Launch the VM (cs8-vm-sgx.xml is attached):

$ sudo virsh define cs8-vm-sgx.xml
Domain 'cs8-vm-sgx' defined from cs8-vm-sgx.xml

$ sudo virsh start cs8-vm-sgx