mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Make add_vfio_device mutable
The method add_vfio_device() from the DeviceManager needs to be mutable if we want later to be able to update some internal fields from the DeviceManager from this same function. This commit simply takes care of making the necessary changes to change this function as mutable. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
+14
-2
@@ -621,7 +621,13 @@ impl Vm {
|
||||
.start_boot_vcpus(entry_addr)
|
||||
.map_err(Error::CpuManager)?;
|
||||
|
||||
if self.device_manager.lock().unwrap().console().input_enabled() {
|
||||
if self
|
||||
.device_manager
|
||||
.lock()
|
||||
.unwrap()
|
||||
.console()
|
||||
.input_enabled()
|
||||
{
|
||||
let console = self.device_manager.lock().unwrap().console().clone();
|
||||
let signals = Signals::new(&[SIGWINCH, SIGINT, SIGTERM]);
|
||||
match signals {
|
||||
@@ -660,7 +666,13 @@ impl Vm {
|
||||
.read_raw(&mut out)
|
||||
.map_err(Error::Console)?;
|
||||
|
||||
if self.device_manager.lock().unwrap().console().input_enabled() {
|
||||
if self
|
||||
.device_manager
|
||||
.lock()
|
||||
.unwrap()
|
||||
.console()
|
||||
.input_enabled()
|
||||
{
|
||||
self.device_manager
|
||||
.lock()
|
||||
.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user