crosvm/x86_64/src
Zach Reizner dc74848b7c arch: Simplify build_vm by removing closure parameters
These parameters multiplied the number of type arguments to build_vm
unnecessarily and complicated the thread of execution in the programmers
head. Closures also complicate the borrow rules, making things much
harder to change.

This change uses the results of the closures (e.g. PCI devices, IRQ
chips) as parameters instead. The rest of this change follows naturally
from pulling on that thread until tests pass.

As a result of the removal of several type arguments, the code size was
reduced by ~100KiB on a 5MiB build.

BUG=b:185170486
TEST=./test_all

Change-Id: I6bcc5eb1b1f3031d4328bb4a81ddef618d04767b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2829136
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Zach Reizner <zachr@chromium.org>
Reviewed-by: Tomasz Jeznach <tjeznach@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-05-06 16:31:49 +00:00
..
acpi.rs acpi: FACS support, minor fixes for acpi forwarding. 2021-04-22 07:25:33 +00:00
bootparam.rs
bzimage.rs base: Add shared memory layer to base. 2020-09-30 19:44:40 +00:00
cpuid.rs uprev rust-toolchain and fix clippy warnings 2021-03-22 21:41:07 +00:00
fdt.rs arch: rewrite FDT writer in native rust 2021-03-03 01:29:15 +00:00
gdt.rs
interrupts.rs make hypervisor traits object safe 2020-10-15 14:31:20 +00:00
lib.rs arch: Simplify build_vm by removing closure parameters 2021-05-06 16:31:49 +00:00
mpspec.rs
mptable.rs Fix clippy errors and some warnings. 2021-01-18 15:50:25 +00:00
msr_index.rs
regs.rs Fix clippy errors and some warnings. 2021-01-18 15:50:25 +00:00
smbios.rs smbios: support source DMI/SMBIOS data from file. 2021-04-06 18:39:15 +00:00
test_integration.rs arch: Simplify build_vm by removing closure parameters 2021-05-06 16:31:49 +00:00