]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Check if s390 secure guest support is enabled
authorPaulo de Rezende Pinatti <ppinatti@linux.ibm.com>
Mon, 15 Jun 2020 08:28:07 +0000 (10:28 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 16 Jun 2020 07:43:44 +0000 (09:43 +0200)
commitb611b620ceaf940017ba4d0b8b0638869c751509
treeb0632a8a58f6aabead27568d7b871686a86418ca
parentc5fffb959d93b83d87e70b21d19424e9722700b0
qemu: Check if s390 secure guest support is enabled

This patch introduces a common function to verify if the
availability of the so-called Secure Guest feature on the host
has changed in order to invalidate the qemu capabilities cache.
It can be used as an entry point for verification on different
architectures.

For s390 the verification consists of:
- checking if /sys/firmware/uv is available: meaning the HW
facility is available and the host OS supports it;
- checking if the kernel cmdline contains 'prot_virt=1': meaning
the host OS wants to use the feature.

Whenever the availability of the feature does not match the secure
guest flag in the cache then libvirt will re-build it in order to
pick up the new set of capabilities available.

Signed-off-by: Paulo de Rezende Pinatti <ppinatti@linux.ibm.com>
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Tested-by: Viktor Mihajlovski <mihajlov@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/qemu/qemu_capabilities.c