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

Details

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