Skip to content

Backport #41 to 6.18-lts: xen/unpopulated-alloc: do not carve a region for a single node's pool - #43

Merged
azenla merged 2 commits into
edera/6.18-ltsfrom
backport/edera-6.18-lts/pr-41
Oct 19, 2026
Merged

azenla merged 2 commits into
edera/6.18-ltsfrom
backport/edera-6.18-lts/pr-41

Conversation

@edera-rebase-app

Copy link
Copy Markdown

Backport of #41 from edera/mainline to edera/6.18-lts (539665b2f6e8), prepared by Claude. Run log.

Merge with Rebase and merge, so edera/6.18-lts stays linear.

Independent checks

Builds: success (x86_64 and arm64 vmlinux with the Edera features built in).

LTS tip before 539665b2f6e8
LTS tip after 91c4d631756f
Commits requested 2
  • New branch fast-forwards the LTS tip.
  • Backported commits are linear.
  • All 2 requested commits backported in order, each with its source's subject and identical +/- lines.

Claude's report

Claude left no report (backport step: success).

Both commits are cherry-picked and `verify-backport.sh` passes. The x86_64 and arm64 builds are still running; I'll write the report when they finish.

A node whose pool is short called fill_list() even when other nodes
still held free pages. fill_list() takes new address space from
iomem_resource, which on a PVH dom0 can overlap MMIO that Xen has
identity mapped. A later grant map onto such a gfn makes Xen refuse the
p2m change and crash dom0.

Carve a new region only when every node's pool is short, and otherwise
take pages from the preferred node first, then the others. Return pages
to the pool of their own node when the PV p2m allocation fails.

(cherry picked from commit a071d85)
…ode variant

Borrowing across nodes made xen_alloc_unpopulated_pages_node() best
effort, so a caller that asked for a node could get pages of another.

The node variant now takes pages only from the requested node's pool and
fails with -ENOMEM when it is short. It no longer carves a region.
xen_alloc_unpopulated_pages() has no node requirement: it prefers the
local pool, borrows from other nodes, and carves a region only when
every pool is short. xenbus falls back to it when the node's pool is
short, and gnttab_alloc_pages_node() uses it for NUMA_NO_NODE.

(cherry picked from commit fc166a6)
@azenla
azenla merged commit a8b42f4 into edera/6.18-lts Oct 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant