lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120125122702.GA30888@amt.cnet>
Date:	Wed, 25 Jan 2012 10:27:03 -0200
From:	Marcelo Tosatti <mtosatti@...hat.com>
To:	Johannes Stezenbach <js@...21.net>
Cc:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: 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;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ