#define CPUID_HYPERV_ISOLATION_TYPE_MASK 0xf
#define CPUID_HYPERV_ISOLATION_TYPE_SNP 2
+#define CPUID_HYPERV_ISOLATION_TYPE_TDX 3
#if defined(__x86_64__)
}
static bool
-cpu_sig_amd_hyperv (void)
+cpu_sig_cvm_hyperv (uint32_t isoltype)
{
uint32_t eax, ebx, ecx, edx;
char sig[13];
ebx = ecx = edx = 0;
cpuid(&eax, &ebx, &ecx, &edx);
- if ((ebx & CPUID_HYPERV_ISOLATION_TYPE_MASK) ==
- CPUID_HYPERV_ISOLATION_TYPE_SNP) {
+ if ((ebx & CPUID_HYPERV_ISOLATION_TYPE_MASK) == isoltype) {
return true;
}
}
if (!(eax & (1 << 1))) {
debug ("No sev in CPUID, try hyperv CPUID\n");
- if (cpu_sig_amd_hyperv ()) {
+ if (cpu_sig_cvm_hyperv (CPUID_HYPERV_ISOLATION_TYPE_SNP)) {
puts ("amd-sev-snp");
puts ("hyperv-hcl");
} else {
memset (sig, 0, sizeof sig);
cpuid_leaf (CPUID_INTEL_TDX_ENUMERATION, sig, true);
- if (memcmp (sig, CPUID_SIG_INTEL_TDX, sizeof(sig)) == 0)
+ if (memcmp (sig, CPUID_SIG_INTEL_TDX, sizeof(sig)) == 0) {
puts ("intel-tdx");
+ } else if (cpu_sig_cvm_hyperv (CPUID_HYPERV_ISOLATION_TYPE_TDX)) {
+ puts ("intel-tdx");
+ puts ("hyperv-hcl");
+ }
}
static bool
This is a confidential guest running with Intel TDX technology
-Status: tested on Microsoft Azure TDX CVM (preview)
+Status: tested on Microsoft Azure TDX CVM
=item B<hyperv-hcl>
HyperV (Azure) HCL (Host Compatibility Layer). This will be
paired with B<amd-sev-snp>.
-Status: tested on Microsoft Azure SEV-SNP CVM
+Status: tested on Microsoft Azure SEV-SNP & TDX CVM
=back