Skip to contentSkip to conversation

target-i386: Show host and VM TSC frequencies on mismatch

PATCH In review Eduardo Habkost 3 participants 3 messages Jun 30, 2016 – Jul 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-i386: Show host and VM TSC frequencies on mismatch

Improve the TSC frequency mismatch warning to show the host and VM TSC frequencies.

---
 target-i386/kvm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
target-i386/kvm.c +3 -1
index f3698f1..9679415 100644
@@ -566,7 +566,9 @@ static int kvm_arch_set_tsc_khz(CPUState *cs)
                        -ENOTSUP;
         if (cur_freq <= 0 || cur_freq != env->tsc_khz) {
             error_report("warning: TSC frequency mismatch between "
-                         "VM and host, and TSC scaling unavailable");
+                         "VM (%" PRId64 " kHz) and host (%d kHz), "
+                         "and TSC scaling unavailable",
+                         env->tsc_khz, cur_freq);
             return r;
         }
     }
Signature · 1 line
2.5.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · * Eduardo Habkost ([email protected]) wrote:

Improve the TSC frequency mismatch warning to show the host and VM TSC frequencies.

---
 target-i386/kvm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
target-i386/kvm.c +0 -0
index f3698f1..9679415 100644

target-i386/kvm.c static int kvm_arch_set_tsc_khz(CPUState *cs) · line 573

Quoted 9 lines
target-i386/kvm.c +3 -1
@@ -566,7 +566,9 @@ static int kvm_arch_set_tsc_khz(CPUState *cs)
                        -ENOTSUP;
         if (cur_freq <= 0 || cur_freq != env->tsc_khz) {
             error_report("warning: TSC frequency mismatch between "
-                         "VM and host, and TSC scaling unavailable");
+                         "VM (%" PRId64 " kHz) and host (%d kHz), "
+                         "and TSC scaling unavailable",
+                         env->tsc_khz, cur_freq);
             return r;
         }

Yep, it should be interesting to see what the differences are we hit, wacky different values or the one next door that's slightly warmer.

Dave

Quoted 4 lines
target-i386/kvm.c +0 -0
     }
Signature · 1 line
2.5.5

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

#2 lore raw
In reply to Eduardo Habkost
Quoted 25 lines · Eduardo Habkost

Improve the TSC frequency mismatch warning to show the host and VM TSC frequencies.

---
 target-i386/kvm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
target-i386/kvm.c +3 -1
index f3698f1..9679415 100644
@@ -566,7 +566,9 @@ static int kvm_arch_set_tsc_khz(CPUState *cs)
                        -ENOTSUP;
         if (cur_freq <= 0 || cur_freq != env->tsc_khz) {
             error_report("warning: TSC frequency mismatch between "
-                         "VM and host, and TSC scaling unavailable");
+                         "VM (%" PRId64 " kHz) and host (%d kHz), "
+                         "and TSC scaling unavailable",
+                         env->tsc_khz, cur_freq);
             return r;
         }
     }
Signature · 1 line
2.5.5

ACK