Revert "devices: virtio: disable MSI-X for block and net"

Re-enable MSI-X for virtio-blk and virtio-net now that the underlying
issue causing hangs at startup has been fixed (CL:1917495).

BUG=chromium:1019986
TEST=Boot Termina on nami

This reverts commit 85858f580e.

Change-Id: I5a5e197243a16aee2b2aaf3145a1180749b097b2
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1918261
Reviewed-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel Verkamp 2019-11-14 13:45:46 -08:00 committed by Commit Bot
parent 2a9e620f9a
commit 1de388ae02
4 changed files with 18 additions and 0 deletions

View file

@ -29,6 +29,7 @@ use super::{
const QUEUE_SIZE: u16 = 256;
const QUEUE_SIZES: &[u16] = &[QUEUE_SIZE];
const NUM_MSIX_VECTORS: u16 = 2;
const SECTOR_SHIFT: u8 = 9;
const SECTOR_SIZE: u64 = 0x01 << SECTOR_SHIFT;
const MAX_DISCARD_SECTORS: u32 = u32::MAX;
@ -706,6 +707,10 @@ impl VirtioDevice for Block {
TYPE_BLOCK
}
fn msix_vectors(&self) -> u16 {
NUM_MSIX_VECTORS
}
fn queue_max_sizes(&self) -> &[u16] {
QUEUE_SIZES
}

View file

@ -25,6 +25,7 @@ use super::{Interrupt, Queue, Reader, VirtioDevice, Writer, TYPE_NET};
const QUEUE_SIZE: u16 = 256;
const NUM_QUEUES: usize = 2;
const QUEUE_SIZES: &[u16] = &[QUEUE_SIZE, QUEUE_SIZE];
const NUM_MSIX_VECTORS: u16 = NUM_QUEUES as u16;
#[derive(Debug)]
pub enum NetError {
@ -406,6 +407,10 @@ where
TYPE_NET
}
fn msix_vectors(&self) -> u16 {
NUM_MSIX_VECTORS
}
fn queue_max_sizes(&self) -> &[u16] {
QUEUE_SIZES
}

View file

@ -150,6 +150,10 @@ where
TYPE_NET
}
fn msix_vectors(&self) -> u16 {
NUM_MSIX_VECTORS
}
fn queue_max_sizes(&self) -> &[u16] {
QUEUE_SIZES
}

View file

@ -112,6 +112,10 @@ impl VirtioDevice for Vsock {
TYPE_VSOCK
}
fn msix_vectors(&self) -> u16 {
NUM_MSIX_VECTORS
}
fn queue_max_sizes(&self) -> &[u16] {
QUEUE_SIZES
}