-
Notifications
You must be signed in to change notification settings - Fork 12
Fix bugs and support axvisor to run 2 vms #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the RISC-V hypervisor (axvisor) to support running 2 virtual machines simultaneously by fixing critical bugs and implementing missing features for proper VM context switching.
Key changes:
- Fixed trap cause handling by correcting
SupervisorEnvCalltoVirtualSupervisorEnvCalland page fault exceptions to their guest equivalents - Implemented VS-mode CSR save/restore in
bind/unbindoperations to enable proper vCPU context switching - Added htinst register decoding support for handling transformed instructions and pseudo-instructions during guest page faults
- Added basic SRST SBI extension support for VM shutdown capability
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| src/vcpu.rs | Core changes including trap cause fixes, VS CSR load/store in bind/unbind, htinst-based instruction decoding, SRST extension handler, and GPR indexing corrections |
| src/lib.rs | Modified RISCVVCpuCreateConfig to use raw usize for dtb_addr instead of GuestPhysAddr, and exported GprIndex publicly |
| Cargo.toml | Updated riscv dependency to use a Git repository fork |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Axvisor's issue:
arceos-hypervisor/axvisor#303
Features:
bind/unbindEID_SRSTsbi extension's simple supportDemo: