dm: add new ioctl to create and destroy a device

Add IC_CREATE_DEVICE and IC_DESTROY_DEVICE ioctls to create and
destroy an emulated device in hypervisor

v3: change IC_CREATE_DEVICE and IC_DESTROY_DEVICE to IC_CREATE_HV_VDEV
    and IC_DESTROY_HV_VDEV

Tracked-On: #4853

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Yuan Liu
2020-08-24 10:08:08 +08:00
committed by wenlingz
parent 1b711ed629
commit a977d35e0c
3 changed files with 59 additions and 0 deletions

View File

@@ -136,6 +136,8 @@ int vm_set_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf,
uint16_t phys_bdf, int virt_pin, int phys_pin, bool pic_pin);
int vm_reset_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf,
uint16_t phys_bdf, int virt_pin, bool pic_pin);
int vm_create_hv_vdev(struct vmctx *ctx, struct acrn_emul_dev *dev);
int vm_destroy_hv_vdev(struct vmctx *ctx, struct acrn_emul_dev *dev);
int acrn_parse_cpu_affinity(char *arg);
int vm_create_vcpu(struct vmctx *ctx, uint16_t vcpu_id);