mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-06 22:22:09 +00:00
dm: add IOCTL command to get platform information
Add interface to get hardware information and configurations for current platform. 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:
parent
5a51d0bfb5
commit
0ae5ef3a29
@ -64,6 +64,7 @@
|
|||||||
/* General */
|
/* General */
|
||||||
#define IC_ID_GEN_BASE 0x0UL
|
#define IC_ID_GEN_BASE 0x0UL
|
||||||
#define IC_GET_API_VERSION _IC_ID(IC_ID, IC_ID_GEN_BASE + 0x00)
|
#define IC_GET_API_VERSION _IC_ID(IC_ID, IC_ID_GEN_BASE + 0x00)
|
||||||
|
#define IC_GET_PLATFORM_INFO _IC_ID(IC_ID, IC_ID_GEN_BASE + 0x03)
|
||||||
|
|
||||||
/* VM management */
|
/* VM management */
|
||||||
#define IC_ID_VM_BASE 0x10UL
|
#define IC_ID_VM_BASE 0x10UL
|
||||||
@ -205,6 +206,25 @@ struct api_version {
|
|||||||
uint32_t minor_version;
|
uint32_t minor_version;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief data structure to track VHM platform information
|
||||||
|
*/
|
||||||
|
struct 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);
|
||||||
|
|
||||||
struct acrn_ioeventfd {
|
struct acrn_ioeventfd {
|
||||||
#define ACRN_IOEVENTFD_FLAG_PIO 0x01
|
#define ACRN_IOEVENTFD_FLAG_PIO 0x01
|
||||||
#define ACRN_IOEVENTFD_FLAG_DATAMATCH 0x02
|
#define ACRN_IOEVENTFD_FLAG_DATAMATCH 0x02
|
||||||
|
Loading…
Reference in New Issue
Block a user