qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Timers


From: Paul Brook
Subject: Re: [Qemu-devel] Timers
Date: Wed, 23 May 2007 22:56:39 +0100
User-agent: KMail/1.9.6

> > Code looks reasonable to me.  The FIXME means you're changing the timer
> > parameters after starting the timer. I didn't check whether this does
> > anything sensible (this may depend on the device), hence the message.
> > It probably needs some attention when reload == 1 && s->enabled.
> >
> > Note that save/restore is not implemented.  You may wish to implement
> > this
>
> I was thinking that it should be possible to save/restore all vm_clock
> based timers in qemu at QEMUTimer level so that hardware emulation
> doesn't have to bother restoring this. (the "ptimer" would still need
> to save its internal fields).

The problem is that the timer itself doesn't know which device it is attached 
to. There's no way to ensure that the state is loaded into the correct 
timers. Remember that qemu can be restarted (and all timers reallocated) in 
between the save and the load.

There are already qemu_put_timer and qemu_get_timer routines.
I notice that the existing slavio_timer_{save,load} don't use these, so are 
probably already broken. 

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]