mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 17:44:10 +00:00
hypervisor: enable TSC cpuid leaf synthesis for haxm.
Similar to WHPX, haxm requires an accurate (calibrated) leaf value to make the guest clocksource work accurately. BUG=b:213152505 TEST=battle tested downstream Change-Id: I55a45c00758b2112aced6185970ad43df060d0ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3731287 Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Noah Gold <nkgold@google.com> Reviewed-by: Vikram Auradkar <auradkar@google.com> Reviewed-by: Vaibhav Nagarnaik <vnagarnaik@google.com> Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
parent
4ea25d1e33
commit
10574227dc
1 changed files with 7 additions and 2 deletions
|
@ -182,8 +182,13 @@ impl Vm for HaxmVm {
|
|||
})
|
||||
}
|
||||
|
||||
fn check_capability(&self, _c: VmCap) -> bool {
|
||||
false
|
||||
fn check_capability(&self, c: VmCap) -> bool {
|
||||
match c {
|
||||
// under haxm, guests rely on this leaf to calibrate their
|
||||
// clocksource.
|
||||
VmCap::CalibratedTscLeafRequired => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn get_memory(&self) -> &GuestMemory {
|
||||
|
|
Loading…
Reference in a new issue