From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 1/4] xen: introduce mc146818rtcxen Date: Mon, 21 Nov 2011 14:21:14 +0100 Message-ID: References: <1321368671-1134-1-git-send-email-stefano.stabellini@eu.citrix.com> <4EC27D0D.3040204@codemonkey.ws> <4EC671AF.5030805@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4EC671AF.5030805@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: qemu-devel@nongnu.org Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 11/18/2011 03:54 PM, Anthony Liguori wrote: > > The Right Solution would be to modify the RTC emulation such that it did > a qemu_get_clock() during read of the CMOS registers in order to ensure > the time was up to date (instead of using 1 second timers). True, but you also have to handle UIP and the UF/AF interrupts. Basically you have to track the various pieces of state and trigger a timer when the routine would do something interesting. It's not hard, but it's also a decent amount of programming. Paolo