hypervisor: Add Vcpu::get_sys_reg() on AArch64

Added function `Vcpu::get_sys_reg()` to get single system register.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao
2022-07-28 14:52:34 +08:00
committed by Rob Bradford
parent ecb66b5e94
commit 5b54dc60aa
2 changed files with 38 additions and 1 deletions

View File

@@ -371,6 +371,11 @@ pub trait Vcpu: Send + Sync {
#[cfg(target_arch = "aarch64")]
fn read_mpidr(&self) -> Result<u64>;
///
/// Gets the value of a system register
///
#[cfg(target_arch = "aarch64")]
fn get_sys_reg(&self, sys_reg: u32) -> Result<u64>;
///
/// Configure core registers for a given CPU.
///
#[cfg(target_arch = "aarch64")]