Repository navigation
kernelx: preserve explicitly committed physical pages on unmap - #934
Babyhamsta wants to merge 1 commit into
Conversation
VirtualAlloc can populate a lazy mapping without entering the fault handler. Save the committed spans before releasing the mapping and keep reserved spans zero. Keep unreadable mappings intact so the caller can restore access and retry.
|
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean Two more passing tests than main: preserving explicitly committed physical pages on unmap is exercised and green. Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it. |
|
Heads-up: this branch no longer merges cleanly. Rebuild today: Not tested: retail titles (none here), Windows, RDNA4. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
A Windows
VirtualAlloccommit can populate a lazy physical-page mapping without invoking XCL's lazy fault handler. Unmapping then discards the bytes as if the page were untouched.What is in it
Tested
cargo test --workspace --offline --locked -- --test-threads=4reported 718 passed, 0 failed, 41 ignored. Two of the reported passes printedSKIPPEDfor no wave64:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.Regression run
Both clean builds ran the upstream smoke script offline for 60 seconds with fresh private data and separate cold DXIL caches. An earlier pair with copied saves hit the same startup breakpoint on both builds, so the fresh-profile pair below is the gate.
Main
This PR
Not tested
AI use