hypervisor: Refactor system_registers on AArch64

Function `system_registers` took mutable vector reference and modified
the vector content. Now change the definition to `get/set` style.
And rename to `get/set_sys_regs` to align with other functions.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao
2022-06-21 11:32:28 +08:00
committed by Xin Wang
parent c445513976
commit 2d8635f04a
3 changed files with 16 additions and 12 deletions

View File

@@ -429,12 +429,12 @@ pub trait Vcpu: Send + Sync {
/// Save the state of the system registers.
///
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
fn system_registers(&self, state: &mut Vec<Register>) -> Result<()>;
fn get_sys_regs(&self) -> Result<Vec<Register>>;
///
/// Restore the state of the system registers.
///
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
fn set_system_registers(&self, state: &[Register]) -> Result<()>;
fn set_sys_regs(&self, state: &[Register]) -> Result<()>;
///
/// Read the MPIDR - Multiprocessor Affinity Register.
///