From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTJCI-0003bC-CD for qemu-devel@nongnu.org; Fri, 08 Jan 2010 13:04:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTJCC-0003TQ-5R for qemu-devel@nongnu.org; Fri, 08 Jan 2010 13:04:28 -0500 Received: from [199.232.76.173] (port=37092 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTJCB-0003TF-Vl for qemu-devel@nongnu.org; Fri, 08 Jan 2010 13:04:24 -0500 Received: from mail-pz0-f188.google.com ([209.85.222.188]:59304) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NTJCB-0001sf-Eu for qemu-devel@nongnu.org; Fri, 08 Jan 2010 13:04:23 -0500 Received: by pzk26 with SMTP id 26so10897916pzk.4 for ; Fri, 08 Jan 2010 10:04:22 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1262972592-7317-1-git-send-email-agraf@suse.de> References: <1262972592-7317-1-git-send-email-agraf@suse.de> From: Blue Swirl Date: Fri, 8 Jan 2010 18:04:02 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] Re: [PATCH] PPC: tell the guest about the time base frequency List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: QEMU Developers , Aurelien Jarno On Fri, Jan 8, 2010 at 5:43 PM, Alexander Graf wrote: > Our guest systems need to know by how much the timebase increases every second, > so there usually is a "timebase-frequency" property in the cpu leaf of the > device tree. > > This property is missing in OpenBIOS, as is the "clock-frequency" property that > tells the guest how fast the CPU is. FWIW that one is only used for > /proc/cpuinfo though. > > With qemu, Linux's fallback timebase speed and qemu's internal timebase speed > match up. With KVM, that is no longer true. The guest is running at the same > timebase speed as the host. > > This leads to massive timing problems. On my test machine, a "sleep 2" takes > about 14 seconds with KVM enabled. > > This patch exports the timebase and clock frequencies to OpenBIOS, so it can > then put them into the device tree. I'll push the OpenBIOS change with the > NewWorld patch set, once that's either been reviewed or applied. IIRC copying the host CPU frequency to guest was rejected earlier for x86.