]> git.proxmox.com Git - qemu.git/commit - hw/ppc.h
PPC: tell the guest about the time base frequency
authorAlexander Graf <agraf@suse.de>
Tue, 9 Feb 2010 16:37:05 +0000 (17:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 14 Feb 2010 14:10:54 +0000 (16:10 +0200)
commitdc333cd60950185cdc069b4863b23fa262223d03
tree078084c03746d137f34f7032e66e246f1bccb287
parentfa0be69a175b7d0d6c49ac9e198409ad38a8e359
PPC: tell the guest about the time base frequency

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.

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 frequency to OpenBIOS, so it can then put them
into the device tree.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/ppc.h
hw/ppc_newworld.c
hw/ppc_oldworld.c
target-ppc/kvm.c
target-ppc/kvm_ppc.h