From 25b3cdd38c12f03aab115fe6b5681e6d26ea49d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 23 Mar 2023 10:03:54 +0100 Subject: [PATCH] virtcontainers: Drop check for the `tdx` CPU flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the recent kernels provided by Intel the `tdx` CPU flag is not present anymore. Signed-off-by: Fabiano FidĂȘncio --- src/runtime/virtcontainers/hypervisor_linux_amd64.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/runtime/virtcontainers/hypervisor_linux_amd64.go b/src/runtime/virtcontainers/hypervisor_linux_amd64.go index 304d0446a4..043b36c9f5 100644 --- a/src/runtime/virtcontainers/hypervisor_linux_amd64.go +++ b/src/runtime/virtcontainers/hypervisor_linux_amd64.go @@ -12,8 +12,6 @@ const ( tdxSysFirmwareDir = "/sys/firmware/tdx/" - tdxCPUFlag = "tdx" - sevKvmParameterPath = "/sys/module/kvm_amd/parameters/sev" snpKvmParameterPath = "/sys/module/kvm_amd/parameters/sev_snp" @@ -21,10 +19,6 @@ const ( // TDX is supported and properly loaded when the firmware directory (either tdx or tdx_seam) exists or `tdx` is part of the CPU flag func checkTdxGuestProtection(flags map[string]bool) bool { - if flags[tdxCPUFlag] { - return true - } - if d, err := os.Stat(tdxSysFirmwareDir); err == nil && d.IsDir() { return true }