Max Filippov 4f61927a41 hpet: fix infinite loop in qemu_run_timers with -icount enabled
hpet_timer timer callback rearms itself based on difference between
current HPET tick counter and comparator value. Difference calculated by
the hpet_calculate_diff function is limited to non-negative values.

cur_tick is calculated via hpet_get_ticks that uses qemu_get_clock_ns(vm_clock).

With -icount enabled vm_clock doesn't advance during qemu_run_timers
loop thus once difference is zero, qemu_run_timers loops forever
handling hpet_timer.

Limit hpet_calculate_diff results to positive only values to avoid that
infinite loop.

This fixes the following qemu-system-x86_64 hang when it reaches
timer_irq_works() in the linux bootup:

[    0.000000] Fast TSC calibration using PIT
[    0.000000] Detected 1000.054 MHz processor.
[    0.000031] Calibrating delay loop (skipped), value calculated using timer frequency.. 2000.10 BogoMIPS (lpj=10000540)
[    0.000404] pid_max: default: 32768 minimum: 301
[    0.001138] Mount-cache hash table entries: 256
[    0.003883] Initializing cgroup subsys ns
[    0.004035] Initializing cgroup subsys cpuacct
[    0.004280] Initializing cgroup subsys freezer
[    0.004790] Performance Events: AMD PMU driver.
[    0.004985] ... version:                0
[    0.005134] ... bit width:              48
[    0.005285] ... generic registers:      4
[    0.005437] ... value mask:             0000ffffffffffff
[    0.005625] ... max period:             00007fffffffffff
[    0.005807] ... fixed-purpose events:   0
[    0.005957] ... event mask:             000000000000000f
[    0.006275] SMP alternatives: switching to UP code

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-09 12:06:20 -06:00
2011-10-06 09:48:07 +02:00
2011-11-07 10:57:36 -06:00
2011-11-07 10:57:36 -06:00
2011-10-21 18:14:30 +02:00
2011-11-07 10:57:36 -06:00
2009-09-12 07:36:22 +00:00
2009-05-13 20:54:26 +01:00
2011-09-10 16:57:36 +00:00
2011-08-27 15:42:35 +00:00
2011-10-21 18:14:30 +02:00
2011-10-27 11:48:47 -02:00
2011-10-27 11:48:47 -02:00
2011-10-27 11:48:47 -02:00
2011-10-27 11:48:47 -02:00
2011-09-16 08:26:31 -05:00
2010-11-01 00:54:06 +03:00
2011-11-07 08:01:15 +00:00
2011-10-27 11:48:47 -02:00
2011-11-01 10:58:08 -05:00
2011-03-16 17:11:07 -03:00
2011-11-01 10:58:08 -05:00
2011-10-31 21:52:17 +01:00
2011-10-31 21:52:17 +01:00
2011-09-10 16:57:36 +00:00
2009-09-12 07:36:22 +00:00
2011-06-07 13:52:10 -05:00
2011-11-01 10:58:08 -05:00
2011-01-20 20:54:21 +00:00
2011-10-27 11:48:47 -02:00
2011-10-27 11:48:47 -02:00
2011-08-27 15:42:35 +00:00
2011-08-27 15:42:35 +00:00
2011-10-27 11:48:46 -02:00
2011-10-16 13:13:05 +02:00
2011-10-21 18:14:30 +02:00
2009-10-01 16:12:16 -05:00
2011-10-11 15:57:07 +02:00
2011-10-11 15:57:07 +02:00
2010-11-21 09:16:57 -06:00
2011-08-04 15:51:22 +02:00
2011-08-04 15:51:22 +02:00
2011-06-14 03:08:57 +02:00
2011-10-21 18:14:30 +02:00
2011-11-01 20:41:06 +01:00
2011-11-07 10:57:36 -06:00
2010-03-21 08:28:47 +00:00
2011-08-27 15:42:35 +00:00
2011-07-21 16:48:13 -03:00
2011-09-21 11:34:43 +02:00
2011-09-19 11:34:33 +02:00
2011-11-01 10:04:05 -05:00
2011-10-21 17:34:12 +02:00
2011-02-09 10:33:54 +02:00
2011-09-20 14:32:56 +02:00
2011-10-06 09:48:09 +02:00
2011-08-27 15:42:35 +00:00
2011-10-27 11:48:47 -02:00
2009-11-17 08:49:39 -06:00
2010-07-01 14:27:13 -03:00
2011-10-21 17:34:12 +02:00
2009-10-27 12:28:59 -05:00
2011-10-23 15:44:15 +00:00
2011-10-21 18:14:30 +02:00
2010-09-21 18:36:42 +02:00
2011-08-02 15:53:40 +02:00
2011-10-26 14:15:26 +01:00
2011-09-19 11:34:33 +02:00
2010-05-19 12:45:54 -03:00
2011-10-21 18:14:30 +02:00
2011-10-21 18:14:30 +02:00
2011-03-13 14:44:22 +00:00
2011-11-09 12:06:20 -06:00
2011-10-21 18:14:30 +02:00
2011-09-23 10:55:32 -05:00
2011-10-04 11:00:46 -03:00
2009-11-17 08:49:38 -06:00
2010-05-19 12:45:54 -03:00
2010-10-01 10:12:43 -03:00
2011-07-21 16:48:13 -03:00
2011-10-27 11:48:47 -02:00
2010-05-19 12:45:54 -03:00
2010-05-19 12:45:54 -03:00
2010-09-18 05:53:14 +00:00
2011-10-01 09:31:08 +00:00
2011-10-01 09:31:08 +00:00
2011-10-01 09:31:08 +00:00
2011-07-23 11:26:12 -05:00
2011-08-27 15:42:35 +00:00
2011-10-21 18:14:30 +02:00
2010-03-14 22:04:50 +01:00
2011-10-31 21:52:17 +01:00
2011-10-31 21:52:16 +01:00
2009-10-01 16:12:16 -05:00
2011-11-01 16:38:36 +01:00
2011-11-07 10:57:45 -06:00
2011-08-27 15:42:35 +00:00
2011-09-15 16:39:32 -03:00
2011-09-10 16:57:39 +00:00

Read the documentation in qemu-doc.html.

Fabrice Bellard.
Description
QEMU With E2K User Support
Readme 459 MiB
Languages
C 83.1%
C++ 6.3%
Python 3.2%
Dylan 2.8%
Shell 1.6%
Other 2.8%