Tests: cover CLWB, MONITORX, MWAITX, and faulting CLZERO in eh #1819

Open
n-romanovich wants to merge 1 commit from upstream-pr/1829 into main
n-romanovich commented 2026-11-24 21:32:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by n-romanovich on 2026-11-24T21:32:05Z.


Test-only PR covering untested emulate_console_only paths in crates/xcl/src/eh.rs.

What is in it

  • crates/xcl/src/eh.rs (#[cfg(test)] mod tests):
    • MappedCode RAII helper for mapped test code pages.
    • clwb_patches_instruction_bytes_to_nop_and_advances_rip: verifies CLWB [rax] (66 0F AE 30) on PAGE_EXECUTE_READ patches the 4 instruction bytes to 0x90, advances Rip by 4, and restores PAGE_EXECUTE_READ.
    • monitorx_mwaitx_step_and_ud2_or_unknown_return_zero: verifies MONITORX/MWAITX advance Rip by 3, while UD2 and non-console illegal opcodes return 0 without advancing Rip.
    • clzero_on_unwritable_memory_does_not_advance_rip: verifies CLZERO targeting PAGE_READONLY memory returns 0 and leaves Rip unchanged.

Tested
Hardware: Windows 11 x64, NVIDIA GeForce RTX 5060 Ti.

  • cargo test -p xcl --lib eh::tests -- --test-threads=4: 9 passed; 0 failed; 0 ignored
  • cargo test --workspace -- --test-threads=4: 894 passed; 0 failed; 42 ignored
    • SKIPPED: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64), shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (Windows Developer Mode is required), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)

Regression run
Main (4178e888c0b5be50a2887eda45cdb832763b68a4):

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: NVIDIA GeForce RTX 5060 Ti
title: FILES
seconds: 60
exit: 0x0
frames shown: 1538 (PresentX 1538)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14871 MB

PR (61400714562d119b2aa727996ef9f95bfc0aa34a):

xcl-smoke v1
commit: 61400714562d119b2aa727996ef9f95bfc0aa34a
gpu: NVIDIA GeForce RTX 5060 Ti
title: FILES
seconds: 60
exit: 0x0
frames shown: 1516 (PresentX 1516)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17337 MB

Not tested

  • macOS / Linux (crate targets Windows only).

AI use

  • Antigravity (Claude Sonnet 5.5): wrote the unit tests, ran the workspace test suite and smoke.ps1, and verified the diff with an independent auditor subagent.
<!-- greyfinch-sync:ivall/xcl:issue:5480686303 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1829). Originally posted by [n-romanovich](https://github.com/n-romanovich) on 2026-11-24T21:32:05Z. --- Test-only PR covering untested `emulate_console_only` paths in `crates/xcl/src/eh.rs`. **What is in it** - `crates/xcl/src/eh.rs` (`#[cfg(test)] mod tests`): - `MappedCode` RAII helper for mapped test code pages. - `clwb_patches_instruction_bytes_to_nop_and_advances_rip`: verifies `CLWB [rax]` (`66 0F AE 30`) on `PAGE_EXECUTE_READ` patches the 4 instruction bytes to `0x90`, advances `Rip` by 4, and restores `PAGE_EXECUTE_READ`. - `monitorx_mwaitx_step_and_ud2_or_unknown_return_zero`: verifies `MONITORX`/`MWAITX` advance `Rip` by 3, while `UD2` and non-console illegal opcodes return `0` without advancing `Rip`. - `clzero_on_unwritable_memory_does_not_advance_rip`: verifies `CLZERO` targeting `PAGE_READONLY` memory returns `0` and leaves `Rip` unchanged. **Tested** Hardware: Windows 11 x64, NVIDIA GeForce RTX 5060 Ti. - `cargo test -p xcl --lib eh::tests -- --test-threads=4`: `9 passed; 0 failed; 0 ignored` - `cargo test --workspace -- --test-threads=4`: `894 passed; 0 failed; 42 ignored` - `SKIPPED`: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`), `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`), `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` (`Windows Developer Mode is required`), `heap_window_out_of_memory_falls_back_to_the_switch_form` (`no heap windows`) **Regression run** Main (`4178e888c0b5be50a2887eda45cdb832763b68a4`): ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: NVIDIA GeForce RTX 5060 Ti title: FILES seconds: 60 exit: 0x0 frames shown: 1538 (PresentX 1538) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14871 MB ``` PR (`61400714562d119b2aa727996ef9f95bfc0aa34a`): ``` xcl-smoke v1 commit: 61400714562d119b2aa727996ef9f95bfc0aa34a gpu: NVIDIA GeForce RTX 5060 Ti title: FILES seconds: 60 exit: 0x0 frames shown: 1516 (PresentX 1516) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17337 MB ``` **Not tested** - macOS / Linux (crate targets Windows only). **AI use** - Antigravity (`Claude Sonnet 5.5`): wrote the unit tests, ran the workspace test suite and `smoke.ps1`, and verified the diff with an independent auditor subagent.
futurepro62 commented 2026-11-24 23:08:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T22:40:30Z.


Full-suite run, since this PR has no test report yet. Tested exact head 6140071 (on its base 4178e88).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --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: 893 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: clwb_patches_instruction_bytes_to_nop_and_advances_rip, monitorx_mwaitx_step_and_ud2_or_unknown_return_zero, clzero_on_unwritable_memory_does_not_advance_rip.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 894 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • On NVIDIA, --skip leaves out five tests where this PR's base has them. They fail on main 689f2db too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. These are heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7146511086 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1829#issuecomment-7146511086). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T22:40:30Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `6140071` (on its base `4178e88`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --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`: **893 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `clwb_patches_instruction_bytes_to_nop_and_advances_rip`, `monitorx_mwaitx_step_and_ud2_or_unknown_return_zero`, `clzero_on_unwritable_memory_does_not_advance_rip`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **894 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - On NVIDIA, `--skip` leaves out five tests where this PR's base has them. They fail on main `689f2db` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. These are `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-25 01:10:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T00:50:47Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7148943603 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1829#issuecomment-7148943603). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T00:50:47Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
JJAutoCompare commented 2026-11-25 02:08:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T01:14:50Z.


Empirical test report for PR #1829 at commit 61400714562d119b2aa727996ef9f95bfc0aa34a (origin/main = 5796cc467d80e3dac5d7d231ec34f1b0bebce169; git merge-tree --write-tree origin/main HEAD exited 0, clean merge into tree c79068f343819014189c07b879b120ad961e370f).

Diff scope verified: test-only addition in crates/xcl/src/eh.rs (+97 lines in #[cfg(test)] mod tests).

Tested

  • Hardware & environment: Intel(R) Arc(TM) A770 Graphics (16258 MiB VRAM, driver 32.0.101.9175, XCL_ADAPTER=A770), AMD Ryzen 7 3800X 8-Core Processor (6 cores / 12 logical processors exposed in VM; Zen 2 natively supports CLWB/MONITORX/MWAITX/CLZERO, though the PR's tests exercise emulate_console_only(&mut ctx) directly on mapped test pages), Microsoft Windows 11 Enterprise Evaluation 10.0.26200 (Build 26200), rustc 1.100.0 (0ef1bc386 2026-11-09) / cargo 1.100.0, debug (test/dev) profile, DXC 1.9.2609.5 (01b62ad47) (dxil 1.9.2609.5).
  • Build:
    • cargo test --workspace --no-run: passed (exit 0)
    • cargo build --workspace: passed (exit 0)
  • Targeted eh unit tests:
    • cargo test -p xcl --lib eh::tests -- --show-output: 9 passed, 0 failed, 0 ignored (858 filtered out; 0.04s), including all 3 new PR #1829 tests:
      • eh::tests::clwb_patches_instruction_bytes_to_nop_and_advances_rip — ok
      • eh::tests::monitorx_mwaitx_step_and_ud2_or_unknown_return_zero — ok
      • eh::tests::clzero_on_unwritable_memory_does_not_advance_rip — ok
  • Full workspace suite (on Arc A770):
    • cargo test --workspace -- --test-threads=4 --show-output: stopped after xcl --lib (828 passed, 17 failed, 22 ignored; 4 SKIPPED lines in xcl --lib).
    • cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output: across all 20 test binaries (including doc-tests), 876 passed, 18 failed, 42 ignored (0 measured, 0 filtered out).
      • All 18 failures are pre-existing Intel Arc A770 GPU/driver issues unrelated to crates/xcl/src/eh.rs:
        • 13 CreateComputePipelineState: The parameter is incorrect. (0x80070057) in xcl --lib: gpu::dxil::ops_tests::{doubles_match_cpu, groupshared_barrier_and_atomics_run}, gpu::recomp::tests::{gpu_clamp_and_omod_per_instruction, gpu_f64_class_compare, gpu_f64_compares_with_nan, gpu_f64_literal_high_word, gpu_f64_math_random, gpu_f64_roots, gpu_f64_rounding_and_conversions, gpu_float_compares_random, gpu_frexp_f64_exp_and_mant, gpu_ldexp_f64, gpu_rndne_f64}.
        • 4 Arc A770 shader/wave mismatches in xcl --lib: gpu::recomp::tests::{gpu_nonfused_mad_and_mac_prevent_fma_contraction, gpu_ps_image_sample_offset_implicit_lod_between_mips, gpu_valu_16_and_64_bit, gpu_wave64_ps_whole_wave_reductions}.
        • 1 in tests/e2e.rs: test_title_runs_and_game_folder_is_untouched (49/50 checks passed; failed on D3D12.X: dynamic depth bias via RSSetDepthBiasX (#94)).
      • All other 18 test binaries (bcpack_parity, console_dlls_e2e, console_shaders, disasm_e2e, gpu_compute_e2e, gpu_pso_e2e, heap_probe, low_va, pls_quota, predication_e2e, rpf_e2e, shaders_e2e, sparse_reinit, texture_states, xg_oracle, xcl bin, xcl-testtitle bin, xcl doc-tests) passed with 0 failures.
  • SKIPPED GPU/D3D12 tests on this adapter (7 total — not counted as coverage):
    • SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
    • SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)
    • SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2
    • SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll
    • SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
    • SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))

Not tested

  • Intel CPUs (or other CPUs lacking native CLWB / MONITORX / MWAITX / CLZERO that raise hardware #UD into the VEH handler)
  • Retail title / scripts/smoke.ps1 (diff is test-only in crates/xcl/src/eh.rs)
  • AMD and NVIDIA GPUs
  • Wave64 hardware, GPU FP64 pipelines, D3D12 debug layer / Windows Developer Mode driver-cache toggle, Tiled Resources Tier 2+
  • Release profile

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) — checked out the PR commit, ran the builds and test commands on this host, parsed the test logs, and wrote and posted this empirical test report.
<!-- greyfinch-sync:ivall/xcl:comment:7149353248 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1829#issuecomment-7149353248). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T01:14:50Z. --- Empirical test report for PR #1829 at commit `61400714562d119b2aa727996ef9f95bfc0aa34a` (`origin/main` = `5796cc467d80e3dac5d7d231ec34f1b0bebce169`; `git merge-tree --write-tree origin/main HEAD` exited `0`, clean merge into tree `c79068f343819014189c07b879b120ad961e370f`). Diff scope verified: test-only addition in `crates/xcl/src/eh.rs` (+97 lines in `#[cfg(test)] mod tests`). **Tested** - **Hardware & environment:** Intel(R) Arc(TM) A770 Graphics (16258 MiB VRAM, driver `32.0.101.9175`, `XCL_ADAPTER=A770`), AMD Ryzen 7 3800X 8-Core Processor (6 cores / 12 logical processors exposed in VM; Zen 2 natively supports `CLWB`/`MONITORX`/`MWAITX`/`CLZERO`, though the PR's tests exercise `emulate_console_only(&mut ctx)` directly on mapped test pages), Microsoft Windows 11 Enterprise Evaluation `10.0.26200` (Build `26200`), `rustc 1.100.0 (0ef1bc386 2026-11-09)` / `cargo 1.100.0`, debug (`test`/`dev`) profile, DXC `1.9.2609.5 (01b62ad47)` (`dxil 1.9.2609.5`). - **Build:** - `cargo test --workspace --no-run`: passed (exit 0) - `cargo build --workspace`: passed (exit 0) - **Targeted `eh` unit tests:** - `cargo test -p xcl --lib eh::tests -- --show-output`: **9 passed, 0 failed, 0 ignored** (858 filtered out; 0.04s), including all 3 new PR #1829 tests: - `eh::tests::clwb_patches_instruction_bytes_to_nop_and_advances_rip` — `ok` - `eh::tests::monitorx_mwaitx_step_and_ud2_or_unknown_return_zero` — `ok` - `eh::tests::clzero_on_unwritable_memory_does_not_advance_rip` — `ok` - **Full workspace suite (on Arc A770):** - `cargo test --workspace -- --test-threads=4 --show-output`: stopped after `xcl --lib` (`828 passed, 17 failed, 22 ignored`; 4 `SKIPPED` lines in `xcl --lib`). - `cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output`: across all 20 test binaries (including doc-tests), **876 passed, 18 failed, 42 ignored** (0 measured, 0 filtered out). - All 18 failures are pre-existing Intel Arc A770 GPU/driver issues unrelated to `crates/xcl/src/eh.rs`: - 13 `CreateComputePipelineState: The parameter is incorrect. (0x80070057)` in `xcl --lib`: `gpu::dxil::ops_tests::{doubles_match_cpu, groupshared_barrier_and_atomics_run}`, `gpu::recomp::tests::{gpu_clamp_and_omod_per_instruction, gpu_f64_class_compare, gpu_f64_compares_with_nan, gpu_f64_literal_high_word, gpu_f64_math_random, gpu_f64_roots, gpu_f64_rounding_and_conversions, gpu_float_compares_random, gpu_frexp_f64_exp_and_mant, gpu_ldexp_f64, gpu_rndne_f64}`. - 4 Arc A770 shader/wave mismatches in `xcl --lib`: `gpu::recomp::tests::{gpu_nonfused_mad_and_mac_prevent_fma_contraction, gpu_ps_image_sample_offset_implicit_lod_between_mips, gpu_valu_16_and_64_bit, gpu_wave64_ps_whole_wave_reductions}`. - 1 in `tests/e2e.rs`: `test_title_runs_and_game_folder_is_untouched` (49/50 checks passed; failed on `D3D12.X: dynamic depth bias via RSSetDepthBiasX (#94)`). - All other 18 test binaries (`bcpack_parity`, `console_dlls_e2e`, `console_shaders`, `disasm_e2e`, `gpu_compute_e2e`, `gpu_pso_e2e`, `heap_probe`, `low_va`, `pls_quota`, `predication_e2e`, `rpf_e2e`, `shaders_e2e`, `sparse_reinit`, `texture_states`, `xg_oracle`, `xcl` bin, `xcl-testtitle` bin, `xcl` doc-tests) passed with 0 failures. - **`SKIPPED` GPU/D3D12 tests on this adapter (7 total — not counted as coverage):** - `SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64` - `SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64` - `SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)` - `SKIPPED placed_title_textures_share_vram_and_preserve_pixels: tiled tier < 2` - `SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll` - `SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows` - `SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))` **Not tested** - Intel CPUs (or other CPUs lacking native `CLWB` / `MONITORX` / `MWAITX` / `CLZERO` that raise hardware `#UD` into the VEH handler) - Retail title / `scripts/smoke.ps1` (diff is test-only in `crates/xcl/src/eh.rs`) - AMD and NVIDIA GPUs - Wave64 hardware, GPU FP64 pipelines, D3D12 debug layer / Windows Developer Mode driver-cache toggle, Tiled Resources Tier 2+ - Release profile **AI use** - T3 Code / Antigravity (Gemini 4 Neon) — checked out the PR commit, ran the builds and test commands on this host, parsed the test logs, and wrote and posted this empirical test report.
github-actions[bot] commented 2026-11-28 08:02:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:02:16Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7236320570 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1829#issuecomment-7236320570). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:02:16Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 06:55:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:55:20Z.


Triage (#1607) – head 6140071

Partly covered on main since this PR was opened. clwb_single_step_keeps_code_and_normal_faults_still_patch already checks CLWB patching and the restored protection. monitorx_and_mwaitx_are_rewritten_at_their_first_fault already checks MONITORX/MWAITX. New here: ud2 and an unknown opcode return 0, and a CLZERO on read-only memory returns 0 without moving Rip.
Main now rewrites MONITORX/MWAITX and remembers the sites. After a rebase, monitorx_mwaitx_step_and_ud2_or_unknown_return_zero should call forget_rewritten_waits before freeing its page, as main's test does. The CLWB test duplicates main's and could be dropped.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7303437740 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1829#issuecomment-7303437740). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:55:20Z. --- **Triage (#1607)** – head 6140071 Partly covered on main since this PR was opened. `clwb_single_step_keeps_code_and_normal_faults_still_patch` already checks CLWB patching and the restored protection. `monitorx_and_mwaitx_are_rewritten_at_their_first_fault` already checks MONITORX/MWAITX. New here: `ud2` and an unknown opcode return 0, and a CLZERO on read-only memory returns 0 without moving `Rip`. Main now rewrites MONITORX/MWAITX and remembers the sites. After a rebase, `monitorx_mwaitx_step_and_ud2_or_unknown_return_zero` should call `forget_rewritten_waits` before freeing its page, as main's test does. The CLWB test duplicates main's and could be dropped. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1829:upstream-pr/1829'
git switch 'upstream-pr/1829'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1829'
git switch 'upstream-pr/1829'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1829'
git switch 'upstream-pr/1829'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1829'
git switch 'main'
git merge --squash 'upstream-pr/1829'
git switch 'main'
git merge --ff-only 'upstream-pr/1829'
git switch 'main'
git merge 'upstream-pr/1829'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1819
No description provided.