-
Notifications
You must be signed in to change notification settings - Fork 15
[feat] add aarch64 el2 entry_guest and vmexit support #15
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
base: main
Are you sure you want to change the base?
Conversation
…_context_vm_entry
|
@equation314 ci fixed. |
…r flow in HANDLE_LOWER macro
|
Does this PR bring virtualization support back into Arceos again? @aarkegz If we want to integrate hypervisor into ArceOS, maybe we should refer to ARM/KVM with ARM VHE support? |
| access_flags |= PageFaultFlags::USER; | ||
| } | ||
| let vaddr = va!(FAR_EL1.get() as usize); | ||
| let vaddr = va!(elx!(FAR.get()) as usize); |
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.
Will elx!(FAR).get() be a better syntax?
|
|
||
| #[cfg(feature = "arm-el2")] | ||
| #[unsafe(no_mangle)] | ||
| fn handle_sync_exception(tf: &mut TrapFrame) { |
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.
Is it possible to merge these two handle_sync_exceptions? As they are very similar.
| /// | ||
| /// This function is marked as `naked` to avoid the compiler generating a prologue/epilogue, | ||
| #[unsafe(naked)] | ||
| pub unsafe extern "C" fn enter_guest() -> ! { |
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.
Add Registers as the argument.
| /// | ||
| /// This function is marked as `naked` to avoid the compiler generating a prologue/epilogue, | ||
| #[unsafe(naked)] | ||
| pub unsafe extern "C" fn enter_guest() -> ! { |
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.
Create a structure like UspaceContext to put this function?
| #[cfg(not(feature = "arm-el2"))] | ||
| { | ||
| paste::paste! { | ||
| aarch64_cpu::registers::[<$name _EL1>].$e |
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.
How about this method: rust-lang/rust#124225
Add aarch64 el2 trap handle support.