-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a type-safe(r) wrapper around page tables in stage0
The `PageTable` struct from `x86_64` doesn't do any semantic checking of how you set up your page table beyond the fact that the physical address is valid. This CR creates a specific `set_nested_table` method for setting up page table hierarchies. It's still not _entirely_ type-safe -- we need to ensure lifetimes make sense and wrap things in `Pin` -- but it's a step in the direction of making page table ops safer. Note that the TDX crate does a lot of ops on the `PageTable` structs from the `x86_64` crate directly; that'll need to be cleaned up at some point as well. Bug: 377899703 Change-Id: Ibdcaa1ad096b99aafcb4452c0366e9aa3a54aba6
- Loading branch information
Showing
4 changed files
with
168 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.