mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
Device gets irq_num from system_allocator when device is added, this irq_num should return to system_allocator when device is hotplug removed. this commit adds a ReleseOneIrq interface into VmIrqRequest, it release one gsi into system_allocator. So vfio-pci device could call it at device close function. For msi and msix interrupt vectors, they have irq tube already and could call ReleaseOneIrq easily. For legacy INTx, the gsi for vfio-pci's INTx is gotten from host, and this gsi maybe share with other device, so the commit doesn't release this gsi at vfio-pci device's remove, otherwise the gsi shared device will be broken. BUG=b:185084350 TEST=Boot a guest and hotplug vfio pci device repeatedly Change-Id: Ibcca226b4b5b2092b5bc94bef8219eea82979086 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2955580 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
.build_test_serial | ||
Cargo.toml |