Signed-off-by: Gerd Hoffmann kraxel@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 ef420931b9a5..1e3d6012700b 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, "invtsc"); + } } }