mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 11:25:20 +00:00
pci: Simplify PciDevice trait
We do not use the on_device_sandboxed() and register_device_capabilities() methods. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
0d53a5890d
commit
76e3a30c31
@ -70,11 +70,6 @@ pub trait PciDevice: BusDevice {
|
|||||||
Ok(Vec::new())
|
Ok(Vec::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Register any capabilties specified by the device.
|
|
||||||
fn register_device_capabilities(&mut self) -> Result<()> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Gets a list of ioeventfds that should be registered with the running VM. The list is
|
/// Gets a list of ioeventfds that should be registered with the running VM. The list is
|
||||||
/// returned as a Vec of (eventfd, addr, datamatch) tuples.
|
/// returned as a Vec of (eventfd, addr, datamatch) tuples.
|
||||||
fn ioeventfds(&self) -> Vec<(&EventFd, u64, u64)> {
|
fn ioeventfds(&self) -> Vec<(&EventFd, u64, u64)> {
|
||||||
@ -95,6 +90,4 @@ pub trait PciDevice: BusDevice {
|
|||||||
/// * `addr` - The guest address inside the BAR.
|
/// * `addr` - The guest address inside the BAR.
|
||||||
/// * `data` - The data to write.
|
/// * `data` - The data to write.
|
||||||
fn write_bar(&mut self, _base: u64, _offset: u64, _data: &[u8]) {}
|
fn write_bar(&mut self, _base: u64, _offset: u64, _data: &[u8]) {}
|
||||||
/// Invoked when the device is sandboxed.
|
|
||||||
fn on_device_sandboxed(&mut self) {}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user