kernelx: delegate current-process VirtualAllocEx/FreeEx/ProtectEx #1554
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1564"
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?
Imported from ivall/xcl. Originally posted by hajduzsolt on 2026-11-24T17:43:28Z.
Delegates VirtualAllocEx, VirtualFreeEx, and VirtualProtectEx to XCL's VirtualAlloc, VirtualFree, and VirtualProtect when targeting GetCurrentProcess(), fixing console/placeholder/graphics flag stripping and missing placeholder cleanup. Part of #1489.
What is in it
Tested
Regression run
main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:41:24Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
upstream-sync referenced this pull request2026-11-25 04:08:41 +00:00
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T11:18:24Z.
Independent desktop NVIDIA verification of PR #1564 at head
48e36e8155f17f2ee935422b3bd9e2180581e575(1commit; exact parent & merge-base:c160d86ef2efe3a07e4dfb473e4fa72eafb413c0, pre-#2555ancestor ofmain).Environment
7956 MiBreported by D3D12, Wave32-only Ada), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted tests & build (
48e36e81)cargo test --release -p xcl --lib virtual_alloc_ex_and_protect_ex_current_process_delegation -- --nocapture(3 consecutive runs)1 passed; 0 failed; 0 ignored; 831 filtered out× 3 (0.02s,0.02s,0.02s,0skipped)cargo test --release -p xcl --lib hle::kernelx:: -- --nocapture(3 consecutive runs)32 passed; 0 failed; 1 ignored; 799 filtered out× 3 (0.21s,0.22s,0.23s,0runtime skips;1pre-existing#[ignore]timing testscatter_timing)cargo build --release -p xcl1m 22s, exit0,0new warnings inkernelx.rs)Paired quiet 60 s retail smoke (
title: 29640639)(Note:
scripts/smoke.ps1atc160d86epredates9683e7a6and printed the local folder basename ontitle:; replaced below with the standard9683e7a6title hash29640639, with all measured fields verbatim.)Exact parent & merge-base (
c160d86ef2efe3a07e4dfb473e4fa72eafb413c0):PR #1564 (
48e36e8155f17f2ee935422b3bd9e2180581e575):Limits of coverage
virtual_alloc_ex_and_protect_ex_current_process_delegationand the fullhle::kernelx::suite (32/32active tests,0runtime skips) passed3/3on Windows 11, directly covering current-processVirtualAllocEx/VirtualFreeEx/VirtualProtectExdelegation.0device removals,0crashes); single-run frame/commit delta vs. parent reflects normal startup variance.AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-27T17:59:10Z.
NVIDIA and AMD full-suite run, to go with the reports above by Decodere, since none of them covers AMD. Tested exact head
48e36e81(on its basec160d86).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 858 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.virtual_alloc_ex_and_protect_ex_current_process_delegation.XCL_ADAPTER=radeon),cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 859 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main6089122atoo, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T18:00:53Z.
Tested on AMD / Linux:
48e36e81(RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimentalexperimental-11.0-20261112with vkd3d-proton masterec207194plus a local patch dropping thelpVtblchecks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0,x86_64-pc-windows-gnudebug build, tests run under Wine)The head as it is (not merged onto current
main), with its basec160d86ethe same session as the baseline.Tests (
XCL_REQUIRE_GPU=wave64)cargo test -p xcl --lib -- hle::kernelx:: --test-threads=1: 32 passed, 0 failed, 1 ignored (includesvirtual_alloc_ex_and_protect_ex_current_process_delegation).cargo test --workspace --no-fail-fast -- --test-threads=4with--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole(the first loses the RADV device here, the other two run out of memory under Wine): lib 796 passed, 14 failed, 22 ignored; basec160d86elib (same flags): 795 passed, 14 failed, 22 ignored, the same 14. The other binaries fail the same 3 tests as onmainhere (e2e,pls_quota,predication_e2e).Not tested
AI use
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:08:14Z.
Triage (#1607) – head
48e36e8Most of this is on main already: commit
a0780942makesVirtualAllocExfor the own process callVirtualAlloc(own_process, which also matches handles by process ID), andVirtualProtectExfor the own process does whatVirtualProtectdoes. #1796 (D91, closed) made only theVirtualAllocExpart.What is still not on main is the unconditional
VirtualFreeEx->VirtualFreefor the own process. Main still sends non-UMA, non-sparse addresses tomem::VirtualFreeEx, which skipsplaceholders::free.On rebase, keep only the
VirtualFreeExchange, useown_processinstead of== GetCurrentProcess(), and keep the placeholder part of the test.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.