mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
hypervisor: kvm: Complement create_standard_regs
Complement `create_standard_regs` implementation on RISC-V platform to work with `From` trait of `kvm_riscv_core`. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
parent
8cd80ea36b
commit
76256230d6
@ -1260,7 +1260,14 @@ impl cpu::Vcpu for KvmVcpu {
|
||||
/// Returns StandardRegisters with default value set
|
||||
///
|
||||
fn create_standard_regs(&self) -> StandardRegisters {
|
||||
kvm_bindings::kvm_regs::default().into()
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
|
||||
{
|
||||
kvm_bindings::kvm_regs::default().into()
|
||||
}
|
||||
#[cfg(target_arch = "riscv64")]
|
||||
{
|
||||
kvm_bindings::kvm_riscv_core::default().into()
|
||||
}
|
||||
}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user