mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-07-07 10:15:45 +00:00
vmm: device_manager: Use consistent naming when adding devices
When adding devices to the guest, and populating the device model, we should prefix the routines with add_. When we're just creating the device objects but not yet adding them we use make_. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
a2ee681665
commit
f0e618431d
@ -430,13 +430,13 @@ impl DeviceManager {
|
|||||||
vm_fd: vm_info.vm_fd.clone(),
|
vm_fd: vm_info.vm_fd.clone(),
|
||||||
});
|
});
|
||||||
|
|
||||||
let ioapic = DeviceManager::make_ioapic(vm_info, &address_manager, userspace_ioapic)?;
|
let ioapic = DeviceManager::add_ioapic(vm_info, &address_manager, userspace_ioapic)?;
|
||||||
let interrupt_info = InterruptInfo {
|
let interrupt_info = InterruptInfo {
|
||||||
_msi_capable,
|
_msi_capable,
|
||||||
ioapic: &ioapic,
|
ioapic: &ioapic,
|
||||||
};
|
};
|
||||||
|
|
||||||
let console = DeviceManager::make_console_device(
|
let console = DeviceManager::add_console_device(
|
||||||
vm_info,
|
vm_info,
|
||||||
&address_manager,
|
&address_manager,
|
||||||
&ioapic,
|
&ioapic,
|
||||||
@ -629,7 +629,7 @@ impl DeviceManager {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_ioapic(
|
fn add_ioapic(
|
||||||
vm_info: &VmInfo,
|
vm_info: &VmInfo,
|
||||||
address_manager: &Arc<AddressManager>,
|
address_manager: &Arc<AddressManager>,
|
||||||
userspace_ioapic: bool,
|
userspace_ioapic: bool,
|
||||||
@ -708,7 +708,7 @@ impl DeviceManager {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_console_device(
|
fn add_console_device(
|
||||||
vm_info: &VmInfo,
|
vm_info: &VmInfo,
|
||||||
address_manager: &Arc<AddressManager>,
|
address_manager: &Arc<AddressManager>,
|
||||||
ioapic: &Option<Arc<Mutex<ioapic::Ioapic>>>,
|
ioapic: &Option<Arc<Mutex<ioapic::Ioapic>>>,
|
||||||
|
Loading…
Reference in New Issue
Block a user