virtcontainers: Drop check for the tdx CPU flag

In the recent kernels provided by Intel the `tdx` CPU flag is not
present anymore.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-03-23 10:03:54 +01:00
parent 01bdacb4e4
commit 25b3cdd38c

View File

@ -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
}