lkml.org 
[lkml]   [2012]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: linux-3.2.1 + KVM: TSC unstable on Core i5-2400S / H67
On Tue, Jan 24, 2012 at 12:36:08PM +0100, Johannes Stezenbach wrote:
> Hi,
>
> I just got the following in dmesg with linux-3.2.1:
>
> [23379.612251] usb 2-1.2: new high-speed USB device number 6 using ehci_hcd
> [ 0.006666] Marking TSC unstable due to KVM discovered backwards TSC
> [23421.511167] Switching to clocksource hpet
>
> The mainboard is an Asus P8H67-V, BIOS 0806 10/26/2011 with Core i5-2400S.
> The kvm instance was running for a day already, and there was an overnight
> suspend-to-disk cycle in between, but the above happened ~1 hour after resume.
> (I don't think the usb message has anything to do with it, it's just
> the last message before the TSC message.)
>
> Hm, checking /var/log/kern.* it seems this also happened with
> linux-3.1.* without me noticing.
>
> Should I be worried? I thought Core-i5 processors have a stable TSC?

It does.

Can you please apply the following patch, and report back when it
reproduces again.

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9c912f0b..17d706d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2242,8 +2242,11 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
tsc_delta = !vcpu->arch.last_guest_tsc ? 0 :
tsc - vcpu->arch.last_guest_tsc;

- if (tsc_delta < 0)
+ if (tsc_delta < 0) {
+ printk(KERN_ERR "tsc = %llx last_guest_tsc = %llx\n",
+ tsc, vcpu->arch.last_guest_tsc);
mark_tsc_unstable("KVM discovered backwards TSC");
+ }
if (check_tsc_unstable()) {
kvm_x86_ops->adjust_tsc_offset(vcpu, -tsc_delta);
vcpu->arch.tsc_catchup = 1;


\
 
 \ /
  Last update: 2012-01-25 13:31    [W:0.048 / U:13.436 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site