diff options
author | Alexander Graf <agraf@suse.de> | 2010-02-09 17:37:05 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-02-14 16:10:54 +0200 |
commit | dc333cd60950185cdc069b4863b23fa262223d03 (patch) | |
tree | 078084c03746d137f34f7032e66e246f1bccb287 /target-ppc/kvm_ppc.h | |
parent | fa0be69a175b7d0d6c49ac9e198409ad38a8e359 (diff) |
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>
Diffstat (limited to 'target-ppc/kvm_ppc.h')
-rw-r--r-- | target-ppc/kvm_ppc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 3792ef7251..e8d66e88e4 100644 --- a/target-ppc/kvm_ppc.h +++ b/target-ppc/kvm_ppc.h @@ -14,4 +14,6 @@ void kvmppc_fdt_update(void *fdt); int kvmppc_read_host_property(const char *node_path, const char *prop, void *val, size_t len); +uint32_t kvmppc_get_tbfreq(void); + #endif /* __KVM_PPC_H__ */ |