forked from coconut-svsm/svsm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request coconut-svsm#461 from msft-jlange/page_validate
platform: extend the way pages are identified for validation/invalidation
- Loading branch information
Showing
14 changed files
with
288 additions
and
108 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,7 @@ | |
// | ||
// Author: Joerg Roedel <[email protected]> | ||
|
||
use super::features::cpu_has_nx; | ||
use super::msr::{read_msr, write_msr, EFER}; | ||
use crate::platform::SvsmPlatform; | ||
use bitflags::bitflags; | ||
|
||
bitflags! { | ||
|
@@ -34,15 +32,3 @@ pub fn write_efer(efer: EFERFlags) { | |
let val = efer.bits(); | ||
write_msr(EFER, val); | ||
} | ||
|
||
pub fn efer_init(platform: &dyn SvsmPlatform) { | ||
let mut efer = read_efer(); | ||
|
||
// All processors that are capable of virtualization will support | ||
// no-execute table entries, so there is no reason to support any processor | ||
// that does not enumerate NX capability. | ||
assert!(cpu_has_nx(platform), "CPU does not support NX"); | ||
|
||
efer.insert(EFERFlags::NXE); | ||
write_efer(efer); | ||
} |
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
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.