diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2018-10-05 14:51:22 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-11 13:25:38 -0700 |
commit | cf2e00e9827798de956ff564aa422e9f31983d69 (patch) | |
tree | 7281bf9f0d8336894cfea3004c8d8cd5a8526711 /arch/src/lib.rs | |
parent | db6edff22f8bddabd6985c11a8f9456d2bc21c1f (diff) | |
download | crosvm-cf2e00e9827798de956ff564aa422e9f31983d69.tar crosvm-cf2e00e9827798de956ff564aa422e9f31983d69.tar.gz crosvm-cf2e00e9827798de956ff564aa422e9f31983d69.tar.bz2 crosvm-cf2e00e9827798de956ff564aa422e9f31983d69.tar.lz crosvm-cf2e00e9827798de956ff564aa422e9f31983d69.tar.xz crosvm-cf2e00e9827798de956ff564aa422e9f31983d69.tar.zst crosvm-cf2e00e9827798de956ff564aa422e9f31983d69.zip |
arch: add virtio-pci eventfds with exact match
The virtio PCI spec (4.1.5.2 Notifying The Device) says: "The driver notifies the device by writing the 16-bit virtqueue index of this virtqueue to the Queue Notify address." We were previously registering the notify address specifying NoDatamatch; switch this to a 16-bit match of the queue index to follow the specification. BUG=chromium:854766 TEST=Boot crosvm with virtio devices converted to PCI Change-Id: Ic950a8c7751268f7fcc21d5c37b0afc859f1e6d0 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1265861 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'arch/src/lib.rs')
-rw-r--r-- | arch/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/src/lib.rs b/arch/src/lib.rs index aeb8f6c..3ee805e 100644 --- a/arch/src/lib.rs +++ b/arch/src/lib.rs @@ -167,9 +167,9 @@ pub fn generate_pci_root( let ranges = device .allocate_io_bars(resources) .map_err(DeviceRegistrationError::AllocateIoAddrs)?; - for (event, addr) in device.ioeventfds() { + for (event, addr, datamatch) in device.ioeventfds() { let io_addr = IoeventAddress::Mmio(addr); - vm.register_ioevent(&event, io_addr, Datamatch::AnyLength) + vm.register_ioevent(&event, io_addr, datamatch) .map_err(DeviceRegistrationError::RegisterIoevent)?; keep_fds.push(event.as_raw_fd()); } |