diff --git a/devicemodel/core/main.c b/devicemodel/core/main.c index 3141b031c..7acba8728 100644 --- a/devicemodel/core/main.c +++ b/devicemodel/core/main.c @@ -261,11 +261,6 @@ add_cpu(struct vmctx *ctx, int vcpu_num) int error; for (i = 0; i < vcpu_num; i++) { - error = vm_create_vcpu(ctx, (uint16_t)i); - if (error != 0) { - pr_err("ERROR: could not create VCPU %d\n", i); - return error; - } CPU_SET_ATOMIC(i, &cpumask); mt_vmm_info[i].mt_ctx = ctx; diff --git a/devicemodel/core/vmmapi.c b/devicemodel/core/vmmapi.c index a731cfc51..72f35e10a 100644 --- a/devicemodel/core/vmmapi.c +++ b/devicemodel/core/vmmapi.c @@ -641,19 +641,6 @@ vm_reset_ptdev_intx_info(struct vmctx *ctx, uint16_t virt_bdf, uint16_t phys_bdf return ioctl(ctx->fd, IC_RESET_PTDEV_INTR_INFO, &ptirq); } -int -vm_create_vcpu(struct vmctx *ctx, uint16_t vcpu_id) -{ - struct acrn_create_vcpu cv; - int error; - - bzero(&cv, sizeof(struct acrn_create_vcpu)); - cv.vcpu_id = vcpu_id; - error = ioctl(ctx->fd, IC_CREATE_VCPU, &cv); - - return error; -} - int vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *vcpu_regs) { diff --git a/devicemodel/include/public/vhm_ioctl_defs.h b/devicemodel/include/public/vhm_ioctl_defs.h index c325c4161..c760271b8 100644 --- a/devicemodel/include/public/vhm_ioctl_defs.h +++ b/devicemodel/include/public/vhm_ioctl_defs.h @@ -71,7 +71,6 @@ #define IC_DESTROY_VM _IC_ID(IC_ID, IC_ID_VM_BASE + 0x01) #define IC_START_VM _IC_ID(IC_ID, IC_ID_VM_BASE + 0x02) #define IC_PAUSE_VM _IC_ID(IC_ID, IC_ID_VM_BASE + 0x03) -#define IC_CREATE_VCPU _IC_ID(IC_ID, IC_ID_VM_BASE + 0x04) #define IC_RESET_VM _IC_ID(IC_ID, IC_ID_VM_BASE + 0x05) #define IC_SET_VCPU_REGS _IC_ID(IC_ID, IC_ID_VM_BASE + 0x06) diff --git a/devicemodel/include/vmmapi.h b/devicemodel/include/vmmapi.h index 23f5c42a6..8ec88c133 100644 --- a/devicemodel/include/vmmapi.h +++ b/devicemodel/include/vmmapi.h @@ -141,7 +141,6 @@ int vm_remove_hv_vdev(struct vmctx *ctx, struct acrn_emul_dev *dev); int acrn_parse_cpu_affinity(char *arg); uint64_t vm_get_cpu_affinity_dm(void); -int vm_create_vcpu(struct vmctx *ctx, uint16_t vcpu_id); int vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *cpu_regs); int vm_get_cpu_state(struct vmctx *ctx, void *state_buf);