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 <bluca@debian.org>
Thu, 15 Aug 2024 13:04:40 +0000 (14:04 +0100)
commit812fc38b9147232862263e482ce19bec71137b95
treed4256397f49166535f74a6e4e1ed058060b32b22
parent9468a6ea47cfb8412875923d09b8a8ae6ee02119
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>
(cherry picked from commit 9d7be044cad1ae54e344daf8f2ec37da46faf0fd)
src/basic/confidential-virt.c
src/boot/efi/vmm.c
src/fundamental/confidential-virt-fundamental.h