pub struct ArmPerCpu {
pub cpu_id: usize,
pub original_vbar_el2: u64,
/* private fields */
}Expand description
Per-CPU AArch64 virtualization state.
Fields§
§cpu_id: usizeper cpu id
original_vbar_el2: u64The original value of VBAR_EL2 (exception vector base) before enabling
the virtualization.
Implementations§
Source§impl ArmPerCpu
impl ArmPerCpu
Sourcepub fn new(cpu_id: usize) -> ArmVcpuResult<Self>
pub fn new(cpu_id: usize) -> ArmVcpuResult<Self>
Creates per-CPU virtualization state.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns whether AArch64 virtualization is enabled on the current CPU.
Sourcepub fn hardware_enable<H: ArmHostOps>(&mut self) -> ArmVcpuResult
pub fn hardware_enable<H: ArmHostOps>(&mut self) -> ArmVcpuResult
Enables AArch64 virtualization on the current CPU.
Sourcepub fn hardware_disable(&mut self) -> ArmVcpuResult
pub fn hardware_disable(&mut self) -> ArmVcpuResult
Disables AArch64 virtualization on the current CPU.
Sourcepub fn max_guest_page_table_levels(&self) -> usize
pub fn max_guest_page_table_levels(&self) -> usize
Returns the maximum guest page table levels supported by this CPU.
Sourcepub fn guest_phys_addr_bits(&self) -> usize
pub fn guest_phys_addr_bits(&self) -> usize
Returns the guest physical address width supported by this CPU.
Sourcepub const fn timer_frequency_hz(&self) -> u64
pub const fn timer_frequency_hz(&self) -> u64
Returns the architectural counter frequency recorded on this CPU.
Auto Trait Implementations§
impl Freeze for ArmPerCpu
impl RefUnwindSafe for ArmPerCpu
impl Send for ArmPerCpu
impl Sync for ArmPerCpu
impl Unpin for ArmPerCpu
impl UnsafeUnpin for ArmPerCpu
impl UnwindSafe for ArmPerCpu
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
Mutably borrows from an owned value. Read more