From: Borislav Petkov <bp@xxxxxxxxx> Sent: Tuesday, April 11, 2023 6:21 AM
On Sat, Apr 01, 2023 at 08:36:41AM +0200, Juergen Gross wrote:
[snip]
+
+ /*
+ * Only allowed for special virtualization cases:
+ * - when running as SEV-SNP guest
+ * - when running as Hyper-V isolated guest
when running as a SEV-SNP guest on a HyperV with vTOM enabled
that's a single condition.
+ * - when running as Xen PV guest
+ * - when running as TSX guest
+ */
+ if (!cc_platform_has(CC_ATTR_GUEST_SEV_SNP) &&
+ !hv_is_isolation_supported() &&
+ !cpu_feature_enabled(X86_FEATURE_XENPV) &&
+ !cpu_feature_enabled(X86_FEATURE_TDX_GUEST))
IOW:
if (!(hv_is_isolation_supported() && cc_platform_has(CC_ATTR_GUEST_SEV_SNP)) &&
!cpu_feature_enabled(X86_FEATURE_XENPV) &&
!cpu_feature_enabled(X86_FEATURE_TDX_GUEST))
That's doesn't work. Hyper-V guests with vTOM don't have
CC_ATTR_GUEST_SEV_SNP.
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature