The interfaces which the underlying software (kernel or hypervisor) must implement.
| 2 | |
| 3 | /// The interfaces which the underlying software (kernel or hypervisor) must implement. |
| 4 | pub trait RvmHal: Sized { |
| 5 | /// Allocates a 4K-sized contiguous physical page, returns its physical address. |
| 6 | fn alloc_page() -> Option<HostPhysAddr>; |
| 7 | /// Deallocates the given physical page. |
| 8 | fn dealloc_page(paddr: HostPhysAddr); |
| 9 | /// Converts a physical address to a virtual address which can access. |
| 10 | fn phys_to_virt(paddr: HostPhysAddr) -> HostVirtAddr; |
| 11 | /// Converts a virtual address to the corresponding physical address. |
| 12 | fn virt_to_phys(vaddr: HostVirtAddr) -> HostPhysAddr; |
| 13 | /// VM-Exit handler. |
| 14 | fn vmexit_handler(vcpu: &mut crate::RvmVcpu<Self>); |
| 15 | /// Current time in nanoseconds. |
| 16 | fn current_time_nanos() -> u64; |
| 17 | } |
nothing calls this directly
no outgoing calls
no test coverage detected