dm: Remove the API version check

Interface version is not recommended in Linux kernel community. Please
check Documentation/driver-api/ioctl.rst for reasons.

Remove the unused API version check from acrn-dm.

Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Shuo A Liu 2021-04-07 11:04:54 +08:00 committed by wenlingz
parent 24b555c75d
commit 6ae5f8388e
2 changed files with 0 additions and 38 deletions

View File

@ -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"; 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 int devfd = -1;
static uint64_t cpu_affinity_bitmap = 0UL; 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; goto err;
} }
if (check_api(devfd) < 0)
goto err;
if (guest_uuid_str == NULL) if (guest_uuid_str == NULL)
guest_uuid_str = "d2795438-25d6-11e8-864e-cb7a18b34643"; guest_uuid_str = "d2795438-25d6-11e8-864e-cb7a18b34643";

View File

@ -63,7 +63,6 @@
/* 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_PLATFORM_INFO _IC_ID(IC_ID, IC_ID_GEN_BASE + 0x03) #define IC_GET_PLATFORM_INFO _IC_ID(IC_ID, IC_ID_GEN_BASE + 0x03)
/* VM management */ /* VM management */
@ -282,16 +281,6 @@ struct ioreq_notify {
uint32_t vcpu; 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 { enum acrn_vm_load_order {
PRE_LAUNCHED_VM = 0, PRE_LAUNCHED_VM = 0,
SOS_VM, SOS_VM,