summary refs log tree commit diff
path: root/devices/src/virtio/virtio_pci_device.rs
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2019-10-31 16:50:25 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-06 22:20:41 +0000
commitf5ee34a48299be8af3852d6e769274530a798a2c (patch)
treee5bf5603f9a2cfffc4cc0edc121dc987c366a9f5 /devices/src/virtio/virtio_pci_device.rs
parent793d9ea0f0459ea639bc30695a4f7849ff31ac2f (diff)
downloadcrosvm-f5ee34a48299be8af3852d6e769274530a798a2c.tar
crosvm-f5ee34a48299be8af3852d6e769274530a798a2c.tar.gz
crosvm-f5ee34a48299be8af3852d6e769274530a798a2c.tar.bz2
crosvm-f5ee34a48299be8af3852d6e769274530a798a2c.tar.lz
crosvm-f5ee34a48299be8af3852d6e769274530a798a2c.tar.xz
crosvm-f5ee34a48299be8af3852d6e769274530a798a2c.tar.zst
crosvm-f5ee34a48299be8af3852d6e769274530a798a2c.zip
devices: virtio: initialize config MSI-X vector
The virtio specification says that the device must have all queue and
configuration change events unmapped upon reset.  The queue MSI-X vector
configuration was already initialized to VIRTIO_MSI_NO_VECTOR (0xffff),
but the device configuration change notification vector was initialized
to 0.  Move the constant to the virtio module so it can be used to
initialize the config vector to the correct value.

BUG=chromium:854765
TEST=./build_test.py

Change-Id: Ife1117e54196a898782238a2b81e69b20ac79784
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1898044
Reviewed-by: Zide Chen <zide.chen@intel.corp-partner.google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
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.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/devices/src/virtio/virtio_pci_device.rs b/devices/src/virtio/virtio_pci_device.rs
index 713329f..033d4ee 100644
--- a/devices/src/virtio/virtio_pci_device.rs
+++ b/devices/src/virtio/virtio_pci_device.rs
@@ -233,7 +233,7 @@ impl VirtioPciDevice {
                 device_feature_select: 0,
                 driver_feature_select: 0,
                 queue_select: 0,
-                msix_config: 0,
+                msix_config: VIRTIO_MSI_NO_VECTOR,
             },
         })
     }