pub struct PageTableBuilder<'a> { /* private fields */ }Expand description
A builder for an x64 identity-mapped page table
Implementations§
Source§impl<'a> PageTableBuilder<'a>
impl<'a> PageTableBuilder<'a>
Sourcepub fn new(
page_table_gpa: u64,
page_table: &'a mut [PageTable],
flattened_page_table: &'a mut [u8],
ranges: &'a [MappedRange],
) -> Result<Self, Error>
pub fn new( page_table_gpa: u64, page_table: &'a mut [PageTable], flattened_page_table: &'a mut [u8], ranges: &'a [MappedRange], ) -> Result<Self, Error>
Creates a new instance of the page table builder. The PageTable slice is working memory for constructing the page table, and the u8 slice is the memory used to output the final bytes of the page table
The working memory and output memory are taken as parameters to allow for the caller to flexibly choose their allocation strategy, to support usage in no_std environments like openhcl_boot
Sourcepub fn with_confidential_bit(self, bit_position: u32) -> Self
pub fn with_confidential_bit(self, bit_position: u32) -> Self
Builds the page tables with the confidential bit set
Auto Trait Implementations§
impl<'a> Freeze for PageTableBuilder<'a>
impl<'a> RefUnwindSafe for PageTableBuilder<'a>
impl<'a> Send for PageTableBuilder<'a>
impl<'a> Sync for PageTableBuilder<'a>
impl<'a> Unpin for PageTableBuilder<'a>
impl<'a> !UnwindSafe for PageTableBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more