qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Alexander Graf <agraf@suse.de>
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 18:22:40 +0000	[thread overview]
Message-ID: <f43fc5581001081022u10484218i14941d9e912d1dd@mail.gmail.com> (raw)
In-Reply-To: <6374C4B6-BFB4-4EC5-8DA9-1377392623CF@suse.de>

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.

  reply	other threads:[~2010-01-08 18:24 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 [this message]
2010-01-08 18:27       ` Alexander Graf
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=f43fc5581001081022u10484218i14941d9e912d1dd@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).