From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: i8254: Clean up limit constant Date: Mon, 11 Jun 2012 14:18:40 +0300 Message-ID: <4FD5D410.9030707@redhat.com> References: <4FCF691A.10502@siemens.com> <4FD5C352.4000004@redhat.com> <4FD5C89D.2010408@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , qemu-devel , qemu-stable To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54531 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753556Ab2FKLSs (ORCPT ); Mon, 11 Jun 2012 07:18:48 -0400 In-Reply-To: <4FD5C89D.2010408@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/11/2012 01:29 PM, Jan Kiszka wrote: > On 2012-06-11 12:07, Avi Kivity wrote: >> 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. > > Was looking for this, just not long enough. Need to print some cheat > sheet. However, let's clean this up immediately: > > ---8<--- > > clock_offset is int64_t. > Thanks, folded. -- error compiling committee.c: too many arguments to function