diff --git a/src/runtime/cmd/kata-runtime/kata-env.go b/src/runtime/cmd/kata-runtime/kata-env.go index 4f275ad00c..2db0c1a875 100644 --- a/src/runtime/cmd/kata-runtime/kata-env.go +++ b/src/runtime/cmd/kata-runtime/kata-env.go @@ -130,13 +130,14 @@ type DistroInfo struct { // HostInfo stores host details type HostInfo struct { - Kernel string - Architecture string - Distro DistroInfo - CPU CPUInfo - Memory MemoryInfo - VMContainerCapable bool - SupportVSocks bool + AvailableGuestProtections []string + Kernel string + Architecture string + Distro DistroInfo + CPU CPUInfo + Memory MemoryInfo + VMContainerCapable bool + SupportVSocks bool } // NetmonInfo stores netmon details @@ -241,14 +242,17 @@ func getHostInfo() (HostInfo, error) { memoryInfo := getMemoryInfo() + availableGuestProtection := vc.AvailableGuestProtections() + host := HostInfo{ - Kernel: hostKernelVersion, - Architecture: arch, - Distro: hostDistro, - CPU: hostCPU, - Memory: memoryInfo, - VMContainerCapable: hostVMContainerCapable, - SupportVSocks: supportVSocks, + Kernel: hostKernelVersion, + Architecture: arch, + Distro: hostDistro, + CPU: hostCPU, + Memory: memoryInfo, + AvailableGuestProtections: availableGuestProtection, + VMContainerCapable: hostVMContainerCapable, + SupportVSocks: supportVSocks, } return host, nil diff --git a/src/runtime/virtcontainers/qemu_arch_base.go b/src/runtime/virtcontainers/qemu_arch_base.go index 4cafe02b3a..fb3a8876c0 100644 --- a/src/runtime/virtcontainers/qemu_arch_base.go +++ b/src/runtime/virtcontainers/qemu_arch_base.go @@ -179,10 +179,10 @@ const ( var guestProtectionStr = [...]string{ noneProtection: "none", - tdxProtection: "tdx", - sevProtection: "sev", pefProtection: "pef", seProtection: "se", + sevProtection: "sev", + tdxProtection: "tdx", } func (gp guestProtection) String() string {