[hv] set ECX.bit31 to indicate the presence of a hypervisor

ECS.bit31 is not used and always return 0 in SDM Vol.2A 3-195. It's a
standard way to indicate whether there is a hypervisor.

Tracked-On: #2490
Ref: https://lwn.net/Articles/301888/
Signed-off-by: Xinyun Liu <xinyun.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Xinyun Liu
2019-02-28 08:44:14 +08:00
committed by wenlingz
parent f6758fd621
commit 0943a836bd
2 changed files with 4 additions and 0 deletions

View File

@@ -41,6 +41,7 @@
#define CPUID_ECX_XSAVE (1U<<26U)
#define CPUID_ECX_OSXSAVE (1U<<27U)
#define CPUID_ECX_AVX (1U<<28U)
#define CPUID_ECX_HV (1U<<31U)
#define CPUID_EDX_FPU (1U<<0U)
#define CPUID_EDX_VME (1U<<1U)
#define CPUID_EDX_DE (1U<<2U)