mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-09 21:30:07 +00:00
7be69edf51
This is required as the VcpuFd::run and VcpuFd::set_immediate_exit methods now take a &mut self. I explored alternative solutions: 1. Using RefCell for runtime interior mutability - the Vcpu trait is Sync and it's not possible to use RefCell with types that are Sync. 2. Using UnsafeCell - the mutable reference nature of ::run and and ::set_kvm_immediate_exit was added for a reason so it unwise to bypass this. 3. Adjusting the trait interface to expose the &mut self - this requires an Arc<Mutex<>> around the hypervisor::vcpu::Vcpu object and was very intrusive. Signed-off-by: Rob Bradford <rbradford@rivosinc.com> |
||
---|---|---|
.. | ||
arch | ||
kvm | ||
mshv | ||
cpu.rs | ||
device.rs | ||
hypervisor.rs | ||
lib.rs | ||
vm.rs |