mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-13 21:09:54 +00:00
hv: add new hypercall to fetch platform configurations
add new hypercall get platform information, such as physical CPU number. Tracked-On: #2538 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
Eddie Dong
parent
e216f3060c
commit
46480f6e23
@@ -28,6 +28,7 @@
|
||||
#define HC_GET_API_VERSION BASE_HC_ID(HC_ID, HC_ID_GEN_BASE + 0x00UL)
|
||||
#define HC_SOS_OFFLINE_CPU BASE_HC_ID(HC_ID, HC_ID_GEN_BASE + 0x01UL)
|
||||
#define HC_SET_CALLBACK_VECTOR BASE_HC_ID(HC_ID, HC_ID_GEN_BASE + 0x02UL)
|
||||
#define HC_GET_PLATFORM_INFO BASE_HC_ID(HC_ID, HC_ID_GEN_BASE + 0x03UL)
|
||||
|
||||
/* VM management */
|
||||
#define HC_ID_VM_BASE 0x10UL
|
||||
@@ -281,6 +282,25 @@ struct hc_api_version {
|
||||
uint32_t minor_version;
|
||||
} __aligned(8);
|
||||
|
||||
/**
|
||||
* Hypervisor API, return it for HC_GET_PLATFORM_INFO hypercall
|
||||
*/
|
||||
struct hc_platform_info {
|
||||
/** Hardware Information */
|
||||
/** Physical CPU number */
|
||||
uint16_t cpu_num;
|
||||
|
||||
/** Align the size of version & hardware info to 128Bytes. */
|
||||
uint8_t reserved0[126];
|
||||
|
||||
/** Configuration Information */
|
||||
/** Maximum vCPU number for one VM. */
|
||||
uint16_t max_vcpus_per_vm;
|
||||
|
||||
/** Align the size of Configuration info to 128Bytes. */
|
||||
uint8_t reserved1[126];
|
||||
} __aligned(8);
|
||||
|
||||
/**
|
||||
* Trusty boot params, used for HC_INITIALIZE_TRUSTY
|
||||
*/
|
||||
|
Reference in New Issue
Block a user