No description
Find a file
Daniel Verkamp 57e4f542a2 Reland "Devices: Allocate non pci bar mmio at top of HighMmio"
Original reason for revert: Causes crosvm to not start on AMD based devices b/204222491
Fixed by clamping the maximum physical address to 64 TiB, which is the
largest physical address supported by x86-64 Linux with only 4-level
page tables enabled.

In addition, the high MMIO region size calculation has been split into a
separate function, get_high_mmio_size(), and an off-by-one error in the
size calculation was fixed.

Original change's description:
> Devices: Allocate non pci bar mmio at top of HighMmio
>
> Some devices like virtio-pmem, intel host bridge need private mmio, these private
> mmio isn't exposed to Vm through pci bar, and crosvm use mmio allocation interface
> to allocate them, so guest OS pci bus driver couldn't detect them, and once guest
> OS reallocate pci mmio, these private mmmio could be assigned to pci device bar.
> then resource conflict happens.
>
> This patch allocates these non pci bar mmio at the top of HighMmio, since HighMmio
> is large enough and OS allocates pci mmio from low to high. So these non pci bar
> mmio won't conflict with pci bar.
>
> BUG=b:199442120
> BUG=b:185084350
> TEST=crosvm run --pmem-device xxxx
>
> Change-Id: I615d7901d595dd46ba6362f88b71d96baa9c4c8f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3184549
> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
> Tested-by: kokoro <noreply+kokoro@google.com>
> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>

This is a reland of https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3184549

BUG=b:199442120
BUG=b:185084350
TEST=Crostini starts on grunt (AMD device)
TEST=crosvm run --pmem-device rootfs -p 'root=/dev/pmem0' kernel

Change-Id: I7c93f7132dbfbc3f38ecbfa0504b59214a1eb6bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3251788
Reviewed-by: Xiong  Zhang <xiong.y.zhang@intel.corp-partner.google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2021-11-02 22:08:54 +00:00
.devcontainer Add new dev container and install-deps scripts 2021-10-15 22:12:02 +00:00
.github github: Don't use 80-char rule in pull_request_template 2021-10-29 16:19:21 +00:00
aarch64 Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
acpi_tables Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
arch Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
bin Add presubmit script 2021-10-18 20:10:41 +00:00
bit_field crosvm: fix needless_borrow clippy warning 2021-08-25 23:02:23 +00:00
ci/kokoro ci: kokoro: Run mdbook command 2021-11-01 19:26:51 +00:00
common Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
crosvm-fuzz Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
crosvm_plugin Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
devices Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
disk Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
docs/book crosvm: Add python3-pip dependency. 2021-11-01 23:58:39 +00:00
fuse Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
gpu_display Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
hypervisor aarch64: Provide the maximum supported IPA size as the machine type 2021-11-01 14:24:27 +00:00
integration_tests crosvm: switch to upstream tempfile crate 2021-10-11 18:35:55 +00:00
kernel_cmdline kernel_cmdline: convert to ThisError and sort 2021-09-02 21:00:23 +00:00
kernel_loader Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
kvm aarch64: Provide the maximum supported IPA size as the machine type 2021-11-01 14:24:27 +00:00
kvm_sys Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
libcras_stub Integrate audio_streams into crosvm, add stub libcras implementation 2021-07-29 05:59:42 +00:00
libcrosvm_control Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
libvda Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
linux_input_sys Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
logo README: Use PNG logo image 2021-10-29 01:56:23 +00:00
net_sys Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
net_util Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
power_monitor Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
protos Remove trunks proto from crosvm build 2021-07-31 03:01:21 +00:00
qcow_utils Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
resources Reland "Devices: Allocate non pci bar mmio at top of HighMmio" 2021-11-02 22:08:54 +00:00
rutabaga_gfx rutabaga_gfx: export rutabaga 2021-11-02 15:53:02 +00:00
seccomp Allow sched_yield in all devices' seccomp policy 2021-10-28 19:10:45 +00:00
src Reland "Devices: Allocate non pci bar mmio at top of HighMmio" 2021-11-02 22:08:54 +00:00
system_api_stub system_api_stub: use 2018 edition of Rust 2021-09-09 06:42:46 +00:00
tests tests/plugins: replace rand_ish use with a counter 2021-07-21 23:28:27 +00:00
third_party Uprev all submodules 2021-10-19 19:12:53 +00:00
tools crosvm: Add python3-pip dependency. 2021-11-01 23:58:39 +00:00
tpm2 crosvm: add license blurb to all files 2019-04-24 15:51:38 -07:00
tpm2-sys Uprev all submodules 2021-10-19 19:12:53 +00:00
usb_sys Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
usb_util Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
vfio_sys Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
vhost Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
virtio_sys Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
vm_control Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
vm_memory Refactoring: Move various general purpose crates to common/ 2021-10-29 22:31:43 +00:00
x86_64 Reland "Devices: Allocate non pci bar mmio at top of HighMmio" 2021-11-02 22:08:54 +00:00
.dockerignore add docker supported builds and tests 2019-05-15 13:36:19 -07:00
.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: Update code map 2021-09-30 11:44:32 +00:00
Cargo.toml rutabaga_gfx: export rutabaga 2021-11-02 15:53:02 +00:00
CONTRIBUTING.md CONTRIBUTING: Add more instruction on use of mdbook command 2021-11-01 15:32:26 +00:00
LICENSE add LICENSE and README 2017-04-17 14:06:21 -07:00
navbar.md navbar: Update navbar contents 2021-10-29 01:56:24 +00:00
OWNERS OWNERS: Remove tjeznach 2021-10-26 16:58:37 +00:00
README.md README: Use PNG logo image 2021-10-29 01:56:23 +00:00
run_tests crosvm: switch to upstream tempfile crate 2021-10-11 18:35:55 +00:00
rust-toolchain Uprev to rust 1.55.0 2021-10-19 19:12:52 +00:00
setup_cros_cargo.sh fs: Support setting quota project ID 2021-09-03 00:47:25 +00:00
test_all Move virglrenderer/minigbm build into build.rs 2021-09-09 23:13:24 +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