mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-10 13:19:31 +00:00
HV: add hypercall interface of get vcpu state data
We can use this interface for VHM to pass per-cpu power state data to guest per its request. For now the vcpu power state is per-vm, this could be changed if per-cpu power state support is required in the future. Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
@@ -301,6 +301,26 @@ struct cpu_px_data {
|
||||
uint64_t status; /* success indicator */
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
/**
|
||||
* @brief Info PM command from DM/VHM.
|
||||
*
|
||||
* The command would specify request type(i.e. get px count or data) for
|
||||
* specific VM and specific VCPU with specific state number.like P(n).
|
||||
*/
|
||||
#define PMCMD_VMID_MASK 0xff000000
|
||||
#define PMCMD_VCPUID_MASK 0x00ff0000
|
||||
#define PMCMD_STATE_NUM_MASK 0x0000ff00
|
||||
#define PMCMD_TYPE_MASK 0x000000ff
|
||||
|
||||
#define PMCMD_VMID_SHIFT 24
|
||||
#define PMCMD_VCPUID_SHIFT 16
|
||||
#define PMCMD_STATE_NUM_SHIFT 8
|
||||
|
||||
enum pm_cmd_type {
|
||||
PMCMD_GET_PX_CNT,
|
||||
PMCMD_GET_PX_DATA,
|
||||
};
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user