mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +00:00
vmm: Implement BusDevice for DeviceManager
In anticipation of inserting the DeviceManager on the IO/MMIO buses, the DeviceManager must implement the BusDevice trait. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
2eb26d4de4
commit
65774e8a78
@ -49,7 +49,7 @@ pub trait Snapshotable {}
|
|||||||
/// All migratable components are paused before being snapshotted, and then
|
/// All migratable components are paused before being snapshotted, and then
|
||||||
/// eventually resumed. Thus any Migratable component must be both Pausable
|
/// eventually resumed. Thus any Migratable component must be both Pausable
|
||||||
/// and Snapshotable.
|
/// and Snapshotable.
|
||||||
pub trait Migratable: Pausable + Snapshotable {}
|
pub trait Migratable: Send + Pausable + Snapshotable {}
|
||||||
|
|
||||||
fn get_region_host_address_range(
|
fn get_region_host_address_range(
|
||||||
region: &GuestRegionMmap,
|
region: &GuestRegionMmap,
|
||||||
|
@ -22,7 +22,7 @@ use acpi_tables::{aml, aml::Aml};
|
|||||||
#[cfg(feature = "acpi")]
|
#[cfg(feature = "acpi")]
|
||||||
use arch::layout;
|
use arch::layout;
|
||||||
use arch::layout::{APIC_START, IOAPIC_SIZE, IOAPIC_START};
|
use arch::layout::{APIC_START, IOAPIC_SIZE, IOAPIC_START};
|
||||||
use devices::{ioapic, HotPlugNotificationFlags};
|
use devices::{ioapic, BusDevice, HotPlugNotificationFlags};
|
||||||
use kvm_ioctls::*;
|
use kvm_ioctls::*;
|
||||||
use libc::O_TMPFILE;
|
use libc::O_TMPFILE;
|
||||||
use libc::TIOCGWINSZ;
|
use libc::TIOCGWINSZ;
|
||||||
@ -1841,6 +1841,8 @@ impl Pausable for DeviceManager {
|
|||||||
impl Snapshotable for DeviceManager {}
|
impl Snapshotable for DeviceManager {}
|
||||||
impl Migratable for DeviceManager {}
|
impl Migratable for DeviceManager {}
|
||||||
|
|
||||||
|
impl BusDevice for DeviceManager {}
|
||||||
|
|
||||||
impl Drop for DeviceManager {
|
impl Drop for DeviceManager {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
for (device, _) in self.virtio_devices.drain(..) {
|
for (device, _) in self.virtio_devices.drain(..) {
|
||||||
|
Loading…
Reference in New Issue
Block a user