-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
svsm/paging: Scrub memory before platform-specific invalidation
Instead of invalidating memory, TDP platforms only need to zero out its content before handing it over to the L2 guest. This is not equivalent to page invalidation because the page remains accepted after zeroing. Always scrub the memory region prior to performing platform-specific invalidation (which is a no-op on TDP platforms). This should have no functional impact on SNP platforms. To scrub a physical memory region, the following strategies are adopted: - Add a cap to the mapping size per iteration - Try using 4K temporary mappings when the mapping size is small enough (< 2M) and try using 2M temporary mappings otherwise - When a mapping guard cannot be created, reduce the mapping size by half Signed-off-by: Peter Fang <[email protected]>
- Loading branch information
Showing
1 changed file
with
56 additions
and
3 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