hv: dynamically configure CPU affinity through hypercall

- add a new member cpu_affinity to struct acrn_create_vm, so that acrn-dm
  is able to assign CPU affinity through HC_CREATE_VM hypercall.

- if vm_create.cpu_affinity is zero, hypervisor launches the VM with the
  statically configured CPU affinity.

Tracked-On: #4616
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zide Chen
2020-04-08 12:22:13 -07:00
committed by wenlingz
parent 9150284ca7
commit 3691e305c0
2 changed files with 34 additions and 13 deletions

View File

@@ -360,8 +360,15 @@ struct acrn_create_vm {
uint64_t req_buf;
/**
* The least significant set bit is the PCPU # the VCPU 0 maps to;
* second set least significant bit is the PCPU # the VCPU 1 maps to;
* and so on...
*/
uint64_t cpu_affinity;
/** Reserved for future use*/
uint8_t reserved2[16];
uint8_t reserved2[8];
} __aligned(8);
/**