From 24eeed2b6fb6306f404238d1343db4b55aa9beef Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 1 Nov 2019 10:01:23 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1898268 Tested-by: kokoro --- fuzz/block_fuzzer.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'fuzz') diff --git a/fuzz/block_fuzzer.rs b/fuzz/block_fuzzer.rs index b1bc003..1730d49 100644 --- a/fuzz/block_fuzzer.rs +++ b/fuzz/block_fuzzer.rs @@ -12,7 +12,7 @@ use std::sync::atomic::AtomicUsize; use std::sync::Arc; use cros_fuzz::fuzz_target; -use devices::virtio::{Block, Queue, VirtioDevice}; +use devices::virtio::{Block, Interrupt, Queue, VirtioDevice}; use sys_util::{EventFd, GuestAddress, GuestMemory, SharedMemory}; const MEM_SIZE: u64 = 256 * 1024 * 1024; @@ -84,10 +84,12 @@ fuzz_target!(|bytes| { block.activate( mem, - EventFd::new().unwrap(), - EventFd::new().unwrap(), - None, // msix_config - Arc::new(AtomicUsize::new(0)), + Interrupt::new( + Arc::new(AtomicUsize::new(0)), + EventFd::new().unwrap(), + EventFd::new().unwrap(), + None, // msix_config + ), vec![q], queue_evts, ); -- cgit 1.4.1