From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTJaX-0002HP-I7 for qemu-devel@nongnu.org; Fri, 08 Jan 2010 13:29:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTJaU-0002EP-0T for qemu-devel@nongnu.org; Fri, 08 Jan 2010 13:29:33 -0500 Received: from [199.232.76.173] (port=55245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTJaT-0002EF-NC for qemu-devel@nongnu.org; Fri, 08 Jan 2010 13:29:29 -0500 Received: from mail-pw0-f43.google.com ([209.85.160.43]:48243) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NTJaT-00027k-8s for qemu-devel@nongnu.org; Fri, 08 Jan 2010 13:29:29 -0500 Received: by pwj11 with SMTP id 11so205130pwj.2 for ; Fri, 08 Jan 2010 10:29:28 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <6C965A04-49D9-4529-B1A0-E931C7626C87@suse.de> References: <1262972592-7317-1-git-send-email-agraf@suse.de> <6374C4B6-BFB4-4EC5-8DA9-1377392623CF@suse.de> <6C965A04-49D9-4529-B1A0-E931C7626C87@suse.de> From: Blue Swirl Date: Fri, 8 Jan 2010 18:29:08 +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 6:27 PM, Alexander Graf wrote: > > On 08.01.2010, at 19:22, Blue Swirl wrote: > >> On Fri, Jan 8, 2010 at 6:07 PM, Alexander Graf wrote: >>> >>> On 08.01.2010, at 19:04, Blue Swirl wrote: >>> >>>> 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. >>> >>> Well IIRC x86 Linux tries to find out the cpu frequency itself. >>> PPC Linux doesn't - it completely relies on entries in the device tree. >> >> The frequency could be a parameter for the -cpu flag, like -cpu >> 970fx,frequency=1000000000. > > We could implement that as an override to the current static code path. > For KVM it doesn't make any sense, as you really want to see the host frequency in the guest here. That's what users expect. Period. Even with 10 guests? What about migration?