xref: /DragonOS/kernel/src/arch/riscv64/kvm/mod.rs (revision 08a2ee408498b0db4c76c57b149f1cf047758f3c)
1 use alloc::sync::Arc;
2 
3 use crate::{libs::mutex::Mutex, syscall::SystemError};
4 
5 #[derive(Debug, Clone, Default)]
6 pub struct RiscV64KVMArch {}
7 
8 impl RiscV64KVMArch {
9     /// @brief 查看CPU是否支持虚拟化
10     pub fn kvm_arch_cpu_supports_vm() -> Result<(), SystemError> {
11         unimplemented!("RiscV64KVMArch::kvm_arch_cpu_supports_vm")
12     }
13 
14     /// @brief 初始化KVM
15     pub fn kvm_arch_init() -> Result<(), SystemError> {
16         Ok(())
17     }
18 
19     pub fn kvm_arch_dev_ioctl(cmd: u32, _arg: usize) -> Result<usize, SystemError> {
20         unimplemented!("RiscV64KVMArch::kvm_arch_dev_ioctl")
21     }
22 }
23