Paolo Bonzini ce78d18ced icount: prepare the code for future races in calling qemu_clock_warp
Computing the deadline of all vm_clocks is somewhat expensive and calls
out to qemu-timer.c; two reasons not to do it in the seqlock's write-side
critical section.  This however opens the door for races in setting and
reading vm_clock_warp_start.

To plug them, we need to cover the case where a new deadline slips in
between the call to qemu_clock_deadline_ns_all and the actual modification
of the icount_warp_timer.  Restrict changes to vm_clock_warp_start and
the icount_warp_timer's expiration time, to only move them back (which
would simply cause an early wakeup).

If a vm_clock timer is cancelled while CPUs are idle, this might cause the
icount_warp_timer to fire unnecessarily.  This is not a problem, after it
fires the timer becomes inactive and the next call to timer_mod_anticipate
will be precise.

In addition to this, we must deactivate the icount_warp_timer _before_
checking whether CPUs are idle.  This way, if the "last" CPU becomes idle
during the call to timer_del we will still set up the icount_warp_timer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-10-17 17:31:00 +02:00
2013-10-11 16:50:02 +02:00
2013-10-11 09:34:56 -07:00
2013-04-18 13:50:53 +02:00
2013-07-09 13:38:56 -05:00
2013-10-11 09:34:56 -07:00
2013-08-07 12:48:00 -05:00
2013-10-03 00:04:20 +01:00
2013-10-11 09:34:56 -07:00
2013-10-12 16:19:20 -07:00
2013-05-03 13:58:09 +02:00
2013-10-17 17:30:55 +02:00
…
2013-10-11 09:34:56 -07:00
2013-09-05 09:40:31 -05:00
…
2013-10-11 10:52:54 +02:00
2013-10-11 09:34:56 -07:00
…
2013-09-03 12:25:55 +02:00
2013-07-23 02:41:31 +02:00
2013-09-17 11:10:47 -05:00
2013-08-12 09:15:12 -05:00
2013-10-11 16:50:01 +02:00
2013-06-14 15:33:10 +01:00
2013-09-03 12:25:55 +02:00
2013-09-06 15:25:08 +02:00
2013-05-18 16:35:12 +04:00
2013-09-12 13:49:50 +02:00
2013-10-11 09:34:56 -07:00
2013-07-19 12:52:03 +04:00
2013-05-01 13:06:07 +02:00
2013-09-02 09:08:29 -07:00
2013-10-11 09:34:56 -07:00
2013-09-25 21:23:05 +02:00
…
2013-08-15 15:41:13 -05:00
2013-10-11 09:34:56 -07:00
…
2013-04-08 18:13:10 +02:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
S
Description
Original Xbox Emulator for Windows, macOS, and Linux (Active Development)
Readme GPL-2.0
724 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 82.3%
C++ 6.9%
Python 3.5%
Dylan 2.7%
Shell 1.5%
Other 2.9%