mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
6aed5cc351
As pKVM and pvmfw development for x86 is ongoing, add initial support for running VMs with pvmfw as the VM bootloader. For now only support the --unprotected-vm-with-firmware development flag, for running regular non-protected VMs with pvmfw, which doesn't require pKVM support. Similarly to ARM, add a dedicated memory region for pvmfw to the x86-64 memory map. This region is located right below the PCI MMIO memory hole. Its size is 4MB, like on ARM. Similarly to ARM, the pvmfw entry point is at the beginning of the pvmfw image, the normal x86-64 boot protocol is kept as is, and additionally the VM payload (i.e. kernel) entry point is passed to pvmfw in the %rdi register. This ABI is a subject to change, the final ABI for x86 pvmfw is not defined yet. BUG=b:354676864 TEST=1. Run a VM with "--unprotected-vm-with-firmware pvmfw_test.bin" where pvmfw_test.bin begins with the "jmp *%rdi" instruction (2 bytes: 0xff 0xe7), i.e. pvmfw immediately jumping to the VM entry point. Result: VM runs as usual. 2. Run a VM with "--unprotected-vm-with-firmware pvmfw_random.bin" where pvmfw_random.bin contains just random data. Result: VM crashes. Change-Id: Ib0ee998a99a0cf352a97222769b87be615419187 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5797353 Commit-Queue: Dmytro Maluka <dmaluka@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
bindgen.sh | ||
Cargo.toml |