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,
VirtAddr
andPhysAddr
from memory_addr crate.However, as a hypervisor, we need to take care of two-stage address translation, which brings the concept of
GuestVirtAddr
andGuestPhysAddr
, along withHostVirtAddr
andHostPhysAddr
.I am currently working on refactor the address space management for guest VM in
axvm
crate.I find that axvcpu has definition of
GuestVirtAddr
andGuestPhysAddr
, like this:Also, axvm also has its own definition of
GuestVirtAddr
andGuestPhysAddr
(althrough it simply regards them asusize
).During my refactor process, I hope to integrate them into the
axaddrspace
crate, like this:Because
axaddrspace
essentially needs to manage the translation betweenGuestPhysAddr
toHostPhysAddr
, which isVirtAddr
toPhysAddr
from the aspect ofmemory_addr
crate.My question is, from the perspective of
arceos-vmm
app, does it need to take care ofHostPhysAddr
andGuestPhysAddr
, or does it only need to take care of theVirtAddr
andPhysAddr
perspective?Note: we need to implement
AxVMHalImpl
foraxvm
'sAxVMHal Trait
inarceos-vmm
app.I just use
memory_addr::{PhysAddr, VirtAddr}
in arceos-vmm because I think onlyaxvm
crate should care forHostPhysAddr
andGuestPhysAddr
.Beta Was this translation helpful? Give feedback.
All reactions