Received: from eggs.gnu.org ([2001:4830:134:3::10]:51260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Urx99-0004oC-FP for qemu-devel@nongnu.org; Wed, 26 Jun 2013 17:21:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Urx91-0005nm-Kd for qemu-devel@nongnu.org; Wed, 26 Jun 2013 17:20:59 -0400 Received: from indium.canonical.com ([91.189.90.7]:35756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Urx91-0005nL-9E for qemu-devel@nongnu.org; Wed, 26 Jun 2013 17:20:51 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Urx90-0008TU-LB for ; Wed, 26 Jun 2013 21:20:50 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 99C402E8026 for ; Wed, 26 Jun 2013 21:20:50 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 26 Jun 2013 21:15:30 -0000 From: Jeff Rizzo Sender: bounces@canonical.com References: <20130626203059.25509.36668.malonedeb@soybean.canonical.com> Message-Id: <20130626211531.25729.40084.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1195012] Re: x86_64 and i386 return 0 when reading MSR_TSC Reply-To: Bug 1195012 <1195012@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org The NetBSD problem report where this issue was raised: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=3D47967 a workaround has been put in place for now, but it would be good to fix this in QEMU. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1195012 Title: x86_64 and i386 return 0 when reading MSR_TSC Status in QEMU: New Bug description: Running NetBSD 6.1 (i386 and amd64) under QEMU (from git - 1.5.50 is the = version it shows) results in an incorrectly set TSC frequency (set to 0), because NetBSD uses rdmsr(TSC_MSR) for its seri= alizing CPU counter. To reproduce the problem, you can run an install ISO of NetBSD 6.1 (either i386 or amd64, depending on which qemu). Quit out of the installer, and you're left at a root prompt: # sysctl machdep.tsc_freq machdep.tsc_freq =3D 0 ...on real hardware, it will return the TSC frequency: # sysctl machdep.tsc_freq machdep.tsc_freq =3D 3292685070 ...this causes problems with a number of applications. The NetBSD code which reads the MSR is here: http://nxr.netbsd.org/xref/src/sys/arch/x86/x86/tsc.c#262 ... the "rdmsr(MSR_TSC)" call in cpu_counter_serializing() always returns 0 when run under QEMU. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1195012/+subscriptions