kernelx: physical pages as section slices that can be mapped at many addresses #2293
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2293
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2293"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@adiologydev on GitHub · 2026-11-25 12:45 UTC · original
adiologydev:kernelx/page-sections→main· +310 −0 · 2 files · 1 commits · openFirst part of the plan on #1031 (real aliasing of physical pages): a block of physical pages as one pagefile-backed section, mapped as views into placeholders, so a page can show at every address it is mapped at. Nothing calls it yet; part of #1031 / #697.
On the console a physical page mapped at several addresses is one page. XCL keeps a page at one address at a time and copies it when the title maps it elsewhere (
kernelx::move_away); a retail title maps its streamed pages into a pool, into the CPU view of a 24 GB reservation and into that reservation's GPU view.What is in it
crates/xcl/src/hle/kernelx/sections.rs(new):Section(aSEC_RESERVEpagefile-backed section of N 64 KiB pages),Section::map(a view of pagesfirst..first+ninto a placeholder withMapViewOfFile3/MEM_REPLACE_PLACEHOLDER),reserve/split/unmap(keeps the placeholder) /commit/release, andreplace_with_reservation/reservation_to_placeholder(ordinary, optionally write-watched memory in part of a placeholder). 7 unit tests.crates/xcl/src/hle/kernelx.rs: the module declaration.Measured in a standalone program (not part of the PR) on the machine below, 200 000 pages: map 2.2 µs, unmap 2.75 µs, commit 0.9 µs,
VirtualProtect0.5 µs a page.GetWriteWatchrefuses a range that holds a view (error 87) and one call cannot span two neighbouring reservations; one call per small reservation costs 0.83 µs.Tested
XCL_DXC_DIR), debug tests, release runs.cargo test --workspace -- --test-threads=4on03ceddb: 1101 passed, 4 failed, 26 ignored. The 4 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(CreateComputePipelineState→E_OUTOFMEMORYon this card, #1905);main568e7dbfails the same 4 here (1094 passed, 4 failed, 26 ignored). SKIPPED (23, the same onmain): 20 need 64-lane waves ("no wave64"), 3 per-lane f16 refusals inlower_dxil::tests::{f16,f32}_programs_on_the_gpu.cargo test -p xcl --lib kernelx::sections: 7 passed.Regression run
scripts/smoke.ps1 -Game <retail title> -Seconds 60, no input,mainfirst, same machine (each run'sxcl.exebuilt from a clean checkout of its commit):Not tested
MapViewOfFile3need a Windows 10 1803+ kernel – not tried under Wine).AI use
@nnonno91 on GitHub · 2026-11-25 14:56 UTC · original
Independent native Windows check of the section and placeholder primitives on
03ceddb0be3d06287ca21ae800dbb0d7f98049e7.Tested
cargo test --locked -p xcl --lib hle::kernelx::sections -- --nocapture --test-threads=1gave 7 passed, 0 failed, 0 ignored and no skips. The same page was visible through multiple addresses, committing through one view made it visible to the others, and unmapping left a reusable placeholder. The multi-page, write-watch adjacency and invalid-size checks also passed.Not tested
Wine, a retail title, performance, GPU integration and the full workspace suite.
AI use
OpenAI Codex (GPT-6.2 Sol) ran the checks and wrote this report.
@upipibi on GitHub · 2026-11-25 16:57 UTC · original
NVIDIA test report for
03ceddb(head as is, base568e7db), for #1607's NVIDIA list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, aftercargo build --workspace:cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 1152 passed, 0 failed, 46 ignored. The end-to-end title tests pass.main0829441on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests).hle::xaudio2, because its tests fail or hang on this machine onmaintoo. The PR doesn't touch it.no wave64on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off.AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
@DavidM1911 on GitHub · 2026-11-25 17:29 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@oni-swr on GitHub · 2026-11-25 18:33 UTC · original
RX 7800 XT (RDNA3, wave32/wave64) report on exact head
03ceddb0be3d06287ca21ae800dbb0d7f98049e7(as is, on its base568e7db7; no merge with currentmain, which merges cleanly).Tested
dxc.exefrom Windows SDK 10.0.26100.0.cargo test --workspace --no-fail-fast -- --test-threads=4on this head: 1160 passed, 1 failed, 46 ignored (21 targets). The one failure isfuzz_validate_and_gpu_1, which fails the same way onmain; nothing else failed.mainatc9ee916a: 1330 passed, 2 failed, 46 ignored (24 targets). The 2 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722: CPU0x7fffffff, GPU0x1) andgpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier.a_bridged_mask_write...does not exist on this older head, so onlyfuzz_validate_and_gpu_1is comparable withmain.hle::kernelx::sections::tests::*(e.g.a_page_mapped_at_two_addresses_is_one_page)SKIPPED(7 lines on the heads that have these tests, same asmain): the f16 / f32-conversion per-lane programs, "refused (unsupported V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32 ...)", andheap_window_out_of_memory_falls_back_to_the_switch_form("no heap windows").Not tested
scripts/smoke.ps1run (noxcl-smokeblocks): I did not run an untrusted retail executable. This is a test-suite report only, not the regression run the PR needs.AI use
@ClosetPie107 on GitHub · 2026-11-25 20:46 UTC · original
Independent AMD RDNA4 / Linux (Proton/Wine, RADV, native wave64) test report for head
03ceddb0be3d06287ca21ae800dbb0d7f98049e7(merged cleanly ontomain6d12f58).Hardware & environment
experimental-11.0-20261112),vkd3d-protonmasterec207194(3.2.0) +dxil-spirvb540c8a2+ relaxed-vtable patch (-Db_ndebug=true), DXVKv3.1.1-209, DXC1.9.2609.5, Rustx86_64-pc-windows-gnu(debug)Unit tests (
XCL_REQUIRE_GPU=wave64,XCL_DXC_DIR,VKD3D_CONFIG=ignore_shared_fence,--test-threads=1 --nocapture)hle::kernelx::sections: 7 passed, 0 failed, 0 ignored (0 skipped)a_page_mapped_at_two_addresses_is_one_page,a_run_of_pages_is_one_view,a_section_of_no_pages_is_refused,committing_through_one_view_commits_the_page_for_all,splitting_a_range_that_is_already_a_placeholder_is_a_no_op,unmapping_leaves_a_placeholder_for_the_next_page,write_watched_memory_lives_beside_views_in_one_placeholder), confirmingMapViewOfFile3/MEM_REPLACE_PLACEHOLDER+ write-watched neighbours work on Proton 11.Not tested
AI use
main, ran the tests under Proton on this machine, and drafted this report.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.