qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH uq/master] kvm: i8254: Fix conversion of in-kern


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH uq/master] kvm: i8254: Fix conversion of in-kernel to userspace state
Date: Mon, 11 Jun 2012 13:07:14 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/06/2012 05:28 PM, Jan Kiszka wrote:
> 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.

Applied, thanks.

> +    clock_offset = LLONG_MAX;

INT64_MAX would me more strictly correct, but in practice it makes no
difference.

-- 
error compiling committee.c: too many arguments to function



reply via email to

[Prev in Thread] Current Thread [Next in Thread]