HV: return extended info in vCPUID leaf 0x40000001

In some case, guest need to get more information under virtual environment,
like guest capabilities. Basically this could be done by hypercalls, but
hypercalls are designed for trusted VM/SOS VM, We need a machenism to report
these information for normal VMs. In this patch, vCPUID leaf 0x40000001 will
be used to satisfy this needs that report some extended information for guest
by CPUID.

Tracked-On: #3498

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2019-07-29 13:38:39 +08:00
committed by ACRN System Integration
parent accdadce98
commit 363daf6aa2
2 changed files with 27 additions and 0 deletions

View File

@@ -9,6 +9,10 @@
#define CPUID_CHECK_SUBLEAF (1U << 0U)
#define MAX_VM_VCPUID_ENTRIES 64U
/* Guest capability flags reported by CPUID */
#define GUEST_CAPS_PRIVILEGE_VM (1U << 0U)
struct vcpuid_entry {
uint32_t eax;
uint32_t ebx;