Bug 1351442

Summary: "TSC frequency mismatch" warning message after migration
Product: Red Hat Enterprise Linux 7 Reporter: Yiqian Wei <yiwei>
Component: qemu-kvm-rhevAssignee: Eduardo Habkost <ehabkost>
Status: CLOSED ERRATA QA Contact: Qianqian Zhu <qizhu>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.3CC: chayang, dgilbert, ehabkost, hhuang, jinzhao, juzhang, knoel, mrezanin, pbonzini, plai, virt-maint, yiwei, zhguo
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.6.0-14.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 21:20:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yiqian Wei 2016-06-30 06:11:30 UTC
Description of problem:

After migration,dst a warning in hmp:
(qemu) red_dispatcher_loadvm_commands: 
qemu-kvm: warning: TSC frequency mismatch between VM and host, and TSC scaling unavailable

Version-Release number of selected component (if applicable):
kernel-3.10.0-447.el7.x86_64
qemu-img-rhev-2.6.0-7.el7.x86_64
seabios-1.9.1-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot a guest in src host.
/usr/libexec/qemu-kvm \
-M pc \
-cpu SandyBridge \
-monitor stdio  \
-m 4G \
-vga qxl \
-spice port=5931,disable-ticketing \
-drive if=none,id=drive0,file=/mnt/pc.qcow2  \
-device virtio-blk-pci,drive=drive0,scsi=off,disable-legacy=on,disable-modern=off \
-device virtio-net-pci,netdev=dev1,mac=9a:e8:e9:ea:eb:ec,id=net1,disable-legacy=on,disable-modern=off \
-netdev tap,id=dev1,vhost=on,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
-smp 4 \
-qmp tcp:0:4445,server,nowait \
-usbdevice mouse \
-usbdevice tablet \

2.In dst host,boot a listening mode qemu.
<qemu cmdline in src host > -incoming tcp:0:1234

3.Migrate guest from src to dst host
migrate -d tcp:10.66.5.235:1234

Actual results:

dst a warning in hmp.

Expected results:

no such warning.

Additional info:
1.hit the same issue on Q35+OVMF.
2.qemu-kvm-rhev-2.3.0-31.el7_2.17 also have this problem.

Comment 2 Karen Noel 2016-06-30 16:35:25 UTC
Yiqian, What hardware platforms were used on the source and destination? What processor model? Thanks.

Comment 3 Eduardo Habkost 2016-06-30 16:58:36 UTC
If TSC frequency on source and destination don't match, the warning is expected to be shown. It means the TSC frequency seen by the guest will suddenly change.

Comment 4 Dr. David Alan Gilbert 2016-06-30 17:13:49 UTC
We probably should change that message to print the source/destination frequencies so that we can tell if what we're seeing is an odd huge jump or a few Hz difference.

Comment 5 Eduardo Habkost 2016-06-30 18:01:34 UTC
(In reply to Dr. David Alan Gilbert from comment #4)
> We probably should change that message to print the source/destination
> frequencies so that we can tell if what we're seeing is an odd huge jump or
> a few Hz difference.

That's a good idea, I will submit a patch upstream.

Comment 6 Yiqian Wei 2016-07-01 01:27:54 UTC
(In reply to Karen Noel from comment #2)
> Yiqian, What hardware platforms were used on the source and destination?
> What processor model? Thanks.

1.hardware platforms.
 source:
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping	: 7
microcode	: 0x29
cpu MHz		: 3199.718
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid xsaveopt
bogomips	: 6784.62
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

destination:

processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 60
model name	: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
stepping	: 3
microcode	: 0x1c
cpu MHz		: 3900.039
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt
bogomips	: 6784.56
clflush size	: 64
cache_alignment	: 64
address sizes	: 39 bits physical, 48 bits virtual
power management:

Comment 7 Paolo Bonzini 2016-07-04 11:01:49 UTC
The message is expected then - programs running in the guest may be mistaken by the sudden change in TSC.

Comment 9 Miroslav Rezanina 2016-07-19 08:50:29 UTC
Fix included in qemu-kvm-rhev-2.6.0-14.el7

Comment 11 Yiqian Wei 2016-08-02 02:29:20 UTC
Hi 

  hit the same issue on Q35+seabios.

  Version:
          host kernel:kernel-3.10.0-481.el7.x86_64
          qemu-kvm-rhev-2.6.0-17.el7.x86_64
          seabios-1.9.1-4.el7.x86_64
          guest:rhel6.8
       
Additional info:
     I retest pc+seabios,the same issue.
        Version:
          host kernel:kernel-3.10.0-481.el7.x86_64
          qemu-kvm-rhev-2.6.0-14.el7.x86_64
          seabios-1.9.1-4.el7.x86_64
          guest:rhel7.3(kernel-3.10.0-481.el7.x86_64)

 
If this version(qemu-kvm-rhev-2.6.0-14.el7) have been fixed.

Comment 12 Dr. David Alan Gilbert 2016-08-02 08:18:05 UTC
(In reply to Yiqian Wei from comment #11)
> Hi 
> 
>   hit the same issue on Q35+seabios.
> 
>   Version:
>           host kernel:kernel-3.10.0-481.el7.x86_64
>           qemu-kvm-rhev-2.6.0-17.el7.x86_64
>           seabios-1.9.1-4.el7.x86_64
>           guest:rhel6.8
>        
> Additional info:
>      I retest pc+seabios,the same issue.
>         Version:
>           host kernel:kernel-3.10.0-481.el7.x86_64
>           qemu-kvm-rhev-2.6.0-14.el7.x86_64
>           seabios-1.9.1-4.el7.x86_64
>           guest:rhel7.3(kernel-3.10.0-481.el7.x86_64)
> 
>  
> If this version(qemu-kvm-rhev-2.6.0-14.el7) have been fixed.


Hi,
 With -14 you should still get the warning but it should print some numbers as well giving the TSC speeds for the host and VM; we'd be interested if you could paste the full error message you get with -14.

Dave

Comment 13 Yiqian Wei 2016-08-02 09:36:45 UTC
Hi Dave,

    the full error message, as follows.
   
(qemu) red_dispatcher_loadvm_commands: 
qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host (3392288 kHz), and TSC scaling unavailable
qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host (3392288 kHz), and TSC scaling unavailable
qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host (3392288 kHz), and TSC scaling unavailable
qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host (3392288 kHz), and TSC scaling unavailable

       
Yiqian

Comment 14 Dr. David Alan Gilbert 2016-08-02 09:42:49 UTC
(In reply to Yiqian Wei from comment #13)
> Hi Dave,
> 
>     the full error message, as follows.
>    
> (qemu) red_dispatcher_loadvm_commands: 
> qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host
> (3392288 kHz), and TSC scaling unavailable
> qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host
> (3392288 kHz), and TSC scaling unavailable
> qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host
> (3392288 kHz), and TSC scaling unavailable
> qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host
> (3392288 kHz), and TSC scaling unavailable
> 
>        
> Yiqian



Was that test done on the same hardware listed in comment 6 ?

Comment 15 Yiqian Wei 2016-08-02 10:17:16 UTC
(In reply to Dr. David Alan Gilbert from comment #14)
> (In reply to Yiqian Wei from comment #13)
> > Hi Dave,
> > 
> >     the full error message, as follows.
> >    
> > (qemu) red_dispatcher_loadvm_commands: 
> > qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host
> > (3392288 kHz), and TSC scaling unavailable
> > qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host
> > (3392288 kHz), and TSC scaling unavailable
> > qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host
> > (3392288 kHz), and TSC scaling unavailable
> > qemu-kvm: warning: TSC frequency mismatch between VM (3092972 kHz) and host
> > (3392288 kHz), and TSC scaling unavailable
> > 
> >        
> > Yiqian
> 
> 
> 
> Was that test done on the same hardware listed in comment 6 ?

Hi Dave,
   Some are not the same,I retest hardware platform:

 source:
processor	: 3
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
stepping	: 7
microcode	: 0x29
cpu MHz		: 3315.546
cache size	: 6144 KB
physical id	: 0
siblings	: 4
core id		: 3
cpu cores	: 4
apicid		: 6
initial apicid	: 6
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid xsaveopt
bogomips	: 6186.05
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:



destination:
processor	: 7
vendor_id	: GenuineIntel
cpu family	: 6
model		: 42
model name	: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping	: 7
microcode	: 0x29
cpu MHz		: 3268.250
cache size	: 8192 KB
physical id	: 0
siblings	: 8
core id		: 3
cpu cores	: 4
apicid		: 7
initial apicid	: 7
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid xsaveopt
bogomips	: 6784.83
clflush size	: 64
cache_alignment	: 64
address sizes	: 36 bits physical, 48 bits virtual
power management:

Comment 16 Dr. David Alan Gilbert 2016-08-02 10:31:55 UTC
OK, good that matches the TSC numbers that we see in the error.

Comment 17 Guo, Zhiyi 2016-08-22 08:01:02 UTC
Base on comment 16 & 15, move to verified

Comment 19 errata-xmlrpc 2016-11-07 21:20:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2673.html