No description
Find a file
Haiwei Li e35d46529c devices: vfio_pci: MMIO BAR allocation for devices on non-root buses
Since we'll be putting all PCI devices on non-root buses behind virtual
PCI-E root ports, MMIO BARs in such devices must be inside the forward
windows of their root ports. This presents additional requirements for
their MMIO BAR allocation:

1. All non-prefetchable BARs must be inside the same 32-bit MMIO window
2. All prefetchable BARs must be inside the same MMIO window, but
   different than the non-prefetchable MMIO window
3. Both windows must be 1MB-aligned
4. No other PCI devices should occupy MMIO space in these windows

Allocate the entire window from the system resource allocator to prevent
any space within the window from being used elsewhere. To maximize
memory space efficiency, use VfioResourceAllocator for BAR allocation.

BUG=b:185084350
TEST=passthrough a vfio-pci device with bus_number > 0 and static connet it
behind a pcie root port, then check pcie RP and vfio-pci device function in
guest.

Change-Id: Ic9865afc48eb3ff9fa475dbcfdf90642b012980c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3166888
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-02-28 21:55:09 +00:00
.cargo clippy: fix devices crate 2022-02-07 22:22:39 +00:00
.devcontainer Make vscode devcontainer usable 2022-01-25 21:30:49 +00:00
.github github: Change target directory for cargo-doc 2022-02-22 05:41:52 +00:00
aarch64 Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
acpi_tables Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
arch devices: vfio_pci: MMIO BAR allocation for devices on non-root buses 2022-02-28 21:55:09 +00:00
bin Deprecate old dev tooling scripts 2021-11-02 22:23:03 +00:00
bit_field Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
ci/kokoro Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
common base: allow creating Arena from base::MemoryMapping 2022-02-28 19:16:39 +00:00
crosvm-fuzz Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
crosvm_control Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
crosvm_plugin TestRunner: Enable some no-op tests crates 2022-02-28 21:38:13 +00:00
devices devices: vfio_pci: MMIO BAR allocation for devices on non-root buses 2022-02-28 21:55:09 +00:00
disk Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
docs/book docs: Fix setup_network script path in example_usage.md 2022-02-25 04:00:26 +00:00
fuse Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
gpu_display Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
hypervisor Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
infra/config infra: Initial LUCI configuration 2022-02-24 23:21:10 +00:00
integration_tests Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
kernel_cmdline Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
kernel_loader Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
kvm Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
kvm_sys Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
libcras_stub Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
libvda Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
linux_input_sys Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
logo README: Use PNG logo image 2021-10-29 01:56:23 +00:00
net_sys Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
net_util Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
power_monitor Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
protos Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
qcow_utils Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
resources devices: vfio_pci: rename VfioMsixAllocator to VfioResourceAllocator 2022-02-28 21:55:07 +00:00
rutabaga_gfx Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
seccomp seccomp: use common_device.policy in tpm_device.policy 2022-02-23 19:23:31 +00:00
src devices: vfio_pci: MMIO BAR allocation for devices on non-root buses 2022-02-28 21:55:09 +00:00
system_api_stub Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
tests tests/plugins: replace rand_ish use with a counter 2021-07-21 23:28:27 +00:00
third_party vmm_vhost: vfio: Remove unused File return value 2022-02-22 06:50:11 +00:00
tools TestRunner: Enable some no-op tests crates 2022-02-28 21:38:13 +00:00
tpm2 Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
tpm2-sys Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
usb_sys Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
usb_util Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
vfio_sys Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
vhost Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
virtio_sys Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
vm_control Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
vm_memory Enable windows tests for a few crates 2022-02-18 03:18:58 +00:00
x86_64 TestRunner: Enable some no-op tests crates 2022-02-28 21:38:13 +00:00
.dockerignore
.gitignore Add test runner ./tools/run_tests 2021-10-15 22:12:03 +00:00
.gitmodules Switch to submodules based workflow 2021-08-05 18:32:32 +00:00
.rustfmt.toml rustfmt.toml: Use 2018 edition 2021-02-10 11:54:06 +00:00
ARCHITECTURE.md ARCHITECTURE.md: fix repeated word typo 2022-02-25 22:41:16 +00:00
Cargo.toml Remove rutabaga_gfx_ffi from workspace 2022-02-11 15:58:56 +00:00
CONTRIBUTING.md CONTRIBUTING: Add links to mdbook 2022-02-01 10:39:32 +00:00
LICENSE
navbar.md docs: Use mdformat to format markdown files 2022-01-27 21:29:11 +00:00
OWNERS OWNERS: Add crosvm-bot 2022-01-27 23:41:23 +00:00
README.chromeos.md docs: Use mdformat to format markdown files 2022-01-27 21:29:11 +00:00
README.md docs: Use mdformat to format markdown files 2022-01-27 21:29:11 +00:00
run_tests Deprecate old dev tooling scripts 2021-11-02 22:23:03 +00:00
rust-toolchain Upgrade rust toolchain version to 1.58.1 2022-02-04 02:20:36 +00:00
setup_cros_cargo.sh Deprecate old dev tooling scripts 2021-11-02 22:23:03 +00:00
test_all Deprecate old dev tooling scripts 2021-11-02 22:23:03 +00:00
unblocked_terms.txt unblocked_terms.txt: clean up trivial cases 2021-04-26 20:32:38 +00:00

crosvm - The Chrome OS Virtual Machine Monitor

crosvm is a virtual machine monitor (VMM) based on Linuxs 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 doesnt 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.

Logo