From: Marcelo Tosatti <mtosatti@redhat.com>
To: Johannes Stezenbach <js@sig21.net>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-3.2.1 + KVM: TSC unstable on Core i5-2400S / H67
Date: Wed, 25 Jan 2012 10:27:03 -0200 [thread overview]
Message-ID: <20120125122702.GA30888@amt.cnet> (raw)
In-Reply-To: <20120124113608.GA16876@sig21.net>
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;
next prev parent reply other threads:[~2012-01-25 12:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 11:36 linux-3.2.1 + KVM: TSC unstable on Core i5-2400S / H67 Johannes Stezenbach
2012-01-25 12:27 ` Marcelo Tosatti [this message]
2012-01-25 13:25 ` Johannes Stezenbach
2012-01-26 9:46 ` Johannes Stezenbach
2012-01-26 14:43 ` Jan Kiszka
2012-01-26 15:35 ` Johannes Stezenbach
2012-01-26 16:48 ` Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120125122702.GA30888@amt.cnet \
--to=mtosatti@redhat.com \
--cc=js@sig21.net \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.