qemu/hw/kvm
Jan Kiszka 0cdd3d1444 kvm: i8254: Fix conversion of in-kernel to userspace state
Due to a offset between the clock used to generate the in-kernel
count_load_time (CLOCK_MONOTONIC) and the clock used for processing this
in userspace (vm_clock), reading back the output of PIT channel 2 via
port 0x61 was broken. One use cases that suffered from it was the CPU
frequency calibration of SeaBIOS, which also affected IDE/AHCI timeouts.

This fixes it by calibrating the offset between both clocks on
kvm_pit_get and adjusting the kernel value before saving it in the
userspace state. As the calibration only works while the vm_clock is
running, we cache the in-kernel state across stopped phases.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-06-11 14:18:23 +03:00
..
apic.c kvm/apic: correct short memset 2012-06-11 12:57:40 +03:00
clock.c kvmclock: guest stop notification 2012-04-12 19:01:42 -03:00
clock.h kvm: Move kvmclock into hw/kvm folder 2012-01-19 12:14:39 +01:00
i8254.c kvm: i8254: Fix conversion of in-kernel to userspace state 2012-06-11 14:18:23 +03:00
i8259.c i8259: Do not clear level-triggered lines in IRR on init 2012-02-17 09:58:22 -06:00
ioapic.c qom: Unify type registration 2012-02-15 09:39:21 -06:00