Skip to main content

VirtualizationTranslationControlRegister

Struct VirtualizationTranslationControlRegister 

Source
pub struct VirtualizationTranslationControlRegister(/* private fields */);
Expand description

The layout of VTCR_EL2.

Implementations§

Source§

impl VirtualizationTranslationControlRegister

Source

pub const RSVD1_MASK: u64

Mask of all reserved-as-1 bits.

Source

pub const RSVD0_MASK: u64

Mask of all reserved-as-0 bits.

Source

pub const DEFAULT: u64

The default value of the layout, combining all field defaults and reserved-as values.

Source

pub const HDBSS_MASK: u64

Unshifted bitmask of hdbss.

Source

pub const HDBSS_SHIFT: usize = 45

Bit shift (i.e., the low bit) of hdbss.

Source

pub const HAFT_MASK: u64

Unshifted bitmask of haft.

Source

pub const HAFT_SHIFT: usize = 44

Bit shift (i.e., the low bit) of haft.

Source

pub const TL0_MASK: u64

Unshifted bitmask of tl0.

Source

pub const TL0_SHIFT: usize = 41

Bit shift (i.e., the low bit) of tl0.

Source

pub const GCSH_MASK: u64

Unshifted bitmask of gcsh.

Source

pub const GCSH_SHIFT: usize = 40

Bit shift (i.e., the low bit) of gcsh.

Source

pub const D128_MASK: u64

Unshifted bitmask of d128.

Source

pub const D128_SHIFT: usize = 38

Bit shift (i.e., the low bit) of d128.

Source

pub const S2POE_MASK: u64

Unshifted bitmask of s2poe.

Source

pub const S2POE_SHIFT: usize = 37

Bit shift (i.e., the low bit) of s2poe.

Source

pub const S2PIE_MASK: u64

Unshifted bitmask of s2pie.

Source

pub const S2PIE_SHIFT: usize = 36

Bit shift (i.e., the low bit) of s2pie.

Source

pub const TL1_MASK: u64

Unshifted bitmask of tl1.

Source

pub const TL1_SHIFT: usize = 35

Bit shift (i.e., the low bit) of tl1.

Source

pub const ASSURED_ONLY_MASK: u64

Unshifted bitmask of assured_only.

Source

pub const ASSURED_ONLY_SHIFT: usize = 34

Bit shift (i.e., the low bit) of assured_only.

Source

pub const SL2_MASK: u64

Unshifted bitmask of sl2.

Source

pub const SL2_SHIFT: usize = 33

Bit shift (i.e., the low bit) of sl2.

Source

pub const DS_MASK: u64

Unshifted bitmask of ds.

Source

pub const DS_SHIFT: usize = 32

Bit shift (i.e., the low bit) of ds.

Source

pub const NSA_MASK: u64

Unshifted bitmask of nsa.

Source

pub const NSA_SHIFT: usize = 30

Bit shift (i.e., the low bit) of nsa.

Source

pub const NSW_MASK: u64

Unshifted bitmask of nsw.

Source

pub const NSW_SHIFT: usize = 29

Bit shift (i.e., the low bit) of nsw.

Source

pub const HWU62_MASK: u64

Unshifted bitmask of hwu62.

Source

pub const HWU62_SHIFT: usize = 28

Bit shift (i.e., the low bit) of hwu62.

Source

pub const HWU61_MASK: u64

Unshifted bitmask of hwu61.

Source

pub const HWU61_SHIFT: usize = 27

Bit shift (i.e., the low bit) of hwu61.

Source

pub const HWU60_MASK: u64

Unshifted bitmask of hwu60.

Source

pub const HWU60_SHIFT: usize = 26

Bit shift (i.e., the low bit) of hwu60.

Source

pub const HWU59_MASK: u64

Unshifted bitmask of hwu59.

Source

pub const HWU59_SHIFT: usize = 25

Bit shift (i.e., the low bit) of hwu59.

Source

pub const HD_MASK: u64

Unshifted bitmask of hd.

Source

pub const HD_SHIFT: usize = 22

Bit shift (i.e., the low bit) of hd.

Source

pub const HA_MASK: u64

Unshifted bitmask of ha.

Source

pub const HA_SHIFT: usize = 21

Bit shift (i.e., the low bit) of ha.

Source

pub const VS_MASK: u64

Unshifted bitmask of vs.

Source

pub const VS_SHIFT: usize = 19

Bit shift (i.e., the low bit) of vs.

Source

pub const PS_MASK: u64

Unshifted bitmask of ps.

Source

pub const PS_SHIFT: usize = 16

Bit shift (i.e., the low bit) of ps.

Source

pub const TG0_MASK: u64

Unshifted bitmask of tg0.

Source

pub const TG0_SHIFT: usize = 14

Bit shift (i.e., the low bit) of tg0.

Source

pub const SH0_MASK: u64

Unshifted bitmask of sh0.

Source

pub const SH0_SHIFT: usize = 12

Bit shift (i.e., the low bit) of sh0.

Source

pub const ORGN0_MASK: u64

Unshifted bitmask of orgn0.

Source

pub const ORGN0_SHIFT: usize = 10

Bit shift (i.e., the low bit) of orgn0.

Source

pub const IRGN0_MASK: u64

Unshifted bitmask of irgn0.

Source

pub const IRGN0_SHIFT: usize = 8

Bit shift (i.e., the low bit) of irgn0.

Source

pub const SL0_MASK: u64

Unshifted bitmask of sl0.

Source

pub const SL0_SHIFT: usize = 6

Bit shift (i.e., the low bit) of sl0.

Source

pub const T0SZ_MASK: u64

Unshifted bitmask of t0sz.

Source

pub const T0SZ_SHIFT: usize = 0

Bit shift (i.e., the low bit) of t0sz.

Source

pub const FIELDS: [FieldMetadata<u64>; 27]

Metadata of all named fields in the layout.

Source

pub const fn new() -> Self

Creates a new instance with reserved-as-1 bits set and all other bits zeroed (i.e., with a value of Self::RSVD1_MASK).

Source

pub const fn bits(self) -> u64

Source

pub const fn hdbss(&self) -> bool

The value of VirtualizationTranslationControlRegister45.

Source

pub const fn set_hdbss(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister45.

Source

pub const fn haft(&self) -> bool

The value of VirtualizationTranslationControlRegister44.

Source

pub const fn set_haft(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister44.

Source

pub const fn tl0(&self) -> bool

The value of VirtualizationTranslationControlRegister41.

Source

pub const fn set_tl0(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister41.

Source

pub const fn gcsh(&self) -> bool

The value of VirtualizationTranslationControlRegister40.

Source

pub const fn set_gcsh(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister40.

Source

pub const fn d128(&self) -> bool

The value of VirtualizationTranslationControlRegister38.

Source

pub const fn set_d128(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister38.

Source

pub const fn s2poe(&self) -> bool

The value of VirtualizationTranslationControlRegister37.

Source

pub const fn set_s2poe(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister37.

Source

pub const fn s2pie(&self) -> bool

The value of VirtualizationTranslationControlRegister36.

Source

pub const fn set_s2pie(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister36.

Source

pub const fn tl1(&self) -> bool

The value of VirtualizationTranslationControlRegister35.

Source

pub const fn set_tl1(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister35.

Source

pub const fn assured_only(&self) -> bool

The value of VirtualizationTranslationControlRegister34.

Source

pub const fn set_assured_only(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister34.

Source

pub const fn sl2(&self) -> bool

The value of VirtualizationTranslationControlRegister33.

Source

pub const fn set_sl2(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister33.

Source

pub const fn ds(&self) -> bool

The value of VirtualizationTranslationControlRegister32.

Source

pub const fn set_ds(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister32.

Source

pub const fn nsa(&self) -> bool

The value of VirtualizationTranslationControlRegister30.

Source

pub const fn set_nsa(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister30.

Source

pub const fn nsw(&self) -> bool

The value of VirtualizationTranslationControlRegister29.

Source

pub const fn set_nsw(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister29.

Source

pub const fn hwu62(&self) -> bool

The value of VirtualizationTranslationControlRegister28.

Source

pub const fn set_hwu62(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister28.

Source

pub const fn hwu61(&self) -> bool

The value of VirtualizationTranslationControlRegister27.

Source

pub const fn set_hwu61(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister27.

Source

pub const fn hwu60(&self) -> bool

The value of VirtualizationTranslationControlRegister26.

Source

pub const fn set_hwu60(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister26.

Source

pub const fn hwu59(&self) -> bool

The value of VirtualizationTranslationControlRegister25.

Source

pub const fn set_hwu59(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister25.

Source

pub const fn hd(&self) -> bool

The value of VirtualizationTranslationControlRegister22.

Source

pub const fn set_hd(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister22.

Source

pub const fn ha(&self) -> bool

The value of VirtualizationTranslationControlRegister21.

Source

pub const fn set_ha(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister21.

Source

pub const fn vs(&self) -> bool

The value of VirtualizationTranslationControlRegister19.

Source

pub const fn set_vs(&mut self, value: bool) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister19.

Source

pub fn ps(&self) -> PhysicalAddressSize

The value of VirtualizationTranslationControlRegister[18:16].

§Panics

Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_ps to recover from invalid bit patterns.

Source

pub fn try_ps(&self) -> Result<PhysicalAddressSize, InvalidBits<u8>>

Fallible variant of Self::ps.

Source

pub fn set_ps(&mut self, value: PhysicalAddressSize) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister[18:16].

Source

pub fn tg0(&self) -> TcrTg0Value

The value of VirtualizationTranslationControlRegister[15:14].

§Panics

Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_tg0 to recover from invalid bit patterns.

Source

pub fn try_tg0(&self) -> Result<TcrTg0Value, InvalidBits<u8>>

Fallible variant of Self::tg0.

Source

pub fn set_tg0(&mut self, value: TcrTg0Value) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister[15:14].

Source

pub fn sh0(&self) -> ShareabilityAttribute

The value of VirtualizationTranslationControlRegister[13:12].

§Panics

Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_sh0 to recover from invalid bit patterns.

Source

pub fn try_sh0(&self) -> Result<ShareabilityAttribute, InvalidBits<u8>>

Fallible variant of Self::sh0.

Source

pub fn set_sh0(&mut self, value: ShareabilityAttribute) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister[13:12].

Source

pub fn orgn0(&self) -> CacheabilityAttribute

The value of VirtualizationTranslationControlRegister[11:10].

§Panics

Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_orgn0 to recover from invalid bit patterns.

Source

pub fn try_orgn0(&self) -> Result<CacheabilityAttribute, InvalidBits<u8>>

Fallible variant of Self::orgn0.

Source

pub fn set_orgn0(&mut self, value: CacheabilityAttribute) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister[11:10].

Source

pub fn irgn0(&self) -> CacheabilityAttribute

The value of VirtualizationTranslationControlRegister[9:8].

§Panics

Panics if the field’s bit pattern is not a valid value of the custom representation. Use Self::try_irgn0 to recover from invalid bit patterns.

Source

pub fn try_irgn0(&self) -> Result<CacheabilityAttribute, InvalidBits<u8>>

Fallible variant of Self::irgn0.

Source

pub fn set_irgn0(&mut self, value: CacheabilityAttribute) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister[9:8].

Source

pub const fn sl0(&self) -> u8

The value of VirtualizationTranslationControlRegister[7:6].

Source

pub const fn set_sl0(&mut self, value: u8) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister[7:6].

Source

pub const fn t0sz(&self) -> u8

The value of VirtualizationTranslationControlRegister[5:0].

Source

pub const fn set_t0sz(&mut self, value: u8) -> &mut Self

Sets the value of VirtualizationTranslationControlRegister[5:0].

Source§

impl VirtualizationTranslationControlRegister

Source

pub fn iter(&self) -> VirtualizationTranslationControlRegisterIter

Returns an iterator over (metadata, value) pairs for each field.

Trait Implementations§

Source§

impl Binary for VirtualizationTranslationControlRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Clone for VirtualizationTranslationControlRegister

Source§

fn clone(&self) -> VirtualizationTranslationControlRegister

Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for VirtualizationTranslationControlRegister

Source§

impl Debug for VirtualizationTranslationControlRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VirtualizationTranslationControlRegister

Source§

fn default() -> Self

Returns an instance with the default bits set (i.e,. with a value of Self::DEFAULT.

Source§

impl Eq for VirtualizationTranslationControlRegister

Source§

impl From<VirtualizationTranslationControlRegister> for u64

Source§

fn from(value: VirtualizationTranslationControlRegister) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for VirtualizationTranslationControlRegister

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl IntoIterator for VirtualizationTranslationControlRegister

Source§

type Item = (&'static FieldMetadata<u64>, u64)

The type of the elements being iterated over.
Source§

type IntoIter = VirtualizationTranslationControlRegisterIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> IntoIterator for &'a VirtualizationTranslationControlRegister

Source§

type Item = (&'static FieldMetadata<u64>, u64)

The type of the elements being iterated over.
Source§

type IntoIter = VirtualizationTranslationControlRegisterIter

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl LowerHex for VirtualizationTranslationControlRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Octal for VirtualizationTranslationControlRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for VirtualizationTranslationControlRegister

Source§

fn eq(&self, other: &VirtualizationTranslationControlRegister) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable)§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for VirtualizationTranslationControlRegister

Source§

impl UpperHex for VirtualizationTranslationControlRegister

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

Source§

impl<Layout, Base> LayoutOver<Base> for Layout
where Layout: Copy + From<Base> + Into<Base>,

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.