crosvm/x86_64
Daniel Verkamp 0367dadf7f x86_64: pass Sregs via vcpu_init
Now that we have a Default implementation of Sregs that sets the
architecturally defined reset values, we can initialize the Sregs values
during build_vm(). This allows removal of the set_reset_vector()
function, as all of the values it set are now the defaults in Sregs and
Regs.

This also lets us set up the page tables and GDT only once during
build_vm() instead of rewriting them for every configure_vcpu() call.

This allows consolidation of the BIOS and non-BIOS configure_vcpu()
code.

BUG=b:237095693
TEST=Boot x86-64 Linux kernel
TEST=Boot --bios u-boot.rom

Change-Id: Ief19f983fd252dffa668ff2cfe96a64298e06cf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3723802
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-07 23:24:08 +00:00
..
src x86_64: pass Sregs via vcpu_init 2022-07-07 23:24:08 +00:00
Cargo.toml x86_64: cross platform cleanup 2022-06-22 23:34:17 +00:00