commit | 2de2c9b7e688f59a1ebdbec9d12c47abfdd8a53e | [log] [tgz] |
---|---|---|
author | Daniel Verkamp <dverkamp@chromium.org> | Mon Oct 02 14:05:55 2023 -0700 |
committer | crosvm LUCI <crosvm-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Oct 03 17:56:26 2023 +0000 |
tree | 7a14645dee60e41dcd67f1bea3c677fe3f38891f | |
parent | c0512454405e854140a8d86a31a455d7946b50ee [diff] |
x86_64: only read bzImage setup_header, not all of boot_params The Linux x86 64-bit Boot Protocol documentation specifies that a bootloader should initialize a cleared (zeroed) boot_params structure and only read the setup_header area from the bzImage file. This ensures that all unknown fields in boot_params will be initialized to zero, including the `sentinel` field used in the sanitize_boot_params function to detect broken bootloaders. With this change applied, crosvm no longer needs the sanitization workaround (validated by inserting an undefined instruction into the sanitize_boot_params kernel function). Additionally, the `e820_entries` field will always start at 0 due to the default initialization of boot_params, which ensures we fill the `e820_table` array from the beginning. <https://www.kernel.org/doc/Documentation/x86/boot.txt> BUG=b:303128596 TEST=tools/dev_container tools/presubmit TEST=boot x86-64 bzImage kernel (Linux 6.6-rc4) Change-Id: If9d40e335881f6862a5c9b25ef3187617f18a57a Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4906858 Reviewed-by: Dennis Kempin <denniskempin@google.com> Reviewed-by: Morg <morg@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
crosvm is a virtual machine monitor (VMM) based on Linux’s 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 ChromeOS platform. Compared to QEMU, crosvm doesn’t 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 ChromeOS devices.