HomeFreeBSD

bhyve: Optionally put vCPUs back in the debug state after resuming

Description

bhyve: Optionally put vCPUs back in the debug state after resuming

When the gdb stub is configured to pause guest execution upon boot (i.e.,
the "w" flag is passed to -G), vCPUs end up suspended in two senses: first,
suspended by the GDB stub (marked in the vcpus_suspended set), and suspended
by the kernel (because fbsdrun_addcpu() suspends APs before spawning their
vCPU threads). When the guest is resumed by the debugger, vCPUs are
unsuspended in both senses, but this is not correct for APs.

Hack around this problem by re-suspending vCPUs after the debugger
resumes guest execution, if they were suspended beforehand.

Reviewed by: corvink, jhb
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D46196

Details

Provenance
markjAuthored on Aug 7 2024, 7:27 PM
Reviewer
corvink
Differential Revision
D46196: bhyve: Optionally put vCPUs back in the debug state after resuming
Parents
rGc349e881cf52: rack, bbr: cleanup ack throttling
Branches
Unknown
Tags
Unknown