Re: [PATCH v4 1/7] hyperv: Detect Nested virtualization support for SVM
From: Wei Liu
Date: Wed Apr 28 2021 - 10:02:34 EST
On Tue, Apr 27, 2021 at 08:54:50PM +0000, Vineeth Pillai wrote:
> Previously, to detect nested virtualization enlightenment support,
> we were using HV_X64_ENLIGHTENED_VMCS_RECOMMENDED feature bit of
> HYPERV_CPUID_ENLIGHTMENT_INFO.EAX CPUID as docuemented in TLFS:
> "Bit 14: Recommend a nested hypervisor using the enlightened VMCS
> interface. Also indicates that additional nested enlightenments
> may be available (see leaf 0x4000000A)".
>
> Enlightened VMCS, however, is an Intel only feature so the above
> detection method doesn't work for AMD. So, use the
> HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS.EAX CPUID information ("The
> maximum input value for hypervisor CPUID information.") and this
> works for both AMD and Intel.
>
> Signed-off-by: Vineeth Pillai <viremana@xxxxxxxxxxxxxxxxxxx>
Acked-by: Wei Liu <wei.liu@xxxxxxxxxx>