All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: [Qemu-devel] Re: [PATCH] PPC: tell the guest about the time base frequency
Date: Fri, 8 Jan 2010 19:27:12 +0100	[thread overview]
Message-ID: <6C965A04-49D9-4529-B1A0-E931C7626C87@suse.de> (raw)
In-Reply-To: <f43fc5581001081022u10484218i14941d9e912d1dd@mail.gmail.com>


On 08.01.2010, at 19:22, Blue Swirl wrote:

> On Fri, Jan 8, 2010 at 6:07 PM, Alexander Graf <agraf@suse.de> wrote:
>> 
>> On 08.01.2010, at 19:04, Blue Swirl wrote:
>> 
>>> On Fri, Jan 8, 2010 at 5:43 PM, Alexander Graf <agraf@suse.de> 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.

Alex

  reply	other threads:[~2010-01-08 18:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08 17:43 [Qemu-devel] [PATCH] PPC: tell the guest about the time base frequency Alexander Graf
2010-01-08 18:04 ` [Qemu-devel] " Blue Swirl
2010-01-08 18:07   ` Alexander Graf
2010-01-08 18:22     ` Blue Swirl
2010-01-08 18:27       ` Alexander Graf [this message]
2010-01-08 18:29         ` Blue Swirl
2010-01-08 18:37           ` Alexander Graf

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=6C965A04-49D9-4529-B1A0-E931C7626C87@suse.de \
    --to=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.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.