acrn-hypervisor/hypervisor/arch/x86/guest
Zide Chen 9150284ca7 hv: replace vcpu_affinity array with cpu_affinity_bitmap
Currently the vcpu_affinity[] array fixes the vCPU to pCPU mapping.
While the new cpu_affinity_bitmap doesn't explicitly sepcify this
mapping, instead, it implicitly assumes that vCPU0 maps to the pCPU
with lowest pCPU ID, vCPU1 maps to the second lowest pCPU ID, and
so on.

This makes it possible for post-launched VM to run vCPUs on a subset of
these pCPUs only, and not all of them.

acrn-dm may launch post-launched VMs with the current approach: indicate
VM UUID and hypervisor launches all VCPUs from the PCPUs that are masked
in cpu_affinity_bitmap.

Also acrn-dm can choose to launch the VM on a subset of PCPUs that is
defined in cpu_affinity_bitmap. In this way, acrn-dm must specify the
subset of PCPUs in the CREATE_VM hypercall.

Additionally, with this change, a guest's vcpu_num can be easily calculated
from cpu_affinity_bitmap, so don't assign vcpu_num in vm_configuration.c.

Tracked-On: #4616
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-23 09:38:54 +08:00
..
assign.c hv: check if the IRQ is intended for a single destination vCPU 2020-04-15 13:47:22 +08:00
ept.c hv: iommu: disable snoop bit in EPT-PTE/SL-PTE 2020-04-16 08:40:17 +08:00
guest_memory.c hv: guest: fix bug in get_vcpu_paging_mode 2020-04-15 14:40:02 +08:00
hyperv.c hv: rename the ACRN_DBG_XXX 2020-01-14 10:21:23 +08:00
instr_emul.c hv: instr_emul: use cs segment when fetching instructions 2019-11-11 13:55:24 +08:00
pm.c hv: move out pause_vm from shutdown_vm 2020-04-16 21:59:03 +08:00
trusty.c hv: support xsave in context switch 2019-12-02 09:31:12 +08:00
ucode.c hv: cpuid: remove cpuid() 2020-03-25 13:26:58 +08:00
vcpu.c hv: add pre-condition for vcpu APIs 2020-04-16 21:59:03 +08:00
vcpuid.c hv: cpuid: remove cpuid() 2020-03-25 13:26:58 +08:00
ve820.c HV: fix wrong gpa start of hpa2 in ve820.c 2020-04-17 14:08:54 +08:00
virq.c hv: Wake up vCPU for interrupts from vPIC 2020-04-20 09:49:41 +08:00
virtual_cr.c hv: iommu: remove snoop related code 2020-04-16 08:40:17 +08:00
vlapic_priv.h hv: add ops to vlapic structure 2019-07-19 16:47:06 +08:00
vlapic.c hv: fix SOS vapic_id assignment issue 2020-04-15 14:34:15 +08:00
vm_reset.c hv: move out pause_vm from shutdown_vm 2020-04-16 21:59:03 +08:00
vm.c hv: replace vcpu_affinity array with cpu_affinity_bitmap 2020-04-23 09:38:54 +08:00
vmcall.c hv: vPCI: remove passthrough PCI device unuse code 2020-02-24 16:17:38 +08:00
vmcs.c hv: define posted interrupt IRQs/vectors 2020-04-15 13:47:22 +08:00
vmexit.c hv: HLT emulation in hypervisor 2020-01-07 11:23:32 +08:00
vmsr.c HV: emulate MSR_TEST_CTL 2020-04-17 09:53:59 +08:00
vmtrr.c hv: vmtrr: remove vcpu structure pointer from vmtrr 2020-03-31 10:57:47 +08:00
vmx_asm.S hv:remove some unnecessary includes 2019-05-07 09:10:13 +08:00
vmx_io.c hv: rename BOOT_CPU_ID to BSP_CPU_ID 2020-02-25 09:08:14 +08:00