summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorDavid Hildenbrand (Arm) <david@kernel.org>2026-10-31 10:40:12 +0100
committerDavid Hildenbrand (Arm) <david@kernel.org>2026-11-03 20:20:53 +0100
commit23e570927421d569fdc510d5f3f29542a43eeda5 (patch)
tree19ab5e611989a7caffadd899b9409c27b7f59294 /tools/perf/scripts/python
parent0193e83368022a308d19ee0293f55a4f5d548e40 (diff)
mm/huge_memory: split huge PUDs when adjusting VMA boundaries
PFN mappings such as VFIO PCI BAR mappings can use PUD leaves while allowing VMA splits at page granularity. However, vma_adjust_trans_huge() only handles PMDs. After faulting a writable PUD-sized VFIO BAR mapping, changing its first page to read-only with mprotect() makes the PMD walk treat the PUD leaf as a PMD table. Applying MADV_DONTFORK to the first PMD-sized chunk leaves the PUD spanning two VMAs: the PMD-aligned boundary skips splitting. Walk the page tables once at each adjusted boundary and split a huge PUD or PMD leaf as needed. Handle PUD leaves even when the boundary is PMD-aligned. Fixes: f9e54c3a2f5b7 ("vfio/pci: implement huge_fault support") Cc: stable@vger.kernel.org Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com> Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Link: https://patch.msgid.link/20261031-fixes_core-v3-43-d6437171ecc3@kernel.org Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions