HomeFreeBSD

bhyve: fix resume for vms with guest_ncpus > 1

Description

bhyve: fix resume for vms with guest_ncpus > 1

This error occurs because vm->vcpu[1] has not been allocated yet when
vm_snapshot_vm() is called.

To fix this, move spinup_vcpu() before restore code.

Reviewed by: corvink, markj
MFC after: 2 weeks
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D38477

(cherry picked from commit 9ff3e8b7f09034202ad1f24f4fbbe52cf7f56117)

Details

Provenance
gusev.vitaliy_gmail.comAuthored on Feb 28 2023, 10:28 AM
corvinkCommitted on Mar 17 2023, 10:26 AM
Reviewer
corvink
Differential Revision
D38477: bhyve: Resume fails due to invalid guest state if guest_ncpus > 1
Parents
rG38acc80a5b69: bhyve: fix restore of kernel structs
Branches
Unknown
Tags
Unknown