commit | 4fbc554e60d71e3b8b35baa9e074972bfc2e27f2 | [log] [tgz] |
---|---|---|
author | Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> | Tue Jun 01 11:29:14 2021 +0800 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jan 06 23:32:54 2022 +0000 |
tree | 31a31b3f2a4d734d873c0e78f032151203facd75 | |
parent | cf6c67a422364592f658d28f681788068e19cdc0 [diff] |
Vfio-pci: Release irq_num at pci device remove 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>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the Chrome OS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on Chrome OS devices.