Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-21 Thread Anthony Liguori
On 11/20/2011 08:53 AM, Avi Kivity wrote: On 11/18/2011 04:54 PM, Anthony Liguori wrote: Thinking more about it, I think this entire line of thinking is wrong (including mine) :-) The problem you're trying to solve is that the RTC fires two 1 second timers regardless of whether the guest is re

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-21 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-21 Thread Stefano Stabellini
On Fri, 18 Nov 2011, Anthony Liguori wrote: > On 11/18/2011 05:46 AM, Stefano Stabellini wrote: > > On Tue, 15 Nov 2011, Stefano Stabellini wrote: > >> On Tue, 15 Nov 2011, Anthony Liguori wrote: > >>> On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: > From: Stefano Stabellini >

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-20 Thread Avi Kivity
On 11/18/2011 04:54 PM, Anthony Liguori wrote: > > Thinking more about it, I think this entire line of thinking is wrong > (including mine) :-) > > The problem you're trying to solve is that the RTC fires two 1 second > timers regardless of whether the guest is reading the wall clock time, > right?

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-18 Thread Anthony Liguori
On 11/18/2011 05:46 AM, Stefano Stabellini wrote: On Tue, 15 Nov 2011, Stefano Stabellini wrote: On Tue, 15 Nov 2011, Anthony Liguori wrote: On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: From: Stefano Stabellini Xen doesn't need full RTC emulation in Qemu because the RTC is

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-18 Thread Anthony Liguori
On 11/18/2011 05:46 AM, Stefano Stabellini wrote: On Tue, 15 Nov 2011, Stefano Stabellini wrote: On Tue, 15 Nov 2011, Anthony Liguori wrote: On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: From: Stefano Stabellini Xen doesn't need full RTC emulation in Qemu because the RTC is

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-18 Thread Stefano Stabellini
On Tue, 15 Nov 2011, Stefano Stabellini wrote: > On Tue, 15 Nov 2011, Anthony Liguori wrote: > > On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: > > > From: Stefano Stabellini > > > > > > Xen doesn't need full RTC emulation in Qemu because the RTC is already > > > emulated by the hy

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-15 Thread Stefano Stabellini
On Tue, 15 Nov 2011, Anthony Liguori wrote: > On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: > > From: Stefano Stabellini > > > > Xen doesn't need full RTC emulation in Qemu because the RTC is already > > emulated by the hypervisor. In particular we want to avoid the timers > > ini

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-15 Thread Anthony Liguori
On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: From: Stefano Stabellini Xen doesn't need full RTC emulation in Qemu because the RTC is already emulated by the hypervisor. In particular we want to avoid the timers initialization so that Qemu doesn't need to wake up needlessly. S

[Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-15 Thread stefano.stabellini
From: Stefano Stabellini Xen doesn't need full RTC emulation in Qemu because the RTC is already emulated by the hypervisor. In particular we want to avoid the timers initialization so that Qemu doesn't need to wake up needlessly. Signed-off-by: Stefano Stabellini --- hw/mc146818rtc.c | 36 ++