Struct hvdef::hypercall::TranslateGvaControlFlagsX64
source · pub struct TranslateGvaControlFlagsX64(/* private fields */);
Implementations§
source§impl TranslateGvaControlFlagsX64
impl TranslateGvaControlFlagsX64
sourcepub const fn validate_read(&self) -> bool
pub const fn validate_read(&self) -> bool
Request data read access
Bits: 0..1
sourcepub const fn with_validate_read(self, value: bool) -> Self
pub const fn with_validate_read(self, value: bool) -> Self
Request data read access
Bits: 0..1
sourcepub fn set_validate_read(&mut self, value: bool)
pub fn set_validate_read(&mut self, value: bool)
Request data read access
Bits: 0..1
sourcepub const fn validate_write(&self) -> bool
pub const fn validate_write(&self) -> bool
Request data write access
Bits: 1..2
sourcepub const fn with_validate_write(self, value: bool) -> Self
pub const fn with_validate_write(self, value: bool) -> Self
Request data write access
Bits: 1..2
sourcepub fn set_validate_write(&mut self, value: bool)
pub fn set_validate_write(&mut self, value: bool)
Request data write access
Bits: 1..2
sourcepub const fn validate_execute(&self) -> bool
pub const fn validate_execute(&self) -> bool
Request instruction fetch access.
Bits: 2..3
sourcepub const fn with_validate_execute(self, value: bool) -> Self
pub const fn with_validate_execute(self, value: bool) -> Self
Request instruction fetch access.
Bits: 2..3
sourcepub fn set_validate_execute(&mut self, value: bool)
pub fn set_validate_execute(&mut self, value: bool)
Request instruction fetch access.
Bits: 2..3
sourcepub const fn privilege_exempt(&self) -> bool
pub const fn privilege_exempt(&self) -> bool
Don’t enforce any checks related to access mode (supervisor vs. user; SMEP and SMAP are treated as disabled).
Bits: 3..4
sourcepub const fn with_privilege_exempt(self, value: bool) -> Self
pub const fn with_privilege_exempt(self, value: bool) -> Self
Don’t enforce any checks related to access mode (supervisor vs. user; SMEP and SMAP are treated as disabled).
Bits: 3..4
sourcepub fn set_privilege_exempt(&mut self, value: bool)
pub fn set_privilege_exempt(&mut self, value: bool)
Don’t enforce any checks related to access mode (supervisor vs. user; SMEP and SMAP are treated as disabled).
Bits: 3..4
sourcepub const fn set_page_table_bits(&self) -> bool
pub const fn set_page_table_bits(&self) -> bool
Set the appropriate page table bits (i.e. access/dirty bit)
Bits: 4..5
sourcepub const fn with_set_page_table_bits(self, value: bool) -> Self
pub const fn with_set_page_table_bits(self, value: bool) -> Self
Set the appropriate page table bits (i.e. access/dirty bit)
Bits: 4..5
sourcepub fn set_set_page_table_bits(&mut self, value: bool)
pub fn set_set_page_table_bits(&mut self, value: bool)
Set the appropriate page table bits (i.e. access/dirty bit)
Bits: 4..5
sourcepub const fn tlb_flush_inhibit(&self) -> bool
pub const fn tlb_flush_inhibit(&self) -> bool
Lock the TLB
Bits: 5..6
sourcepub const fn with_tlb_flush_inhibit(self, value: bool) -> Self
pub const fn with_tlb_flush_inhibit(self, value: bool) -> Self
Lock the TLB
Bits: 5..6
sourcepub fn set_tlb_flush_inhibit(&mut self, value: bool)
pub fn set_tlb_flush_inhibit(&mut self, value: bool)
Lock the TLB
Bits: 5..6
sourcepub const fn supervisor_access(&self) -> bool
pub const fn supervisor_access(&self) -> bool
Treat the access as a supervisor mode access irrespective of current mode.
Bits: 6..7
sourcepub const fn with_supervisor_access(self, value: bool) -> Self
pub const fn with_supervisor_access(self, value: bool) -> Self
Treat the access as a supervisor mode access irrespective of current mode.
Bits: 6..7
sourcepub fn set_supervisor_access(&mut self, value: bool)
pub fn set_supervisor_access(&mut self, value: bool)
Treat the access as a supervisor mode access irrespective of current mode.
Bits: 6..7
sourcepub const fn user_access(&self) -> bool
pub const fn user_access(&self) -> bool
Treat the access as a user mode access irrespective of current mode.
Bits: 7..8
sourcepub const fn with_user_access(self, value: bool) -> Self
pub const fn with_user_access(self, value: bool) -> Self
Treat the access as a user mode access irrespective of current mode.
Bits: 7..8
sourcepub fn set_user_access(&mut self, value: bool)
pub fn set_user_access(&mut self, value: bool)
Treat the access as a user mode access irrespective of current mode.
Bits: 7..8
sourcepub const fn enforce_smap(&self) -> bool
pub const fn enforce_smap(&self) -> bool
Enforce the SMAP restriction on supervisor data access to user mode addresses if CR4.SMAP=1 irrespective of current EFLAGS.AC i.e. the behavior for “implicit supervisor-mode accesses” (e.g. to the GDT, etc.) and when EFLAGS.AC=0. Does nothing if CR4.SMAP=0.
Bits: 8..9
sourcepub const fn with_enforce_smap(self, value: bool) -> Self
pub const fn with_enforce_smap(self, value: bool) -> Self
Enforce the SMAP restriction on supervisor data access to user mode addresses if CR4.SMAP=1 irrespective of current EFLAGS.AC i.e. the behavior for “implicit supervisor-mode accesses” (e.g. to the GDT, etc.) and when EFLAGS.AC=0. Does nothing if CR4.SMAP=0.
Bits: 8..9
sourcepub fn set_enforce_smap(&mut self, value: bool)
pub fn set_enforce_smap(&mut self, value: bool)
Enforce the SMAP restriction on supervisor data access to user mode addresses if CR4.SMAP=1 irrespective of current EFLAGS.AC i.e. the behavior for “implicit supervisor-mode accesses” (e.g. to the GDT, etc.) and when EFLAGS.AC=0. Does nothing if CR4.SMAP=0.
Bits: 8..9
sourcepub const fn override_smap(&self) -> bool
pub const fn override_smap(&self) -> bool
Don’t enforce the SMAP restriction on supervisor data access to user mode addresses irrespective of current EFLAGS.AC i.e. the behavior when EFLAGS.AC=1.
Bits: 9..10
sourcepub const fn with_override_smap(self, value: bool) -> Self
pub const fn with_override_smap(self, value: bool) -> Self
Don’t enforce the SMAP restriction on supervisor data access to user mode addresses irrespective of current EFLAGS.AC i.e. the behavior when EFLAGS.AC=1.
Bits: 9..10
sourcepub fn set_override_smap(&mut self, value: bool)
pub fn set_override_smap(&mut self, value: bool)
Don’t enforce the SMAP restriction on supervisor data access to user mode addresses irrespective of current EFLAGS.AC i.e. the behavior when EFLAGS.AC=1.
Bits: 9..10
sourcepub const fn shadow_stack(&self) -> bool
pub const fn shadow_stack(&self) -> bool
Treat the access as a shadow stack access.
Bits: 10..11
sourcepub const fn with_shadow_stack(self, value: bool) -> Self
pub const fn with_shadow_stack(self, value: bool) -> Self
Treat the access as a shadow stack access.
Bits: 10..11
sourcepub fn set_shadow_stack(&mut self, value: bool)
pub fn set_shadow_stack(&mut self, value: bool)
Treat the access as a shadow stack access.
Bits: 10..11
source§impl TranslateGvaControlFlagsX64
impl TranslateGvaControlFlagsX64
pub fn input_vtl(&self) -> HvInputVtl
pub fn with_input_vtl(self, input_vtl: HvInputVtl) -> Self
pub fn set_input_vtl(&mut self, input_vtl: HvInputVtl)
Trait Implementations§
source§impl AsBytes for TranslateGvaControlFlagsX64where
u64: AsBytes,
impl AsBytes for TranslateGvaControlFlagsX64where
u64: AsBytes,
§fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
§fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>
fn write_to_prefix(&self, bytes: &mut [u8]) -> Option<()>
source§impl Clone for TranslateGvaControlFlagsX64
impl Clone for TranslateGvaControlFlagsX64
source§fn clone(&self) -> TranslateGvaControlFlagsX64
fn clone(&self) -> TranslateGvaControlFlagsX64
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TranslateGvaControlFlagsX64
impl Debug for TranslateGvaControlFlagsX64
source§impl From<TranslateGvaControlFlagsX64> for u64
impl From<TranslateGvaControlFlagsX64> for u64
source§fn from(v: TranslateGvaControlFlagsX64) -> u64
fn from(v: TranslateGvaControlFlagsX64) -> u64
source§impl From<u64> for TranslateGvaControlFlagsX64
impl From<u64> for TranslateGvaControlFlagsX64
source§impl FromBytes for TranslateGvaControlFlagsX64where
u64: FromBytes,
impl FromBytes for TranslateGvaControlFlagsX64where
u64: FromBytes,
§fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>where
Self: Sized,
fn ref_from_prefix(bytes: &[u8]) -> Option<&Self>where
Self: Sized,
§fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>where
Self: Sized,
fn ref_from_suffix(bytes: &[u8]) -> Option<&Self>where
Self: Sized,
§fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>where
Self: Sized + AsBytes,
fn mut_from_prefix(bytes: &mut [u8]) -> Option<&mut Self>where
Self: Sized + AsBytes,
§fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>where
Self: Sized + AsBytes,
fn mut_from_suffix(bytes: &mut [u8]) -> Option<&mut Self>where
Self: Sized + AsBytes,
§fn slice_from(bytes: &[u8]) -> Option<&[Self]>where
Self: Sized,
fn slice_from(bytes: &[u8]) -> Option<&[Self]>where
Self: Sized,
§fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
fn slice_from_prefix(bytes: &[u8], count: usize) -> Option<(&[Self], &[u8])>where
Self: Sized,
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
fn slice_from_suffix(bytes: &[u8], count: usize) -> Option<(&[u8], &[Self])>where
Self: Sized,
bytes
as a &[Self]
with length
equal to count
without copying. Read more§fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>where
Self: Sized + AsBytes,
fn mut_slice_from(bytes: &mut [u8]) -> Option<&mut [Self]>where
Self: Sized + AsBytes,
§fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + AsBytes,
fn mut_slice_from_prefix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [Self], &mut [u8])>where
Self: Sized + AsBytes,
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + AsBytes,
fn mut_slice_from_suffix(
bytes: &mut [u8],
count: usize,
) -> Option<(&mut [u8], &mut [Self])>where
Self: Sized + AsBytes,
bytes
as a &mut [Self]
with length
equal to count
without copying. Read more§fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
fn read_from_prefix(bytes: &[u8]) -> Option<Self>where
Self: Sized,
source§impl FromZeroes for TranslateGvaControlFlagsX64where
u64: FromZeroes,
impl FromZeroes for TranslateGvaControlFlagsX64where
u64: FromZeroes,
§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere
Self: Sized,
Self
from zeroed bytes. Read more§fn new_box_zeroed() -> Box<Self>where
Self: Sized,
fn new_box_zeroed() -> Box<Self>where
Self: Sized,
Box<Self>
from zeroed bytes. Read moreimpl Copy for TranslateGvaControlFlagsX64
Auto Trait Implementations§
impl Freeze for TranslateGvaControlFlagsX64
impl RefUnwindSafe for TranslateGvaControlFlagsX64
impl Send for TranslateGvaControlFlagsX64
impl Sync for TranslateGvaControlFlagsX64
impl Unpin for TranslateGvaControlFlagsX64
impl UnwindSafe for TranslateGvaControlFlagsX64
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)