]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vmm: Use a cpuset_t for vCPUs waiting for STARTUP IPIs.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 18 Nov 2022 18:05:10 +0000 (10:05 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 26 Jan 2023 22:05:52 +0000 (14:05 -0800)
commitb88a7eae3584c338c80611269b5790637386d798
treeff13c58937d3571a91bd26a728718aedbec90b8d
parentc4469e134e0479c03aedc3bf4e85221f29b1c26b
vmm: Use a cpuset_t for vCPUs waiting for STARTUP IPIs.

Retire the boot_state member of struct vlapic and instead use a cpuset
in the VM to track vCPUs waiting for STARTUP IPIs.  INIT IPIs add
vCPUs to this set, and STARTUP IPIs remove vCPUs from the set.
STARTUP IPIs are only reported to userland for vCPUs that were removed
from the set.

In particular, this permits a subsequent change to allocate vCPUs on
demand when the vCPU may not be allocated until after a STARTUP IPI is
reported to userland.

Reviewed by: corvink, markj
Differential Revision: https://reviews.freebsd.org/D37173

(cherry picked from commit c0f35dbf19c3c8825bd2b321d8efd582807d1940)
sys/amd64/include/vmm.h
sys/amd64/vmm/io/vlapic.c
sys/amd64/vmm/io/vlapic_priv.h
sys/amd64/vmm/vmm.c