commit | cf6c67a422364592f658d28f681788068e19cdc0 | [log] [tgz] |
---|---|---|
author | Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> | Mon Dec 06 13:48:52 2021 +0800 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jan 06 23:32:53 2022 +0000 |
tree | cf7f95e4fe6f0e0138f5f20d68de275fd20a34e3 | |
parent | ed1572d78cd02fcec6d44bd2120cb7ebfd016045 [diff] |
Vfio-pci: Don't allocate mmio for hotplug device When a hotplug vfio-pci device is attached to a bridge parent, kernel will allocate mmio from its parent's bridge window, so crosvm doesn't need to allocate it. But previously mmio_regions is used to track existing bar's address and size, but this commit doesn't allocate mmio, so the initial bar address in mmio_regions is zero, so this exception should be handled in bar's reallocation code that address 0 isn't a valid bar address. BUG=b:185084350 TEST=Hotplug in and out vfio-pci device in a vm repeatedly Change-Id: I1a082b02065d42eccf46e24941727edf7b6355a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3319707 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.