Skip to content

Commit 0ae5ef3

Browse files
yonghuahwenlingz
authored andcommitted
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>
1 parent 5a51d0b commit 0ae5ef3

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

devicemodel/include/public/vhm_ioctl_defs.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
/* General */
6565
#define IC_ID_GEN_BASE 0x0UL
6666
#define IC_GET_API_VERSION _IC_ID(IC_ID, IC_ID_GEN_BASE + 0x00)
67+
#define IC_GET_PLATFORM_INFO _IC_ID(IC_ID, IC_ID_GEN_BASE + 0x03)
6768

6869
/* VM management */
6970
#define IC_ID_VM_BASE 0x10UL
@@ -205,6 +206,25 @@ struct api_version {
205206
uint32_t minor_version;
206207
};
207208

209+
/**
210+
* @brief data structure to track VHM platform information
211+
*/
212+
struct platform_info {
213+
/** Hardware Information */
214+
/** Physical CPU number */
215+
uint16_t cpu_num;
216+
217+
/** Align the size of version & hardware info to 128Bytes. */
218+
uint8_t reserved0[126];
219+
220+
/** Configuration Information */
221+
/** Maximum vCPU number for one VM. */
222+
uint16_t max_vcpus_per_vm;
223+
224+
/** Align the size of Configuration info to 128Bytes. */
225+
uint8_t reserved1[126];
226+
} __aligned(8);
227+
208228
struct acrn_ioeventfd {
209229
#define ACRN_IOEVENTFD_FLAG_PIO 0x01
210230
#define ACRN_IOEVENTFD_FLAG_DATAMATCH 0x02

0 commit comments

Comments
 (0)