On 3/6/20 4:44 PM, 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);

What is "invtsc"? "tsc" alone maybe?

Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>

+            tsctimer_setfreq(eax);
+        }
      }
  }
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to