Allow package child to pin external providers until exit #943

Merged
R0Y00 merged 2 commits from upstream-pr/950 into main 2026-11-23 18:49:02 +00:00
R0Y00 commented 2026-11-23 18:27:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T18:27:56Z.


Refs #870

Allow the package child to pin explicitly selected external providers for its process lifetime. Validate the provider bindings before pinning, and retain the existing behavior for ordinary shims.

Windows Release verification: built pe_map and cpu_cookie_exe, then ran ctest --preset release --no-tests=error -R '^cpu_package_shim_lifetime$'. The source-built EXE returned 42 both times. The ordinary provider unloaded and the pinned provider remained mapped until process exit. 1/1 passed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6566090610 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/950). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T18:27:56Z. --- Refs #870 Allow the package child to pin explicitly selected external providers for its process lifetime. Validate the provider bindings before pinning, and retain the existing behavior for ordinary shims. Windows Release verification: built `pe_map` and `cpu_cookie_exe`, then ran `ctest --preset release --no-tests=error -R '^cpu_package_shim_lifetime$'`. The source-built EXE returned 42 both times. The ordinary provider unloaded and the pinned provider remained mapped until process exit. 1/1 passed.
upstream-sync closed this pull request 2026-11-24 06:45:33 +00:00
R0Y00 commented 2026-11-24 06:49:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T18:33:25Z.


I checked the package lifetime change and the CMake integration with #914. On Windows Release, cpu_package_shim_lifetime and cpu_native_load_dispatch both ran and passed. Additional local controls verified that a preflight with the pin flag leaves the provider unloaded and that an unused pin name is rejected before any of the requested modules are pinned. The runner releases ordinary provider references, while the selected provider stays mapped until the isolated child exits. Callers still need to quiesce any provider calls into guest code before returning. The latest update carries the CMake fix and leaves the runner and fixture unchanged.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7110330261 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/950#issuecomment-7110330261). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T18:33:25Z. --- I checked the package lifetime change and the CMake integration with #914. On Windows Release, cpu_package_shim_lifetime and cpu_native_load_dispatch both ran and passed. Additional local controls verified that a preflight with the pin flag leaves the provider unloaded and that an unused pin name is rejected before any of the requested modules are pinned. The runner releases ordinary provider references, while the selected provider stays mapped until the isolated child exits. Callers still need to quiesce any provider calls into guest code before returning. The latest update carries the CMake fix and leaves the runner and fixture unchanged.
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
R0Y00/Xbox2Windows!943
No description provided.