acrn-hypervisor/hypervisor/arch/x86
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
..
boot hv: a few fixes for multiboot2 boot 2020-03-24 08:44:20 +08:00
configs hv: replace vcpu_affinity array with cpu_affinity_bitmap 2020-04-23 09:38:54 +08:00
guest hv: replace vcpu_affinity array with cpu_affinity_bitmap 2020-04-23 09:38:54 +08:00
lib hv: refine retpoline speculation barriers 2020-02-26 09:24:54 +08:00
seed HV: init and sanitize acrn multiboot info 2020-02-26 09:24:16 +08:00
cpu_caps.c HV: enumerate capability of #AC for Splitlock Access 2020-04-17 09:53:59 +08:00
cpu_state_tbl.c
cpu.c HV: enable #AC for Splitlock Access 2020-04-17 09:53:59 +08:00
e820.c hv: Reserve space for VMs' EPT 4k pages after boot 2020-04-01 21:13:37 +08:00
gdt.c
idt.S HV: Install a NMI handler in acrn IDT 2019-12-13 10:13:09 +08:00
init.c hv: wrap a function to initialize pCPU for second phase 2020-04-16 14:02:29 +08:00
ioapic.c hv: vioapic init for SOS VM on platforms with multiple IO-APICs 2020-03-25 09:36:18 +08:00
irq.c hv: define posted interrupt IRQs/vectors 2020-04-15 13:47:22 +08:00
Kconfig HV: remove sdc2 scenario support 2020-04-20 14:59:23 +08:00
lapic.c HV: clean up redundant macro in lapic.h 2019-12-27 12:27:08 +08:00
mmu.c hv: Hypervisor access to PCI devices with 64-bit MMIO BARs 2020-04-13 16:52:18 +08:00
notify.c hv: maintain a per-pCPU array of vCPUs and handle posted interrupt IRQs 2020-04-15 13:47:22 +08:00
page.c hv: Hypervisor access to PCI devices with 64-bit MMIO BARs 2020-04-13 16:52:18 +08:00
pagetable.c hv: mmu: minor fix about add_pte 2020-03-09 10:03:01 +08:00
platform_caps.c hv: add function to check if using posted interrupt is possible for vm 2020-04-15 13:47:22 +08:00
pm.c pm: S5: update the system shutdown logical in ACRN 2019-12-23 15:15:09 +08:00
rdt.c HV: Add MBA support in ACRN 2020-03-04 17:33:50 +08:00
sched.S
security.c hv: config: add an option to disable mce on psc workaround 2019-12-03 09:17:04 +08:00
sgx.c
timer.c hv: list: rename list_entry to container_of 2020-03-31 10:57:47 +08:00
trampoline.c hv: refine 'uint64_t' string print format in x86 moudle 2019-11-09 11:42:38 +08:00
vmx.c
vtd.c hv: iommu: remove snoop related code 2020-04-16 08:40:17 +08:00
wakeup.S