fix(xen): exclude 1MB lowmem from e820 scaling - #22
Merged
Conversation
Fixes: b0a3e48 ("x86/dom0: distribute PVH dom0 E820 RAM proportionally across host regions")
kaniini
approved these changes
Aug 10, 2026
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.
Fixes: b0a3e48 ("x86/dom0: distribute PVH dom0 E820 RAM proportionally across host regions")
Fixup to Edera-local b0a3e48: the PVH dom0 E820 proportional trim rationed the sub-1MB slice along with everything else, which at certain scaling sizes would break Linux's real-mode trampoline, which needs memory under 1 MB whose size doesn't scale with dom0's share.
A small dom0 on a large host got 12-80 KB where it needed a page-aligned chunk, and so died in
init_real_mode()before having a console.I was able to repro the dom0 crash locally with our 4.21 and
dom0_mem=1G+35%,max:8G, and this fix resolves it, allowing successful boot again.Also needs a 4.22 port, which I'll do separately. Targeting 4.21 first since we need to get a hotfix out on an existing release.