On Sun, May 30, 2010 at 11:41:36AM +0000, Blue Swirl wrote: > >> I meant that in the scenario, the guest won't change the RTC before > >> 30Mcyc because of some built in determinism in the guest. At that > >> point, because of some reason, the change would happen. > >> > > I still don't understand what are you trying to say here. Guest changes > > frequency because of some even in the guest. It is totally independent > > of what happens in QEMUs RTC emulation. > > I'm trying to understand the order of events. In the scenario, the > order of events on real HW would be: > 10Mcyc: tick IRQ 1 > 20Mcyc: tick IRQ 2 > 30Mcyc: tick IRQ 3 > 30Mcyc: reprogram timer > 31Mcyc: tick IRQ 4 > 32Mcyc: tick IRQ 5 > 33Mcyc: tick IRQ 6 > 34Mcyc: tick IRQ 7 > > With QEMU, the order could become: > 30Mcyc: reprogram timer > 30.5Mcyc: tick IRQ 1 > 31Mcyc: tick IRQ 2 > 31.5Mcyc: tick IRQ 3 > 32Mcyc: tick IRQ 4 > 32.5Mcyc: tick IRQ 5 > 33Mcyc: tick IRQ 6 > 34Mcyc: tick IRQ 7 > > Correct? Not sure, your description is not complete. Let me try: On real HW: 10Mcyc: tick IRQ 1 -> delivered to an OS 20Mcyc: tick IRQ 2 -> delivered to an OS 30Mcyc: tick IRQ 3 -> delivered to an OS 30Mcyc: reprogram timer 31Mcyc: tick IRQ 4 -> delivered to an OS 32Mcyc: tick IRQ 5 -> delivered to an OS 33Mcyc: tick IRQ 6 -> delivered to an OS 34Mcyc: tick IRQ 7 -> delivered to an OS
With QEMU: 10Mcyc: tick IRQ 1 -> coalesced 20Mcyc: tick IRQ 2 -> coalesced 30Mcyc: tick IRQ 3 -> coalesced 30Mcyc: reprogram timer 30.1Mcyc: tick IRQ 1 -> delivered to an OS 30.2Mcyc: tick IRQ 2 -> delivered to an OS 30.3Mcyc: tick IRQ 3 -> delivered to an OS 31Mcyc: tick IRQ 4 -> delivered to an OS 32Mcyc: tick IRQ 5 -> delivered to an OS 33Mcyc: tick IRQ 6 -> delivered to an OS 34Mcyc: tick IRQ 7 -> delivered to an OS -- Gleb.