cloud-hypervisor/vmm/src
Thomas Barrett 5c0b66529a arch: x86_64: handle npot CPU topology
This PR addresses a bug in which the cpu topology of a guest
with non power-of-two number of cores is incorrect. For example,
in some contexts, a virtual machine with 2-sockets and 12-cores
will incorrectly believe that 16 cores are on socket 1 and 8
cores are on socket 2. In other cases, common topology enumeration
software such as hwloc will crash.

The root of the problem was the way that cloud-hypervisor generates
apic_id. On x86_64, the (x2) apic_id embeds information about cpu
topology. The cpuid instruction is primarily used to discover the
number of sockets, dies, cores, threads, etc. Using this information,
the (x2) apic_id is masked to determine which {core, die, socket} the
cpu is on. When the cpu topology is not a power of two
(e.g. a 12-core machine), this requires non-contiguous (x2) apic_id.

Signed-off-by: Thomas Barrett <tbarrett@crusoeenergy.com>
2024-01-01 10:05:03 +00:00
..
api vmm: add add-user-device support in cloud-hypervisor.yaml 2023-11-21 09:13:22 +00:00
igvm vmm: igvm: Generate memory map for SEV-SNP guests 2023-12-18 08:55:43 -08:00
acpi.rs arch: x86_64: handle npot CPU topology 2024-01-01 10:05:03 +00:00
clone3.rs vmm: notify virtio-console of pty resizes 2021-09-14 15:43:25 +01:00
config.rs vmm: Add IGVM to the config/commandline 2023-12-08 09:22:42 -08:00
coredump.rs vmm: Automatically pause VM for coredump 2023-07-31 17:05:46 +01:00
cpu.rs arch: x86_64: handle npot CPU topology 2024-01-01 10:05:03 +00:00
device_manager.rs vmm: Allow IP configuration on named TAP interfaces 2023-12-05 08:59:04 -08:00
device_tree.rs vmm: reduce memory copy when BFT device tree 2023-05-15 17:19:48 +01:00
gdb.rs build: Bump gdbstub and gdbstub_arch 2023-12-05 10:50:06 +00:00
interrupt.rs vm-device: support batch update interrupt source group GSI 2023-08-03 15:58:36 +01:00
lib.rs vmm: tdx: Error out early for TD migration 2023-12-12 11:45:40 -08:00
memory_manager.rs vmm: assign each pci segment 32-bit mmio allocator 2023-11-20 15:33:50 -08:00
migration.rs vmm: speed up JSON load when reading snap files 2023-11-16 14:56:04 -08:00
pci_segment.rs vmm: assign each pci segment 32-bit mmio allocator 2023-11-20 15:33:50 -08:00
seccomp_filters.rs virtio-devices, vmm: Update seccomp list 2023-10-31 15:34:17 +00:00
serial_manager.rs serial_manager: Remove serial socket 2023-10-05 15:26:29 +01:00
sigwinch_listener.rs vmm: sigwinch_listener: Remove unncessary mut from reference 2023-08-22 12:01:54 +01:00
vm_config.rs vmm: Add IGVM to the config/commandline 2023-12-08 09:22:42 -08:00
vm.rs arch: x86_64: handle npot CPU topology 2024-01-01 10:05:03 +00:00