HomeFreeBSD

vmm: Fix AP startup with old userspace binaries.

Description

vmm: Fix AP startup with old userspace binaries.

Older binaries that do not request IPI exits to userspace do not
start user threads for other vCPUs until a STARTUP IPI triggers a
VM_EXITCODE_SPINUP_AP exit to userland. This means that those vcpus
are not yet active (in terms of vm_active_cpus) when the INIT and
STARTUP IPIs are delivered to the vCPUs.

The changes in commit 0bda8d3e9f7a changed the INIT and STARTUP IPIs
to reuse the existing vlapic_calcdest() function. This function
silently ignores IPIs sent to inactive vCPUs. As a result, when using
an old bhyve binary, the INIT and STARTUP IPIs sent to wakeup APs were
ignored.

To fix, restructure the compat code for the INIT and STARTUP IPIs to
ignore the results of vlapic_calcdest() and manually parse the APIC ID
and resulting vcpuid. As part of this, make the compat code always
conditonal on the ipi_exit capability being disabled.

Reviewed by: c.koehne_beckhoff.com, markj
Differential Revision: https://reviews.freebsd.org/D37093

Details

Provenance
jhbAuthored on Oct 26 2022, 9:22 PM
Reviewer
corvink
Differential Revision
D37093: vmm: Fix AP startup with old userspace binaries.
Parents
rG8aa64f307368: UPDATING: correct spearate typo
Branches
Unknown
Tags
Unknown