mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 12:19:06 +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
@@ -258,7 +258,6 @@ add_cpu(struct vmctx *ctx, int guest_ncpus)
|
||||
fprintf(stderr, "ERROR: could not create VCPU %d\n", i);
|
||||
return error;
|
||||
}
|
||||
|
||||
CPU_SET_ATOMIC(i, &cpumask);
|
||||
|
||||
mt_vmm_info[i].mt_ctx = ctx;
|
||||
@@ -962,7 +961,7 @@ main(int argc, char *argv[])
|
||||
|
||||
for (;;) {
|
||||
pr_notice("vm_create: %s\n", vmname);
|
||||
ctx = vm_create(vmname, (unsigned long)vhm_req_buf);
|
||||
ctx = vm_create(vmname, (unsigned long)vhm_req_buf, &guest_ncpus);
|
||||
if (!ctx) {
|
||||
pr_err("vm_create failed");
|
||||
goto create_fail;
|
||||
|
Reference in New Issue
Block a user