crosvm/devices
Daniel Verkamp 0a517b3179 devices: virtio: simplify interrupt status update
The first interrupt_status.fetch_or() operation already sets the
appropriate bit; calling fetch_or() again with the same value is
unnecessary.

In addition, if the interrupt_status field has any bit set (not just the
USED_RING bit), then the interrupt is already pending and we don't need
to trigger it again.

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

Change-Id: Iba7fb9b934d062db801f8ba0e743618f9db580ee
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1898045
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>
2019-11-06 22:20:42 +00:00
..
src devices: virtio: simplify interrupt status update 2019-11-06 22:20:42 +00:00
Cargo.toml devices: fs: Implement virtio-fs server 2019-10-27 14:26:01 +00:00