adding Irix (and, to a lesser extent, Solaris) userland emulation to QEMU
Go to file
Paolo Bonzini ab33fcda9f enable vm_clock to "warp" in the iothread+icount case
The previous patch however is not enough, because if the virtual CPU
goes to sleep waiting for a future timer interrupt to wake it up, qemu
deadlocks.  The timer interrupt never comes because time is driven by
icount, but the vCPU doesn't run any insns.

You could say that VCPUs should never go to sleep in icount
mode if there is a pending vm_clock timer; rather time should
just warp to the next vm_clock event with no sleep ever taking place.
Even better, you can sleep for some time related to the
time left until the next event, to avoid that the warps are too visible
externally; for example, you could be sending network packets continously
instead of every 100ms.

This is what this patch implements.  qemu_clock_warp is called: 1)
whenever a vm_clock timer is adjusted, to ensure the warp_timer is
synchronized; 2) at strategic points in the CPU thread, to make sure
the insn counter is synchronized before the CPU starts running.
In any case, the warp_timer is disabled while the CPU is running,
because the insn counter will then be making progress on its own.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-04-15 09:27:56 +02:00
QMP
audio Fix trivial "endianness bugs" 2011-04-03 21:42:57 +02:00
block vpc.c: Use get_option_parameter() does the search 2011-04-13 12:31:41 +02:00
bsd-user bsd-user: Fix possible memory leaks and wrong realloc call 2011-01-17 20:23:47 +00:00
darwin-user
default-configs unicore32: necessary modifications for other files to support unicore32 2011-04-12 18:49:05 +00:00
docs docs: Describe zero data clusters in QED specification 2011-04-13 12:06:40 +02:00
fpu softfloat: Add setter function for tininess detection mode 2011-04-12 23:33:33 +02:00
fsdev Delete useless 'extern' qualifiers for functions 2011-01-23 16:21:20 +00:00
gdb-xml
hw lm32: fix build breakage due to uninitialized variable 'r' 2011-04-13 07:41:19 -05:00
libcacard libcacard: add vscclient 2011-04-01 19:07:49 -05:00
linux-user unicore32: necessary modifications for other files to support unicore32 2011-04-12 18:49:05 +00:00
net change all other clock references to use nanosecond resolution accessors 2011-03-21 09:23:23 +01:00
pc-bios pc-bios/spapr-rtas.bin: remove executable flag 2011-04-01 20:04:24 +02:00
roms Revert SeaBIOS change due to overzealous commit -a 2011-04-13 08:16:53 -05:00
scripts simpletrace: Thread-safe tracing 2011-03-07 15:34:17 +00:00
slirp add a service to reap zombies, use it in SLIRP 2011-03-29 08:14:11 -05:00
sysconfigs/target
target-alpha Fix conversions from pointer to tcg_target_long 2011-04-10 00:45:16 +02:00
target-arm target-arm: Don't overflow when calculating value for signed VABAL 2011-04-13 20:47:50 +02:00
target-cris Fix conversions from pointer to tcg_target_long 2011-04-10 00:45:16 +02:00
target-i386 Fix conversions from pointer to tcg_target_long 2011-04-10 00:45:16 +02:00
target-lm32 Fix conversions from pointer to tcg_target_long 2011-04-10 00:45:16 +02:00
target-m68k Fix conversions from pointer to tcg_target_long 2011-04-10 00:45:16 +02:00
target-microblaze microblaze: Add partial decoding of stream insns 2011-04-12 00:48:33 +02:00
target-mips Fix conversions from pointer to tcg_target_long 2011-04-10 00:45:16 +02:00
target-ppc target-ppc: remove #ifdef FLOAT128 2011-04-12 21:51:50 +02:00
target-s390x s390x: fix KVM target 2011-04-04 00:34:10 +02:00
target-sh4 target-sh4: get rid of CPU_{Float,Double}U 2011-04-12 21:51:50 +02:00
target-sparc Fix conversions from pointer to tcg_target_long 2011-04-10 00:45:16 +02:00
target-unicore32 unicore32: add target-unicore32 directory for unicore32-linux-user support 2011-04-12 18:48:37 +00:00
tcg tcg/arm: Support host code being compiled for Thumb 2011-03-24 03:27:22 +01:00
tests tests/test-mmap.c: Check mmap() return value before using it 2011-04-14 17:31:47 +02:00
ui vnc: tight: Fix crash after 2GB of output 2011-04-10 00:14:51 +02:00
.gitignore Add TAGS and *~ to .gitignore 2011-02-24 11:25:38 -06:00
.gitmodules Add SLOF-based partition firmware for pSeries machine, allowing more boot options 2011-04-01 18:34:57 +02:00
CODING_STYLE checkpatch: adjust to QEMUisms 2011-01-20 20:58:56 +00:00
COPYING
COPYING.LIB
Changelog
HACKING HACKING: Update status of format checking 2011-02-25 16:31:05 -06:00
LICENSE
MAINTAINERS MAINTAINERS: add Milkymist board 2011-04-04 10:26:54 +02:00
Makefile libcacard: initial commit 2011-04-01 19:07:48 -05:00
Makefile.dis
Makefile.hw
Makefile.objs NBD: Use qemu_socket functions to open TCP and UNIX sockets 2011-04-07 13:51:48 +02:00
Makefile.target Makefile.target: Allow target helpers to be in any *_helper.c file 2011-04-04 20:18:06 +02:00
Makefile.user
README
TODO
VERSION Open up the 0.15 development branch 2011-02-02 08:39:28 +01:00
a.out.h
acl.c
acl.h
aes.c
aes.h
aio.c
alpha-dis.c
alpha.ld
arch_init.c LatticeMico32 target support 2011-03-07 13:42:36 +01:00
arch_init.h LatticeMico32 target support 2011-03-07 13:42:36 +01:00
arm-dis.c
arm-semi.c
arm.ld
async.c
balloon.c
balloon.h
bitmap.c bitmap: add a generic bitmap and bitops library 2011-02-23 16:28:29 -06:00
bitmap.h bitmap: add a generic bitmap and bitops library 2011-02-23 16:28:29 -06:00
bitops.c bitmap: add a generic bitmap and bitops library 2011-02-23 16:28:29 -06:00
bitops.h bitops: fix error on OpenBSD and mingw32 2011-02-25 17:21:22 +00:00
block-migration.c Fix integer overflow in block migration bandwidth calculation 2011-04-07 13:51:48 +02:00
block-migration.h
block.c block: Do not cache device size for removable media 2011-04-07 13:51:47 +02:00
block.h Do not delete BlockDriverState when deleting the drive 2011-04-07 13:51:47 +02:00
block_int.h Add flag to indicate external users to block device 2011-02-07 12:51:19 +01:00
blockdev.c Do not delete BlockDriverState when deleting the drive 2011-04-07 13:51:47 +02:00
blockdev.h blockdev: add refcount to DriveInfo 2011-02-07 12:51:19 +01:00
bswap.h
bt-host.c
bt-host.h
bt-vhci.c
buffered_file.c change all rt_clock references to use millisecond resolution accessors 2011-03-21 09:23:23 +01:00
buffered_file.h
cache-utils.c
cache-utils.h Delete useless 'extern' qualifiers for functions 2011-01-23 16:21:20 +00:00
check-qdict.c check-qdict: Fix possible crash 2011-02-20 18:45:09 +01:00
check-qfloat.c
check-qint.c
check-qjson.c
check-qlist.c
check-qstring.c
cmd.c
cmd.h Delete useless 'extern' qualifiers for functions 2011-01-23 16:21:20 +00:00
compatfd.c Use sigwait instead of sigwaitinfo. 2011-02-25 20:16:26 +00:00
compatfd.h
config.h
configure configure: disable opengl per default 2011-04-12 21:51:50 +02:00
console.c Consolidate DisplaySurface allocation in qemu_alloc_display() 2011-03-22 08:39:11 -05:00
console.h Make VNC support optional 2011-03-22 08:39:12 -05:00
cpu-all.h cpu-all.h: Remove unnecessary target-specific ifdef for CPU_QuadU 2011-04-04 21:14:28 +02:00
cpu-common.h cpu-common: Modify cpu_physical_memory_read and cpu_physical_memory_write 2011-04-12 21:51:50 +02:00
cpu-defs.h Expose thread_id in info cpus 2011-03-16 17:11:07 -03:00
cpu-exec.c unicore32: necessary modifications for other files to support unicore32 2011-04-12 18:49:05 +00:00
cpus.c enable vm_clock to "warp" in the iothread+icount case 2011-04-15 09:27:56 +02:00
cpus.h Refactor debug and vmstop request interface 2011-02-14 12:39:46 -02:00
cris-dis.c
cursor.c
cursor_hidden.xpm
cursor_left_ptr.xpm
cutils.c QCOW2: bug fix - read base image beyond its size 2011-02-10 13:23:44 +01:00
def-helper.h
device_tree.c Allow qemu_devtree_setprop() to take arbitrary values 2011-04-01 18:34:54 +02:00
device_tree.h Allow qemu_devtree_setprop() to take arbitrary values 2011-04-01 18:34:54 +02:00
dis-asm.h Delete useless 'extern' qualifiers for functions 2011-01-23 16:21:20 +00:00
disas.c Replace cpu_physical_memory_rw were possible 2011-04-12 21:51:50 +02:00
disas.h
dma-helpers.c
dma.h
dyngen-exec.h
elf.h unicore32: necessary modifications for other files to support unicore32 2011-04-12 18:49:05 +00:00
envlist.c
envlist.h Delete useless 'extern' qualifiers for functions 2011-01-23 16:21:20 +00:00
exec-all.h Make tb_alloc static 2011-02-10 18:17:43 +01:00
exec.c Replace cpu_physical_memory_rw were possible 2011-04-12 21:51:50 +02:00
gdbstub.c gdbstub: Catch and report more vmstop reasons 2011-04-03 23:57:39 +02:00
gdbstub.h Add scripts directory 2011-01-20 20:54:21 +00:00
gen-icount.h Fix conversions from pointer to tcg_target_long 2011-04-10 00:45:16 +02:00
hmp-commands.hx hmp-commands.hx: fix badly merged client_migrate_info command 2011-03-10 16:12:21 -06:00
host-utils.c
host-utils.h
hpet.h
hppa-dis.c
hppa.ld
i386-dis.c
i386.ld
ia64-dis.c
ia64.ld
input.c event: trivial coding style fixes 2011-04-09 10:56:17 +01:00
iohandler.c add a service to reap zombies, use it in SLIRP 2011-03-29 08:14:11 -05:00
ioport-user.c
ioport.c ioport: Improve error output 2011-03-06 21:01:32 +01:00
ioport.h
iorange.h
iov.c
iov.h
json-lexer.c
json-lexer.h
json-parser.c
json-parser.h
json-streamer.c
json-streamer.h
kvm-all.c kvm: x86: Push kvm_arch_debug to kvm_arch_handle_exit 2011-03-16 17:11:06 -03:00
kvm-stub.c Introduce log_start/log_stop in CPUPhysMemoryClient 2011-02-14 12:39:47 -02:00
kvm.h kvm: x86: Push kvm_arch_debug to kvm_arch_handle_exit 2011-03-16 17:11:06 -03:00
libfdt_env.h
linux-aio.c
m68k-dis.c
m68k-semi.c
m68k.ld
microblaze-dis.c
migration-exec.c
migration-fd.c
migration-tcp.c Fix conversions from pointer to int and vice versa 2011-03-20 21:39:23 +00:00
migration-unix.c Fix conversions from pointer to int and vice versa 2011-03-20 21:39:23 +00:00
migration.c Improve vm_stop reason declarations 2011-02-14 12:39:46 -02:00
migration.h add migration state change notifiers 2011-01-24 15:13:54 +01:00
mips-dis.c
mips.ld
module.c
module.h
monitor.c Replace cpu_physical_memory_rw were possible 2011-04-12 21:51:50 +02:00
monitor.h
nbd.c NBD: Use qemu_socket functions to open TCP and UNIX sockets 2011-04-07 13:51:48 +02:00
nbd.h NBD: Use qemu_socket functions to open TCP and UNIX sockets 2011-04-07 13:51:48 +02:00
net.c net: Improve the warnings for dubious command line option combinations 2011-04-01 22:53:49 +02:00
net.h
notify.c
notify.h
os-posix.c add a service to reap zombies, use it in SLIRP 2011-03-29 08:14:11 -05:00
os-win32.c Expose thread_id in info cpus 2011-03-16 17:11:07 -03:00
osdep.c
osdep.h Merge remote branch 'qemu-kvm/uq/master' into staging 2011-03-21 17:42:20 -05:00
oslib-posix.c
oslib-win32.c w32: Remove implementation of function ffs 2011-02-20 20:18:21 +00:00
path.c user: speed up init_paths a bit 2011-02-09 10:33:54 +02:00
pci-ids.txt
pflib.c
pflib.h
poison.h LatticeMico32 target support 2011-03-07 13:42:36 +01:00
posix-aio-compat.c trace: Trace posix-aio-compat.c completion and cancellation 2011-03-07 15:34:46 +00:00
ppc-dis.c
ppc.ld
ppc64.ld
qbool.c
qbool.h
qdict-test-data.txt
qdict.c
qdict.h
qemu-aio.h
qemu-barrier.h
qemu-char.c Merge remote branch 'amit/for-anthony' into staging 2011-03-24 08:11:58 -05:00
qemu-char.h char: Prevent multiple devices opening same chardev 2011-03-21 16:57:13 +05:30
qemu-common.h enable vm_clock to "warp" in the iothread+icount case 2011-04-15 09:27:56 +02:00
qemu-config.c spice: add chardev (v5) 2011-01-24 15:41:40 +01:00
qemu-config.h
qemu-doc.texi Documentation: add Sheepdog disk images 2011-02-07 09:44:45 +01:00
qemu-error.c
qemu-error.h
qemu-img-cmds.hx qemu-img: Initial progress printing support 2011-04-07 13:51:47 +02:00
qemu-img.c qemu-img rebase: Fix segfault if backing file can't be opened 2011-04-07 13:51:48 +02:00
qemu-img.texi Documentation: Add qemu-img check/rebase 2011-01-24 16:41:49 +01:00
qemu-io.c qemu-io: Fix discard command 2011-01-31 10:03:00 +01:00
qemu-lock.h qemu-lock.h: Remove non-pthreads spinlock implementations 2011-02-20 15:20:06 +01:00
qemu-log.h
qemu-malloc.c
qemu-nbd.c
qemu-nbd.texi
qemu-objects.h
qemu-option.c
qemu-option.h
qemu-options.h
qemu-options.hx error message if user specifies curses on cmd line when curses is disabled 2011-03-22 08:39:12 -05:00
qemu-os-posix.h
qemu-os-win32.h
qemu-progress.c qemu-img: Initial progress printing support 2011-04-07 13:51:47 +02:00
qemu-queue.h
qemu-sockets.c Set errno=ENOTSUP for attempts to use UNIX sockets on Windows platforms 2011-04-07 13:51:48 +02:00
qemu-tech.texi
qemu-thread-posix.c qemu-thread: delete unused functions 2011-03-19 08:30:28 +00:00
qemu-thread-posix.h add Win32 IPI service 2011-03-13 14:44:22 +00:00
qemu-thread-win32.c w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy 2011-03-19 08:29:35 +00:00
qemu-thread-win32.h add win32 qemu-thread implementation 2011-03-13 14:44:21 +00:00
qemu-thread.h qemu-thread.h: include inttypes.h 2011-04-01 19:07:48 -05:00
qemu-timer-common.c
qemu-timer.c enable vm_clock to "warp" in the iothread+icount case 2011-04-15 09:27:56 +02:00
qemu-timer.h enable vm_clock to "warp" in the iothread+icount case 2011-04-15 09:27:56 +02:00
qemu-tool.c tools: Use real async.c instead of stubs 2011-03-15 13:21:14 +01:00
qemu-x509.h
qemu.sasl
qemu_socket.h net: remove parse_host_src_port() function 2011-03-06 20:06:50 +01:00
qerror.c qerror: Add QERR_UNKNOWN_BLOCK_FORMAT_FEATURE 2011-02-10 13:23:44 +01:00
qerror.h Make VNC support optional 2011-03-22 08:39:12 -05:00
qfloat.c
qfloat.h
qint.c
qint.h
qjson.c
qjson.h
qlist.c
qlist.h
qmp-commands.hx qmp-commands.hx: Clean up mess of client_migrate_info 2011-03-22 08:39:12 -05:00
qobject.h
qstring.c
qstring.h
range.h
readline.c
readline.h
rules.mak Add scripts directory 2011-01-20 20:54:21 +00:00
rwhandler.c
rwhandler.h
s390-dis.c
s390.ld
savevm.c Fix migration uint8 arrys handled 2011-03-21 17:41:52 -05:00
sh4-dis.c
simpletrace.c simpletrace: Move st_init() error reporting 2011-03-15 18:03:26 +00:00
simpletrace.h simpletrace: Move st_init() error reporting 2011-03-15 18:03:26 +00:00
softmmu-semi.h
softmmu_defs.h
softmmu_exec.h
softmmu_header.h
softmmu_template.h
sparc-dis.c
sparc.ld
sparc64.ld
spice-qemu-char.c spice: add chardev (v5) 2011-01-24 15:41:40 +01:00
sysemu.h report that QEMU process was killed by a signal 2011-03-26 12:54:42 +00:00
targphys.h
tcg-runtime.c
thunk.c
thunk.h
trace-events trace: Trace bdrv_set_locked() 2011-04-07 13:51:47 +02:00
translate-all.c
uboot_image.h
usb-bsd.c Fix trivial "endianness bugs" 2011-04-03 21:42:57 +02:00
usb-linux.c change all rt_clock references to use millisecond resolution accessors 2011-03-21 09:23:23 +01:00
usb-stub.c
version.rc
vgafont.h
vl.c exit if -drive specified is invalid instead of ignoring the "wrong" -drive 2011-04-07 13:51:48 +02:00
x86_64.ld

README

Read the documentation in qemu-doc.html.

Fabrice Bellard.