aboutsummaryrefslogtreecommitdiff
path: root/sys/x86
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2022-01-04 07:00:39 +0000
committerColin Percival <cperciva@FreeBSD.org>2022-01-15 01:30:17 +0000
commitfd980feb574d0924918b42cd449cedf557dfb9e0 (patch)
treef8df463d5319622c7fa48aa2f697a084c8ad8545 /sys/x86
parenta727d9531afbd58e304acc27e3717031e78bff90 (diff)
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/x86/tsc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c
index fa21d9c51fcb..75c452f365cf 100644
--- a/sys/x86/x86/tsc.c
+++ b/sys/x86/x86/tsc.c
@@ -134,7 +134,6 @@ tsc_freq_vmware(void)
if (regs[1] != UINT_MAX)
tsc_freq = regs[0] | ((uint64_t)regs[1] << 32);
}
- tsc_is_invariant = 1;
tsc_early_calib_exact = 1;
}
@@ -268,11 +267,6 @@ probe_tsc_freq(void)
tsc_perf_stat = 1;
}
- if (vm_guest == VM_GUEST_VMWARE) {
- tsc_freq_vmware();
- return;
- }
-
switch (cpu_vendor_id) {
case CPU_VENDOR_AMD:
case CPU_VENDOR_HYGON:
@@ -311,6 +305,11 @@ probe_tsc_freq(void)
break;
}
+ if (vm_guest == VM_GUEST_VMWARE) {
+ tsc_freq_vmware();
+ return;
+ }
+
if (tsc_freq_cpuid(&tsc_freq)) {
/*
* If possible, use the value obtained from CPUID as the initial