diff options
author | Zide Chen <zide.chen@intel.corp-partner.google.com> | 2019-09-17 11:31:53 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-24 20:46:39 +0000 |
commit | 1f20497b86985bd927df9c171174a29cf47ce25f (patch) | |
tree | 7c388c4603283b122e89c895dd97a12148a0f601 /devices/src/virtio/p9.rs | |
parent | 1d15851b275b72aa08d13ac7bde9dd8464cfeed0 (diff) | |
download | crosvm-1f20497b86985bd927df9c171174a29cf47ce25f.tar crosvm-1f20497b86985bd927df9c171174a29cf47ce25f.tar.gz crosvm-1f20497b86985bd927df9c171174a29cf47ce25f.tar.bz2 crosvm-1f20497b86985bd927df9c171174a29cf47ce25f.tar.lz crosvm-1f20497b86985bd927df9c171174a29cf47ce25f.tar.xz crosvm-1f20497b86985bd927df9c171174a29cf47ce25f.tar.zst crosvm-1f20497b86985bd927df9c171174a29cf47ce25f.zip |
devices: implement MsixConfig struct and generic MSI-X functions
The MsixConfig struct is responsible for all the operations of MSI-X Capability Structure and MSI-X Table. A msix_config object is created for each virtio device. BUG=chromium:854765 TEST=cargo test -p devices Change-Id: Ide7c34d335d49a201f20b0a4307bcda97d1d61b7 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com> Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> Signed-off-by: Zide Chen <zide.chen@intel.corp-partner.google.com> Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1828337 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Stephen Barber <smbarber@chromium.org>
Diffstat (limited to 'devices/src/virtio/p9.rs')
-rw-r--r-- | devices/src/virtio/p9.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/devices/src/virtio/p9.rs b/devices/src/virtio/p9.rs index 6d89a45..83aa84e 100644 --- a/devices/src/virtio/p9.rs +++ b/devices/src/virtio/p9.rs @@ -11,7 +11,9 @@ use std::result; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; use std::thread; +use sync::Mutex; +use crate::pci::MsixConfig; use p9; use sys_util::{error, warn, Error as SysError, EventFd, GuestMemory, PollContext, PollToken}; use virtio_sys::vhost::VIRTIO_F_VERSION_1; @@ -239,6 +241,7 @@ impl VirtioDevice for P9 { guest_mem: GuestMemory, interrupt_evt: EventFd, interrupt_resample_evt: EventFd, + _msix_config: Option<Arc<Mutex<MsixConfig>>>, status: Arc<AtomicUsize>, mut queues: Vec<Queue>, mut queue_evts: Vec<EventFd>, |