mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-12 12:30:08 +00:00
dm: get vcpu num from hypervisor when create VM
Now, we pre-define VM configuration statically in HV. So HV can create vcpus instead of DM when VM create. This patch get the created vcpu_num from HV. vm_create_vcpu can be removed later if kernel can get vcpu_num correctly without IC_CREATE_VCPU ioctl. v4: Keep vm_create_vcpu in DM for compatbility. We might remove it when kernel is ready. Tracked-On: #3663 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
489937f7b8
commit
d8acff1f44
@@ -87,7 +87,7 @@ check_api(int fd)
|
||||
static int devfd = -1;
|
||||
|
||||
struct vmctx *
|
||||
vm_create(const char *name, uint64_t req_buf)
|
||||
vm_create(const char *name, uint64_t req_buf, int *vcpu_num)
|
||||
{
|
||||
struct vmctx *ctx;
|
||||
struct acrn_create_vm create_vm;
|
||||
@@ -168,6 +168,7 @@ vm_create(const char *name, uint64_t req_buf)
|
||||
goto err;
|
||||
}
|
||||
|
||||
*vcpu_num = create_vm.vcpu_num;
|
||||
ctx->vmid = create_vm.vmid;
|
||||
|
||||
return ctx;
|
||||
|
Reference in New Issue
Block a user