From 743a46c6a14677669e46ebe76630ff8fdb699d13 Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Thu, 27 Jun 2024 16:13:57 +0200 Subject: [PATCH] Fix: Require `/dev/sev` to be present as well. --- src/aleph/vm/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aleph/vm/utils/__init__.py b/src/aleph/vm/utils/__init__.py index 7af5eb855..35bbf2ff7 100644 --- a/src/aleph/vm/utils/__init__.py +++ b/src/aleph/vm/utils/__init__.py @@ -143,7 +143,7 @@ def check_amd_sev_supported() -> bool: AMD Secure Encrypted Virtualization (SEV) Uses one key per virtual machine to isolate guests and the hypervisor from one another. """ - return check_system_module("kvm_amd/parameters/sev") == "Y" + return (check_system_module("kvm_amd/parameters/sev") == "Y") and Path("/dev/sev").exists() def check_amd_sev_es_supported() -> bool: @@ -152,7 +152,7 @@ def check_amd_sev_es_supported() -> bool: AMD Secure Encrypted Virtualization-Encrypted State (SEV-ES) Encrypts all CPU register contents when a VM stops running. """ - return check_system_module("kvm_amd/parameters/sev_es") == "Y" + return (check_system_module("kvm_amd/parameters/sev_es") == "Y") and Path("/dev/sev").exists() def check_amd_sev_snp_supported() -> bool: