Skip to content

ntdll: finish ARM64EC cooperative suspend (fixes named-pipe stalls under FEX) - #40

Open
utkarshdalal wants to merge 2 commits into
proton_11.0from
fix/arm64ec-cooperative-suspend
Open

ntdll: finish ARM64EC cooperative suspend (fixes named-pipe stalls under FEX)#40
utkarshdalal wants to merge 2 commits into
proton_11.0from
fix/arm64ec-cooperative-suspend

Conversation

@utkarshdalal

Copy link
Copy Markdown

Backports two commits from Proton 11.0-2 onto the 11.0-1 branch we ship:

  • Revert "WIP: ntdll: ARM64EC suspend support"
  • ntdll: Add support for ARM64EC cooperative suspend (Jacek Caban, CW-Bug-Id #27308)

The WIP handler returns early from usr1_handler whenever the thread is in simulation or in a syscall callback, without a wineserver side to complete the protocol. When wineserver stops a thread to deliver a kernel APC (for example an async read completion on a named pipe) while that thread is inside its own select call, the reply is never delivered and both ends of the pipe wait forever.

Reproducer: two processes ping-ponging 112-byte messages over an overlapped named pipe (IOCP or event based) stall after a few hundred to a few thousand rounds on the Retroid Pocket 6 with FEX 2608. A +server trace shows select() with no reply followed by *sent signal* SIGUSR1 one millisecond later. This is what freezes every Chromium/CEF child process (mojo channels), e.g. the Rockstar Games Launcher Social Club UI.

The finished implementation matches the doorbell semantics FEX 2604+ expects (inverted doorbell, SELECT_COOPERATIVE_SUSPEND, STATUS_THREAD_WAS_SUSPENDED) and adds the wineserver protocol support that the WIP lacked.

🤖 Generated with Claude Code

CW-Bug-Id: #27308

This reverts commit 189b5e8.
When running simulated code, instead of suspending a thread immediately, the kernel
sets a registered doorbell, expecting the jit to stop execution as soon as it reaches
a consistent state that can be represented as an x86_64 context.

Based on patch by Billy Laws.

CW-Bug-Id: #27308

(cherry picked from commit b8d8f34)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants