Repository navigation
x86/mem_sharing: let fork_complete leave a child lazy - #54
Merged
Merged
Conversation
azenla
requested review from
alexandermerritt,
bleggett,
kaniini and
tycho
as code owners
October 18, 2026 02:52
antoineco
previously approved these changes
Oct 18, 2026
kaniini
previously approved these changes
Oct 18, 2026
Contributor
|
lgtm but needs rebase |
XENMEM_FORK_COMPLETE_LAZY makes the child runnable the way fork_complete does, by unmapping the vcpu areas it inherited and lifting the interrupt block, but skips materializing the physmap and keeps the parent link and its pause, so the child keeps faulting pages in from a parent that has to stay paused.
azenla
force-pushed
the
azenla/feat/fork-complete-lazy
branch
from
October 18, 2026 23:18
07ff2bc to
9d8a5bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
XENMEM_FORK_COMPLETE_LAZYtoXENMEM_sharing_op_fork_complete. A lazy completion makes the child runnable the way a normal completion does: it unmaps the vcpu areas the child inherited and lifts the interrupt block. It skips the walk of the parent's physmap and keeps the parent link and the parent's pause, so the child faults pages in from the parent through the existingmem_sharing_fork_page()path.The parent has to stay paused and alive for as long as the child lives. A hypervisor without this change rejects the flag with
EINVAL. A hypervisor with it answersENOSYSwhen the flag is sent to a domain that is not a fork, so a toolstack can probe for support without completing anything.Measured with a 512 MiB PVH zone, forking a suspended parent:
Four lazy children of one parent ran and answered ping, and destroying the children and then the parent did not panic.