History | View | Annotate | Download (8.1 kB)
ptimer: move declarations to ptimer.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-timer: more clock functions
These will be used when moving icount accounting to cpus.c.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-timer: move icount to cpus.c
None of this is needed by tools, and most of it can even be made staticinside cpus.c.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qemu-timer: use atexit for quit_timers
qemu-timer: move more stuff out of qemu-timer.c
main-loop: create main-loop.h
qemu-timer: Introduce clock reset notifier
QEMU_CLOCK_HOST is based on the system time which may jump backward incase the admin or NTP adjusts it. RTC emulations and other device modelscan suffer in this case as timers will stall for the period the clock...
qemu-timer: Remove unneeded include statement (w32)
mmsystem.h is not needed in qemu-timer.h, so remove it.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
vmstate: port pmtimer
It was a half conversion. Finish it.enabled can only get values of 0, 1 or 2, was declared as an int butsent as an unint8_t, change its type.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Move clock related functions to qemu-timer.h
Move declarations for clock related functions from sysemu.h to qemu-timer.h.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
enable vm_clock to "warp" in the iothread+icount case
The previous patch however is not enough, because if the virtual CPUgoes to sleep waiting for a future timer interrupt to wake it up, qemudeadlocks. The timer interrupt never comes because time is driven by...
qemu_next_deadline should not consider host-time timers
It is purely for icount-based virtual timers. And now that we got thecode right, rename the function to clarify the intended scope.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Tested-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>...
add more helper functions with explicit milli/nanosecond resolution
The code doesn't make much sense right now, but it will assoon as timers will be able to scale their resolution arbitrarily.
add a generic scaling mechanism for timers
This enables rt_clock timers to use nanosecond resolution, just byusing the _ns functions; there is really no reason to forbid that.
Migrated timers are all using vm_clock (of course; but I checked thatanyway) so the timers in the savevm files are already in nanosecond...
remove qemu_get_clock
These patches are already not doing a great service to out-of-treemodifications to QEMU. However, at least we can warn them by gettingrid of the old confusing functions, or otherwise causing compilationerrors. This patch removes qemu_get_clock; the previous one changed...
Mov muldiv64 to qemu-common.h (Thus unbreaking gus)
Signed-off-by: malc <av1474@comtv.ru>
qemu-timer: move commonly used timer code to qemu-timer-common
Move timer init functions to a new file, qemu-timer-common.c. Make othercritical timer functions inlined to preserve performance inqemu-timer.c, also move muldiv64() (used by the inline functions)...
Implement cpu_get_real_ticks for Alpha.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix --enable-profiler compilation.
There's a header file inclusion ordering problem between cpu-all.hand qemu-timer.h, such that cpu_get_real_ticks is not defined whenwe attempt to use it in profile_getclock.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
Make cpu_get_real_ticks use mfspr
PowerPC CPUs have had two ways to read the time base for quite some time now.They provide it using the mfspr instruction or - if a special bit is set inthat opcode - using mftb. For timekeeping we're currently using mftb....
Compile qemu-timer only once
Arrange various declarations so that also non-CPU code can accessthem, adjust users.
Move CPU specific code to cpus.c.
split out qemu-timer.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
add qemu_get_clock_ns
Some places use get_clock directly because they want to access thert_clock with nanosecond precision. Add a function to do exactly thatinstead of using internal interfaces.
Introduce QEMU_CLOCK_HOST
Despite its name QEMU_CLOCK_REALTIME is (normally) not usingCLOCK_REALTIME / the host system time as base. In order to allow alsonon-trivial RTC emulations (MC146818) to follow the host time instead ofthe virtual guest time, introduce the new clock type QEMU_CLOCK_HOST. It...
Make get_ticks_per_sec() a static inline
ticks_per_sec is a constant. There's no need to store it as a variable as itnever changes since our time is based on units.
Convert get_ticks_per_sec() to a static inline and move the constant intoqemu-timer.h. Remove all references to QEMU_TIMER_BASE so that we consistently...
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
variable timer intervals
This patch introduces dynamic timer intervals: we slow down the refreshrate when there in no much activity but we get back to a fast refreshrate when the activity resume.
Please note that qemu_timer_expired is not an inline function any more...
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162