On Fri, Mar 06, 2020 at 02:14:01PM -0500, Kevin O'Connor wrote: > On Fri, Mar 06, 2020 at 04:44:16PM +0100, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > > --- > > src/fw/paravirt.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c > > index 4fcd8f570673..8b463af96c3e 100644 > > --- a/src/fw/paravirt.c > > +++ b/src/fw/paravirt.c > > @@ -67,6 +67,11 @@ static void kvm_detect(void) > > if (strcmp(signature, "KVMKVMKVM") == 0) { > > dprintf(1, "Running on KVM\n"); > > PlatformRunningOn |= PF_KVM; > > + if (eax >= KVM_CPUID_SIGNATURE + 0x10) { > > + cpuid(KVM_CPUID_SIGNATURE + 0x10, &eax, &ebx, &ecx, &edx); > > + dprintf(1, "kvm: have invtsc, freq %u kHz\n", eax); > > + tsctimer_setfreq(eax); > > + } > > } > > } > > That's odd that a khz value is being passed as eax. Is this a recent > change?
KVM paravirtual extension. Exists for years. I think it's off by default (didn't check all cpu models though). You'll get it with "qemu -cpu $model,invtsc=on". When available it is possible to use the tsc as reliable clock source because you don't need calibration which can be way off on a loaded host. I'm looking for a clock source which works in case pmtimer is not available. Maybe I should just go for kvmclock instead ... cheers, Gerd _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org