Fix detection of TDX confidential VM on Azure platform
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 30 Jul 2024 09:51:21 +0000 (10:51 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 30 Jul 2024 20:39:20 +0000 (22:39 +0200)
commit9d7be044cad1ae54e344daf8f2ec37da46faf0fd
tree76af42cbc88e65f8dbac6a9e24277fc1f7a56329
parenta55d1b29a4cc2edc8550c5f4e062f2194807dcd3
Fix detection of TDX confidential VM on Azure platform

The original CVM detection logic for TDX assumes that the guest can see
the standard TDX CPUID leaf. This was true in Azure when this code was
originally written, however, current Azure now blocks that leaf in the
paravisor. Instead it is required to use the same Azure specific CPUID
leaf that is used for SEV-SNP detection, which reports the VM isolation
type.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/basic/confidential-virt.c
src/boot/efi/vmm.c
src/fundamental/confidential-virt-fundamental.h