forked from pool/libvirt
31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
|
commit 3f9c1a4bb8416dafdaa89358498233aa6684377c
|
||
|
Author: Jim Fehlig <jfehlig@suse.com>
|
||
|
Date: Tue Oct 5 22:34:57 2021 -0600
|
||
|
|
||
|
tools: Fix virt-host-validate SEV detection
|
||
|
|
||
|
virt-host-validate checks if AMD SEV is enabled by verifying
|
||
|
/sys/module/kvm_amd/parameters/sev is set to '1'. On a system
|
||
|
running kernel 5.13, the parameter is reported as 'Y'. To be
|
||
|
extra paranoid, add a check for 'y' along with 'Y' to complement
|
||
|
the existing check for '1'.
|
||
|
|
||
|
Fixes: https://bugzilla.opensuse.org/show_bug.cgi?id=1188715
|
||
|
|
||
|
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||
|
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
||
|
|
||
|
Index: libvirt-7.8.0/tools/virt-host-validate-common.c
|
||
|
===================================================================
|
||
|
--- libvirt-7.8.0.orig/tools/virt-host-validate-common.c
|
||
|
+++ libvirt-7.8.0/tools/virt-host-validate-common.c
|
||
|
@@ -501,7 +501,7 @@ int virHostValidateSecureGuests(const ch
|
||
|
return VIR_HOST_VALIDATE_FAILURE(level);
|
||
|
}
|
||
|
|
||
|
- if (mod_value[0] != '1') {
|
||
|
+ if (mod_value[0] != '1' && mod_value[0] != 'Y' && mod_value[0] != 'y') {
|
||
|
virHostMsgFail(level,
|
||
|
"AMD Secure Encrypted Virtualization appears to be "
|
||
|
"disabled in kernel. Add kvm_amd.sev=1 "
|