diff --git a/devicemodel/core/vmmapi.c b/devicemodel/core/vmmapi.c index c6893851b..a731cfc51 100644 --- a/devicemodel/core/vmmapi.c +++ b/devicemodel/core/vmmapi.c @@ -77,30 +77,6 @@ const char *vm_state_to_str(enum vm_suspend_how idx) return (idx < VM_SUSPEND_LAST) ? vm_state_str[idx] : "UNKNOWN"; } -static int -check_api(int fd) -{ - struct api_version api_version; - int error; - - error = ioctl(fd, IC_GET_API_VERSION, &api_version); - if (error) { - pr_err("failed to get vhm api version\n"); - return -1; - } - - if (api_version.major_version != SUPPORT_VHM_API_VERSION_MAJOR || - api_version.minor_version != SUPPORT_VHM_API_VERSION_MINOR) { - pr_err("not support vhm api version\n"); - return -1; - } - - pr_info("VHM api version %d.%d\n", api_version.major_version, - api_version.minor_version); - - return 0; -} - static int devfd = -1; static uint64_t cpu_affinity_bitmap = 0UL; @@ -211,9 +187,6 @@ vm_create(const char *name, uint64_t req_buf, int *vcpu_num) goto err; } - if (check_api(devfd) < 0) - goto err; - if (guest_uuid_str == NULL) guest_uuid_str = "d2795438-25d6-11e8-864e-cb7a18b34643"; diff --git a/devicemodel/include/public/vhm_ioctl_defs.h b/devicemodel/include/public/vhm_ioctl_defs.h index a5c7949f3..c325c4161 100644 --- a/devicemodel/include/public/vhm_ioctl_defs.h +++ b/devicemodel/include/public/vhm_ioctl_defs.h @@ -63,7 +63,6 @@ /* General */ #define IC_ID_GEN_BASE 0x0UL -#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 */ @@ -282,16 +281,6 @@ struct ioreq_notify { uint32_t vcpu; }; -/** - * @brief data structure to track VHM API version - */ -struct api_version { - /** major version of VHM API */ - uint32_t major_version; - /** minor version of VHM API */ - uint32_t minor_version; -}; - enum acrn_vm_load_order { PRE_LAUNCHED_VM = 0, SOS_VM,