On Wed, Oct 26, 2022 at 03:23:51PM +0200, Kalabic S. wrote: > On 26/10/2022 11:33, Scott Cheloha wrote: > > There might be a second workaround. Kalabic mentions here in the > > other thread about this problem: > > > > https://marc.info/?l=openbsd-bugs&m=166664949825616&w=2 > > > > ... that changing the ESXi option "Guest OS Version" from "FreeBSD > > (32-bit)" to "FreeBSD (64-bit)" seemed to fix the problem on his > > version of ESXi. Does that work for you? I don't know what the other > > consequences of that configuration change are, but it might be worth a > > try if you prefer to run 7.2-RELEASE or 7.2-STABLE instead of patching > > -current. > > > > Do you have VMware support? Is there any way for you to report this > > problem to them? It's unlikely they explicitly support running an > > OpenBSD guest, but it's plausible this issue could affect other > > operating systems. I can't imagine OpenBSD is reading the ACPI PM > > timer differently than Linux or FreeBSD. > > > > Maybe related or not, but there's official paper from VMware that describes > several known timekeeping issues and how to correct or work around them: > https://www.cse.psu.edu/~buu1/teaching/spring06/papers/vmware-timing.pdf
I did see this, thanks for posting it. It's not immediately useful here, though. > Also pardon my ignorance about TSC counters and related stuff, but just > looking at FreeBSD related code it seems to take into account the fact it is > running as a hypervisor guest (ESXi or Xen). > https://github.com/freebsd/freebsd-src/blob/main/sys/x86/x86/tsc.c > > Is there a detail that makes a difference when different "Guest OS Version" > is used? Note that I have no idea what is happening there. > > So, just like some AMD related improvements for TSC were introduced into > OpenBSD recently, maybe this issue can be properly solved only by doing > something similar for guests on hypervisor? I would like to derive the TSC and lapic frequency from the hypervisor CPUID leaves when they are available to avoid calibration. It's on my todo list.