mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
2968e1b6c5
In order to emulate IOAPIC pins and still be able to inject IRQs via KVM eventfd, SplitIrqChip driver allocates input and output eventfd for each pin: - the input eventfd listens for incoming events (e.g. physical IRQ occurrence or userspace emulated IRQ). This gives chance to to emulate pin states before handing over to KVM - the output eventfd inject the actual virtual IRQ in KVM standard manner Once the guest tries to configure a new IOAPIC pin, the output event GSI number is allocated dynamically. So there is no chance to know GSI number upfront to expose it via e.g. ACPI. This is the blocker for direct IRQ forwarding where 1:1 mapping is inherent feature. Allocate output eventfd vector and fill in with 1:1 GSI mapping upfront only for direct configuration feature. Any potential guest IOAPIC pin configuration request will used pre-allocated GSI number so that guest will see proper IRQ number. No functional changes for the rest of the cases. BUG=b:184871003 TEST=boot guest using crosvm --split-irqchip flag and check if IOAPIC related IRQs are working Change-Id: Ie1578a831ff21489e4e7dd9c7ec3f5384b4af16a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3494285 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Steven Richman <srichman@google.com> Commit-Queue: Tomasz Nowicki <tnowicki@google.com> |
||
---|---|---|
.. | ||
src | ||
.build_test_serial | ||
Cargo.toml |