Skip to content

Polish guest register state API - #42

Merged
zhangxp1998 merged 1 commit into
google:mainfrom
zhangxp1998:followup/pr41-register-state-api
Jul 3, 2026
Merged

Polish guest register state API#42
zhangxp1998 merged 1 commit into
google:mainfrom
zhangxp1998:followup/pr41-register-state-api

Conversation

@zhangxp1998

@zhangxp1998 zhangxp1998 commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Make GuestRegisterStateRef::write_gpr unsafe and return a Result for invalid register indexes.
  • Replace the tuple-returning exception_return() helper with named return address/status accessors.
  • Pass the saved non-volatile register frame as &mut NonVolatileRegisters instead of a raw pointer.
  • Address the remaining PR Add stage-2 MMIO handler support #41 review comments: use LazyLock, use ArrayVec::is_full(), expose the remaining crate-local helpers as pub, and make read-result extension a DecodedMemoryAccess method.

Follow-up for review comments left on #41 after it was merged.

Tests

  • cargo fmt --all -- --check
  • git diff --check
  • make build PLATFORM=qemu
  • make test PLATFORM=qemu
  • make clippy PLATFORM=qemu

@qwandor
qwandor self-requested a review June 25, 2026 16:34
@m4tx
m4tx self-requested a review June 26, 2026 09:17
Comment thread memory_access/src/lib.rs Outdated
Comment thread src/exceptions.rs Outdated
Comment thread src/exceptions.rs Outdated
Comment thread src/hvc_response.rs
Comment thread src/hvc_response.rs
@zhangxp1998
zhangxp1998 force-pushed the followup/pr41-register-state-api branch from c13bfb6 to d5d1106 Compare July 3, 2026 05:31
@zhangxp1998
zhangxp1998 force-pushed the followup/pr41-register-state-api branch from d5d1106 to a662f9e Compare July 3, 2026 05:39
@zhangxp1998
zhangxp1998 merged commit 5576cd6 into google:main Jul 3, 2026
10 checks passed
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