crosvm/src
Mattias Nissler de2c640f17 Add stub PCI device implementation.
Introduce a very simple stub PCI device that can be added to the bus
at a specified address with given PCI config parameters (vendor,
device, etc.). This is useful for cases where we just require a device
to be present during PCI enumeration.

The case that motivates this is a vfio device passthrough
configuration that passes only selected functions of a given device at
the original addresses, but function 0 is not passed through. Absence
of function 0 would be interpreted in enumeration as the entire device
being absent (in accordance with the specification). Putting a stub
device at function 0 fixes this.

BUG=b:167947780
TEST=New unit test, boot minimal Linux image and verify enumerated PCI device.

Change-Id: Iaedffe1c4ac2ad8f6ff6e00dfeebbbfeb5490551
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3245497
Auto-Submit: Mattias Nissler <mnissler@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-27 14:06:35 +00:00
..
plugin plugin: convert to ThisError and sort 2021-10-06 21:38:36 +00:00
argument.rs Command line key=value option parsing helpers 2021-10-27 13:06:53 +00:00
crosvm.rs Add stub PCI device implementation. 2021-10-27 14:06:35 +00:00
error.rs devices: Add vhost-user snd vmm 2021-10-15 04:51:19 +00:00
gdb.rs Add missing HwBreakpointOps impl to GdbStub 2021-10-26 07:12:23 +00:00
linux.rs Add stub PCI device implementation. 2021-10-27 14:06:35 +00:00
main.rs Add stub PCI device implementation. 2021-10-27 14:06:35 +00:00
panic_hook.rs Final major RawDescriptor transition. 2020-11-13 02:38:47 +00:00