From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulrich Obergfell Subject: Re: [PATCH 1/3] alleviate time drift with HPET periodic timers Date: Tue, 22 Mar 2011 05:40:21 -0400 (EDT) Message-ID: <1170032862.455751.1300786821647.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> References: <4D847B1D.3000002@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm , gcosta@redhat.com, Anthony Liguori , aliguori@us.ibm.com To: Jan Kiszka Return-path: Received: from mx4-phx2.redhat.com ([209.132.183.25]:40894 "EHLO mx4-phx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752990Ab1CVJk1 (ORCPT ); Tue, 22 Mar 2011 05:40:27 -0400 In-Reply-To: <4D847B1D.3000002@web.de> Sender: kvm-owner@vger.kernel.org List-ID: >> Part 1 of the patch implements the following QEMU command line option. >> >> -hpet [device=none|present][,driftfix=none|slew] > > Just define driftfix as property of the hpet device. That way it can be > controlled both globally (-global hpet.driftfix=...) and per hpet block > (once we support instantiating >1 of them). Many Thanks Jan, I started investigating code changes. I'm thinking of ... - adding a new field to the HPETState structure. uint32_t driftfix; - adding the property 'driftfix' to the DeviceInfo structure. DEFINE_PROP_BIT("driftfix", HPETState, driftfix, 0, false) Using a single bit so that the option syntax would be, e.g.: -global hpet.driftfix=on (Default is 'off') - Replace all 'if (hpet_driftfix ...)' by: if ((HPETState)s->driftfix ...) Regards, Uli