Skip to content

Commit

Permalink
Fix: Require /dev/sev to be present as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoh committed Jun 27, 2024
1 parent 374a628 commit 743a46c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aleph/vm/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 743a46c

Please sign in to comment.