commit | 4ea25d1e3356d5715fb016aced2c8b38797fd434 | [log] [tgz] |
---|---|---|
author | Noah Gold <nkgold@google.com> | Fri Jun 10 20:46:21 2022 |
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jun 28 02:23:55 2022 |
tree | cd66208f95d668e8b324ff7201a3a3a6a509a916 | |
parent | efde16f4d24c15e7970645bac42fbc699a3ac739 [diff] |
x86_64: add TSC leaf synthesis. There have been two evolutions of providing the TSC cpuid leaf (aka 0x15) to the guest. a) For CrosVM on Windows, we have been providing the leaf unconditionally. Furthermore, we've not been using the exact host leaf; instead, we calibrate the TSC frequency and provide that value in the leaf. This was done because the actual cpuid leaf values are not as accurate as we needed them to be to drive a guest clocksource. b) In CrosVM mainline, 4080aaf9b33e0d16247a7a92e2c4a3b1eaeb8e08 introduced the flag enable_pnp / enable_pnp_data, and provides the exact host 0x15 leaf to the guest if the flag is enabled. This CL adds a new hypervisor capability (CalibratedTscLeafRequired) to control whether or not the calibrated TSC leaf should be used, in addition to a new CLI option to force it on hypervisors where it isn't enabled by default. The new option is `--force_calibrated_tsc_leaf`. BUG=b:213152505 TEST=builds upstream, battletested downstream on WHPX. Change-Id: I611422808a9e10578c0ddcbd211ae902f937685f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3698993 Commit-Queue: Noah Gold <nkgold@google.com> Reviewed-by: Junichi Uekawa <uekawa@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
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 Chrome OS 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 Chrome OS devices.