#[repr(C)]pub struct GuestPolicy(pub u32);Expand description
The firmware associates each guest with a guest policy that the guest owner provides. The firmware restricts what actions the hypervisor can take on the guest according to the guest policy. The policy also indicates the minimum firmware version to for the guest.
The guest owner provides the guest policy to the firmware during launch. The firmware then binds the policy to the guest. The policy cannot be changed throughout the lifetime of the guest. The policy is also migrated with the guest and enforced by the destination platform firmware.
| Bit(s) | Name | Description > |––––|––––––––|———————————————————————————————> | 0 | NODBG | Debugging of the guest is disallowed when set > | 1 | NOKS | Sharing keys with other guests is disallowed when set > | 2 | ES | CSV2 is required when set > | 3 | NOSEND | Sending the guest to another platform is disallowed when set > | 4 | DOMAIN | The guest must not be transmitted to another platform that is not in the domain when set. > | 5 | CSV | The guest must not be transmitted to another platform that is not CSV capable when set. > | 6 | CSV3 | The guest must not be transmitted to another platform that is not CSV3 capable when set. > | 7 | ASID_REUSE | Sharing asids with other guests owned by same user is allowed when set > | 11:8 | HSK_VERSION | The guest must not be transmitted to another platform with a lower HSK version. > | 15:12 | CEK_VERSION | The guest must not be transmitted to another platform with a lower CEK version. > | 23:16 | API_MAJOR | The guest must not be transmitted to another platform with a lower platform version. > | 31:24 | API_MINOR | The guest must not be transmitted to another platform with a lower platform version. >
Tuple Fields§
§0: u32Implementations§
Source§impl GuestPolicy
impl GuestPolicy
pub fn nodbg(&self) -> u32
pub fn noks(&self) -> u32
pub fn es(&self) -> u32
pub fn nosend(&self) -> u32
pub fn domain(&self) -> u32
pub fn csv(&self) -> u32
pub fn csv3(&self) -> u32
pub fn asid_reuse(&self) -> u32
pub fn hsk_version(&self) -> u32
pub fn cek_version(&self) -> u32
pub fn api_major(&self) -> u32
pub fn api_minor(&self) -> u32
Trait Implementations§
Source§impl<T> BitRange<T> for GuestPolicy
impl<T> BitRange<T> for GuestPolicy
Source§impl Clone for GuestPolicy
impl Clone for GuestPolicy
Source§fn clone(&self) -> GuestPolicy
fn clone(&self) -> GuestPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GuestPolicy
impl Debug for GuestPolicy
Source§impl Default for GuestPolicy
impl Default for GuestPolicy
Source§fn default() -> GuestPolicy
fn default() -> GuestPolicy
Source§impl<'de> Deserialize<'de> for GuestPolicy
impl<'de> Deserialize<'de> for GuestPolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for GuestPolicy
impl PartialEq for GuestPolicy
Source§fn eq(&self, other: &GuestPolicy) -> bool
fn eq(&self, other: &GuestPolicy) -> bool
self and other values to be equal, and is used by ==.