mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 06:29:19 +00:00
dm: Remove unused vm_create_vcpu() interface
The hypervisor creates vCPUs for a User VM in VM creation interface. The vm_create_vcpu() interface is not needed anymore. Remove vm_create_vcpu() 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:
parent
6ae5f8388e
commit
21e095dda0
@ -261,11 +261,6 @@ add_cpu(struct vmctx *ctx, int vcpu_num)
|
|||||||
int error;
|
int error;
|
||||||
|
|
||||||
for (i = 0; i < vcpu_num; i++) {
|
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);
|
CPU_SET_ATOMIC(i, &cpumask);
|
||||||
|
|
||||||
mt_vmm_info[i].mt_ctx = ctx;
|
mt_vmm_info[i].mt_ctx = ctx;
|
||||||
|
@ -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);
|
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
|
int
|
||||||
vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *vcpu_regs)
|
vm_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *vcpu_regs)
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
#define IC_DESTROY_VM _IC_ID(IC_ID, IC_ID_VM_BASE + 0x01)
|
#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_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_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_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)
|
#define IC_SET_VCPU_REGS _IC_ID(IC_ID, IC_ID_VM_BASE + 0x06)
|
||||||
|
|
||||||
|
@ -141,7 +141,6 @@ int vm_remove_hv_vdev(struct vmctx *ctx, struct acrn_emul_dev *dev);
|
|||||||
|
|
||||||
int acrn_parse_cpu_affinity(char *arg);
|
int acrn_parse_cpu_affinity(char *arg);
|
||||||
uint64_t vm_get_cpu_affinity_dm(void);
|
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_set_vcpu_regs(struct vmctx *ctx, struct acrn_set_vcpu_regs *cpu_regs);
|
||||||
|
|
||||||
int vm_get_cpu_state(struct vmctx *ctx, void *state_buf);
|
int vm_get_cpu_state(struct vmctx *ctx, void *state_buf);
|
||||||
|
Loading…
Reference in New Issue
Block a user