crosvm/devices
Colin Downs-Razouk bd5327620d devices: irqchip: handle multiple events per irq
There were some assumptions built into the hypervisor abstraction
implementations that we would only ever be registering a single Event
for any irq number, but that is no longer the case since 1d0f160. So
this change updates the hypervisor abstraction trait functions to allow
callers of irq_event_tokens to distinguish between multiple events that
refer to the same irq number using an IrqEventIndex. This index is then
used when calling service_irq_event.

Also, if register_irq_event would add a new irq event that the main
thread should wait on, register_irq_event will return the associated
IrqEventIndex. This change also updates linux.rs to use these changes.

The --split-irqchip mode may work even without this fix, depending on
which devices are sharing irqs. If the devices using shared irqs are all
virtio pci devices they may switch to MSIx mode and then not need their
original interrupt event.

BUG=chromium:1077058
TEST=disabled MSI mode on pci devices, forced additional irq sharing,
  and verified that --split-irqchip mode still works + cargo test -p
  devices

Change-Id: I4feb2817b6c477284ad463c0221d1f156813b6ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2405300
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Colin Downs-Razouk <colindr@google.com>
2020-11-03 21:15:13 +00:00
..
src devices: irqchip: handle multiple events per irq 2020-11-03 21:15:13 +00:00
Cargo.toml fuse: extract FUSE as a crate from virtio/fs 2020-10-27 16:18:51 +00:00