vmi_arch_amd64/
address.rs

1use vmi_core::{Architecture as _, Gfn, Pa};
2
3use crate::{Amd64, Cr3};
4
5impl From<Cr3> for Gfn {
6    fn from(value: Cr3) -> Self {
7        Self(value.page_frame_number())
8    }
9}
10
11impl From<Cr3> for Pa {
12    fn from(value: Cr3) -> Self {
13        Amd64::pa_from_gfn(Gfn::from(value))
14    }
15}