Replies: 3 comments 24 replies
-
Beta Was this translation helpful? Give feedback.
-
|
An
⬆️Why is There's one more thing: in rust, type alias does not create new types. Aliasing both |
Beta Was this translation helpful? Give feedback.
-
|
Updates allowing generic virtual address have been merged into |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
From the perspective of an ordinary OS address space, we only need to consider the concepts of physical address and virtual address.
That is,
VirtAddrandPhysAddrfrom memory_addr crate.However, as a hypervisor, we need to take care of two-stage address translation, which brings the concept of
GuestVirtAddrandGuestPhysAddr, along withHostVirtAddrandHostPhysAddr.I am currently working on refactor the address space management for guest VM in
axvmcrate.I find that axvcpu has definition of
GuestVirtAddrandGuestPhysAddr, like this:Also, axvm also has its own definition of
GuestVirtAddrandGuestPhysAddr(althrough it simply regards them asusize).During my refactor process, I hope to integrate them into the
axaddrspacecrate, like this:Because
axaddrspaceessentially needs to manage the translation betweenGuestPhysAddrtoHostPhysAddr, which isVirtAddrtoPhysAddrfrom the aspect ofmemory_addrcrate.My question is, from the perspective of
arceos-vmmapp, does it need to take care ofHostPhysAddrandGuestPhysAddr, or does it only need to take care of theVirtAddrandPhysAddrperspective?Note: we need to implement
AxVMHalImplforaxvm'sAxVMHal Traitinarceos-vmmapp.I just use
memory_addr::{PhysAddr, VirtAddr}in arceos-vmm because I think onlyaxvmcrate should care forHostPhysAddrandGuestPhysAddr.Beta Was this translation helpful? Give feedback.
All reactions