Skip to content

refactor(aarch64): replace psci crate with smccc - #445

Merged
agicy merged 1 commit into
devfrom
luanlai/smccc
Nov 23, 2026
Merged

agicy merged 1 commit into
devfrom
luanlai/smccc

Conversation

@agicy

@agicy agicy commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replace the renamed psci dependency with smccc 0.2.3 and use the explicit Smc calling convention for PSCI calls.

The guest-facing PSCI emulation in src/arch/aarch64/trap.rs is unchanged; this PR updates the underlying crate, direct SMC helper, PSCI calls, error type, and Cargo.lock.

Motivation

The psci crate has been renamed to smccc. The new crate exposes the same PSCI operations through an explicit calling-convention type, so hvisor should use smccc::Smc instead of relying on the old psci crate feature selection.

Verification

Passed:

  • cargo check for aarch64 with the final stack.
  • make elf for aarch64/qemu-gicv3.
  • QEMU aarch64/gicv3 with root + 1 guest:
    • cpu 2 started at 0x50400000
    • ROOT_ALIVE_OK
    • GUEST_TEST_DONE
  • cargo fmt --all -- --check.
  • Non-src Rust rustfmt check.

Risks and Limitations

  • The change is aarch64-only; other architectures are unaffected.
  • PSCI behavior is intended to be identical, but reset/off paths were not exercised in this PR.
  • The dependency and lockfile change needs the normal license and security review.

@agicy
agicy added this pull request to stack #444 November 23, 2026 05:12
@agicy
agicy force-pushed the luanlai/smccc branch 3 times, most recently from e596fd5 to 9e1fe85 Compare November 23, 2026 11:47
Base automatically changed from luanlai/ci-fmt to dev November 23, 2026 12:21
@li041
li041 self-requested a review November 23, 2026 12:25
@li041

li041 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

LGTM! It does make sense to replace psci crate with smccc which has more downloads and updates recently.

@agicy
agicy merged commit 804ca06 into dev Nov 23, 2026
10 of 32 checks passed
@agicy
agicy deleted the luanlai/smccc branch November 23, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants