mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
devices: virtio: add PCI configuration callback function
The idea is that virtio devices can specify additional memory regions. BUG=chromium:924405 TEST=run VM Change-Id: I2a9f233ca8e2bc4fd9b05ee83101b11deb6e7b04 Reviewed-on: https://chromium-review.googlesource.com/1480742 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
036ba3390b
commit
ebc156186b
1 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,7 @@ use std::sync::atomic::AtomicUsize;
|
|||
use std::sync::Arc;
|
||||
|
||||
use super::*;
|
||||
use pci::PciBarConfiguration;
|
||||
use sys_util::{EventFd, GuestMemory};
|
||||
|
||||
/// Trait for virtio devices to be driven by a virtio transport.
|
||||
|
@ -73,4 +74,9 @@ pub trait VirtioDevice: Send {
|
|||
fn reset(&mut self) -> Option<(EventFd, Vec<EventFd>)> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Optionally returns additional BAR configuration needed by device
|
||||
fn get_device_bars(&self) -> Option<Vec<PciBarConfiguration>> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue