You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5cfdf92
Browse filesBrowse the repository at this point in the historyBrowse files
openvmm_core: instantiate only the requested VP prefix on MSHV restore
The CLI --restore-processors option and the TTRPC restore processor
count pass an explicit restore-time activation target to the VM worker
as restore_vp_count, which is documented to make MSHV create and bind
only VPs 0..N-1. Nothing read the field, so every MSHV restore created,
restored, and ran the full VP capacity of the snapshot, as KVM and WHP
do. The guest still onlined exactly N CPUs, so only the host-side
saving was lost.
This change belongs in fdefb05 ("openvmm: bring a restore-time
processor prefix online"). That commit documented that an explicit MSHV
restore target instantiates and binds only the VP prefix, while the
worker still built the partition unit with the active_vp_count of None
that 920ab57 ("vmm_core: instantiate an active VP prefix") set. The
gRPC reference update belongs in b4eef6f ("vmservice: create,
capture, and restore microVMs over the management RPC"), which added
restore_processor_count.
Take the target with the other restore inputs and keep it only for
MSHV, which creates application processors lazily while binding them.
Before any VP is bound, check the target against the topology capacity,
discard the binders after the prefix, and pass the prefix to the
partition unit, which validates the complete saved VP inventory before
restoring only the prefix and rejects saving the reduced runtime. KVM,
WHP, and untargeted MSHV restores keep the full capacity. This relies on
the previous commit, which limits restored-TSC synchronization to the
created VPs.
Emit the startup.vp_thread_bind, startup.vp_bind_bsp, and
startup.vp_bind_ap_<INDEX> profile phases that NVX documents, so
lifecycle profiling shows which VPs a restore binds. On a bare-metal
MSHV host, restoring a capacity-8 snapshot now binds exactly N VPs, and
worker construction drops from about 97 ms to about 11 ms for one or two
VPs.
Unit tests cover the MSHV-only selection, discarding the suffix
binders, keeping every binder without a target, and rejecting an
out-of-range prefix, a prefix without saved state, and a backend that
returns fewer binders than the capacity. The worker parameter
documentation and the gRPC reference describe the backend-specific
behavior.
See microsoft/nvx#219.
Fixes: fdefb05 ("openvmm: bring a restore-time processor prefix online")
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments