]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
libxl: fix population of the online vCPU bitmap for PVH
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 10 May 2024 12:49:13 +0000 (14:49 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 10 May 2024 23:13:43 +0000 (00:13 +0100)
commit5cc7347b04b2d0a3133754c7a9b936f614ec656a
treea08d5f59a0360c5bfc1a9f7fc485ea588010d16b
parent996576b965ccdf0de17aafa14282925e408e1200
libxl: fix population of the online vCPU bitmap for PVH

libxl passes some information to libacpi to create the ACPI table for a PVH
guest, and among that information it's a bitmap of which vCPUs are online
which can be less than the maximum number of vCPUs assigned to the domain.

While the population of the bitmap is done correctly for HVM based on the
number of online vCPUs, for PVH the population of the bitmap is done based on
the number of maximum vCPUs allowed.  This leads to all local APIC entries in
the MADT being set as enabled, which contradicts the data in xenstore if vCPUs
is different than maximum vCPUs.

Fix by copying the internal libxl bitmap that's populated based on the vCPUs
parameter.

Reported-by: Arthur Borsboom <arthurborsboom@gmail.com>
Link: https://gitlab.com/libvirt/libvirt/-/issues/399
Reported-by: Leigh Brown <leigh@solinno.co.uk>
Fixes: 14c0d328da2b ('libxl/acpi: Build ACPI tables for HVMlite guests')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Leigh Brown <leigh@solinno.co.uk>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/light/libxl_x86_acpi.c