hv: return pre-defined vcpu_num from HV to upper layer

There is plan that define each VM configuration statically in HV and let
DM just do VM creating and destroying. So DM need get vcpu_num
information when VM creating.

This patch return the vcpu_num via the API param. And also initial the
VMs' cpu_num for existing scenarios.

Tracked-On: #3663
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shuo A Liu
2019-05-21 15:58:23 +08:00
committed by ACRN System Integration
parent 59e39c5fbb
commit ca2540fe8c
8 changed files with 17 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ struct acrn_vm_config {
char name[MAX_VM_OS_NAME_LEN]; /* VM name identifier, useful for debug. */
const uint8_t uuid[16]; /* UUID of the VM */
uint64_t pcpu_bitmap; /* from pcpu bitmap, we could know VM core number */
uint16_t vcpu_num; /* Number of vCPUs for the VM */
uint64_t guest_flags; /* VM flags that we want to configure for guest
* Now we have two flags:
* GUEST_FLAG_SECURE_WORLD_ENABLED