pub struct Stage2Translation<'a> { /* private fields */ }

Implementations§

source§

impl<'a> Stage2Translation<'a>

source

pub fn new(rtt_base: usize) -> Self

Trait Implementations§

source§

impl<'a> Debug for Stage2Translation<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> IPATranslation for Stage2Translation<'a>

source§

fn ipa_to_pa(&mut self, guest: GuestPhysAddr, level: usize) -> Option<PhysAddr>

Retrieves Page Table Entry (PA) from Intermediate Physical Address (IPA)

(input) guest: a target guest physical address to translate level: the intended page-table level to reach

(output) if exists, physical address else, None

source§

fn ipa_to_pte( &mut self, guest: GuestPhysAddr, level: usize ) -> Option<(u64, usize)>

Retrieves Page Table Entry (PTE) from Intermediate Physical Address (IPA)

(input) guest: a target guest physical address to translate level: the intended page-table level to reach

(output) if exists, A tuple of (pte value (u64), lastly reached page table level (usize)) else, None

source§

fn get_base_address(&self) -> *const c_void

source§

fn ipa_to_pte_set( &mut self, guest: GuestPhysAddr, level: usize, val: u64 ) -> Result<(), Error>

source§

fn clean(&mut self)

source§

impl<'a> MemAlloc for Stage2Translation<'a>

source§

unsafe fn alloc(layout: Layout) -> *mut u8

source§

unsafe fn alloc_zeroed(layout: Layout) -> *mut u8

source§

unsafe fn dealloc(ptr: *mut u8, layout: Layout)

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Stage2Translation<'a>

§

impl<'a> Send for Stage2Translation<'a>

§

impl<'a> Sync for Stage2Translation<'a>

§

impl<'a> Unpin for Stage2Translation<'a>

§

impl<'a> !UnwindSafe for Stage2Translation<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.