diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2019-11-01 10:01:23 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-18 07:43:03 +0000 |
commit | 24eeed2b6fb6306f404238d1343db4b55aa9beef (patch) | |
tree | 0a347754994d470b3df3e3811430b4da6758ea17 /devices/src/virtio/virtio_pci_device.rs | |
parent | e7c46cad4150ecb18a0832a61042522974543938 (diff) | |
download | crosvm-24eeed2b6fb6306f404238d1343db4b55aa9beef.tar crosvm-24eeed2b6fb6306f404238d1343db4b55aa9beef.tar.gz crosvm-24eeed2b6fb6306f404238d1343db4b55aa9beef.tar.bz2 crosvm-24eeed2b6fb6306f404238d1343db4b55aa9beef.tar.lz crosvm-24eeed2b6fb6306f404238d1343db4b55aa9beef.tar.xz crosvm-24eeed2b6fb6306f404238d1343db4b55aa9beef.tar.zst crosvm-24eeed2b6fb6306f404238d1343db4b55aa9beef.zip |
devices: virtio: pass Interrupt to activate()
Factor out the common creation of struct Interrupt. No functional change. BUG=chromium:854765 TEST=./build_test Change-Id: Idf8804771ba1af5181818f643e15e1b42918258a Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1898268 Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'devices/src/virtio/virtio_pci_device.rs')
-rw-r--r-- | devices/src/virtio/virtio_pci_device.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/devices/src/virtio/virtio_pci_device.rs b/devices/src/virtio/virtio_pci_device.rs index 43b3a74..c535ab5 100644 --- a/devices/src/virtio/virtio_pci_device.rs +++ b/devices/src/virtio/virtio_pci_device.rs @@ -613,12 +613,16 @@ impl PciDevice for VirtioPciDevice { None }; - self.device.activate( - mem, + let interrupt = Interrupt::new( + self.interrupt_status.clone(), interrupt_evt, interrupt_resample_evt, msix_config, - self.interrupt_status.clone(), + ); + + self.device.activate( + mem, + interrupt, self.queues.clone(), self.queue_evts.split_off(0), ); |