adding Irix (and, to a lesser extent, Solaris) userland emulation to QEMU
Go to file
Michael Roth f789aa7baf qemu-ga: persist tracking of fsfreeze state via filesystem
Currently, qemu-ga may die/get killed/go away for whatever reason after
guest-fsfreeze-freeze has been issued, and before guest-fsfreeze-thaw
has been issued. This means the only way to unfreeze the guest is via
VNC/network/console access, but obtaining that access after-the-fact can
often be very difficult when filesystems are frozen. Logins will almost
always hang, for instance. In many cases the only recourse would be to
reboot the guest without any quiescing of volatile state, which makes
this a corner-case worth giving some attention to.

A likely failsafe for this situation would be to use a watchdog to
restart qemu-ga if it goes away. There are some precautions qemu-ga
needs to take in order to avoid immediately hanging itself on I/O,
however, namely, we must disable logging and defer to processing/creation
of user-specific logfiles, along with creation of the pid file if we're
running as a daemon. We also need to disable non-fsfreeze-safe commands,
as we normally would when processing the guest-fsfreeze-freeze command.

To track when we need to do this in a way that persists between multiple
invocations of qemu-ga, we create a file on the guest filesystem before
issuing the fsfreeze, and delete it when doing the thaw. On qemu-ga
startup, we check for the existance of this file to determine
the need to take the above precautions.

We're forced to do it this way since a more traditional approach such as
reading/writing state to a dedicated state file will cause
access/modification time updates, respectively, both of which will hang
if the file resides on a frozen filesystem. Both can occur even if
relatime is enabled. Checking for file existence will not update the
access time, however, so it's a safe way to check for fsfreeze state.

An actual watchdog-based restart of qemu-ga can itself cause an access
time update that would thus hang the invocation of qemu-ga, but the
logic to workaround that can be handled via the watchdog, so we don't
address that here (for relatime we'd periodically touch the qemu-ga
binary if the file $qga_statedir/qga.state.isfrozen is not present, this
avoids qemu-ga updates or the 1 day relatime threshold causing an
access-time update if we try to respawn qemu-ga shortly after it goes
away)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2012-04-30 08:42:22 -05:00
QMP qom: quick and dirty QOM filesystem based on FUSE 2012-04-26 13:14:57 -05:00
audio fix paaudio.c warnings 2012-04-25 21:04:57 +04:00
block Merge remote-tracking branch 'qmp/queue/qmp' into staging 2012-04-27 12:00:06 -05:00
bsd-user bsd-user: fix compile failure 2012-04-13 09:57:36 +01:00
darwin-user Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
default-configs get rid of CONFIG_VIRTIO_SCSI 2012-03-19 16:35:14 +01:00
docs Specification for qcow2 version 3 2012-04-20 15:57:27 +02:00
fpu softfloat: make USE_SOFTFLOAT_STRUCT_TYPES compile 2012-04-21 13:26:47 +00:00
fsdev Replace Qemu by QEMU in user visible documentation 2012-04-07 13:58:06 +00:00
gdb-xml
hw Merge remote-tracking branch 'kraxel/usb.49' into staging 2012-04-26 15:21:52 -05:00
include/qemu qom: Refine container_get() to allow using a custom root 2012-04-24 09:50:31 -05:00
libcacard libcacard/vcard_emul_nss: add warning for old coolkey 2012-03-26 18:39:00 +02:00
linux-headers kvm: update linux headers 2012-04-12 19:01:42 -03:00
linux-user linux-user: Fix exit syscall with QOM CPU 2012-04-15 16:54:46 +00:00
net net: remove extra spaces in help messages 2012-02-10 10:44:52 +00:00
pc-bios sdl: Add QEMU mascot icon for use with SDL 2012-04-26 13:14:57 -05:00
qapi qemu-ga: add a whitelist for fsfreeze-safe commands 2012-04-30 08:42:10 -05:00
qga qemu-ga: add a whitelist for fsfreeze-safe commands 2012-04-30 08:42:10 -05:00
qom qom: Refine container_get() to allow using a custom root 2012-04-24 09:50:31 -05:00
roms seabios: update to 1.7.0 2012-04-17 10:51:41 +02:00
scripts create_config: simplify prefix=* block, remove CONFIG_QEMU_PREFIX 2012-04-24 09:50:31 -05:00
slirp main_loop_wait: block indefinitely 2012-04-26 13:14:58 -05:00
sysconfigs/target add Opteron_G4 CPU model (v2) 2012-03-12 14:05:25 -05:00
target-alpha target-alpha: QOM'ify CPU init 2012-04-15 21:26:55 +02:00
target-arm target-arm: Move reset handling to arm_cpu_reset 2012-04-21 18:13:22 +00:00
target-cris target-cris: Start QOM'ifying CPU init 2012-04-24 16:04:56 +02:00
target-i386 target-i386: Fix x86_cpuid_set_model_id() 2012-04-26 13:14:57 -05:00
target-lm32 Use uintptr_t for various op related functions 2012-04-14 14:23:37 +00:00
target-m68k Use uintptr_t for various op related functions 2012-04-14 14:23:37 +00:00
target-microblaze target-microblaze: QOM'ify CPU init 2012-04-24 16:04:56 +02:00
target-mips target-mips: Fix type cast for w64 (uintptr_t) 2012-04-15 21:25:17 +02:00
target-ppc target-ppc/machine.c: Drop unnecessary ifdefs 2012-04-15 18:23:47 +02:00
target-s390x Use uintptr_t for various op related functions 2012-04-14 14:23:37 +00:00
target-sh4 Use uintptr_t for various op related functions 2012-04-14 14:23:37 +00:00
target-sparc sparc: fix qtest 2012-04-19 18:52:48 +00:00
target-unicore32 target-unicore32: Move CPU-dependent init into initfn 2012-03-30 11:09:31 +02:00
target-xtensa target-xtensa: fix LOOPNEZ/LOOPGTZ translation 2012-04-21 13:24:45 +00:00
tcg tcg/i386: Add support for w64 ABI 2012-04-15 21:25:15 +02:00
tests qemu-iotests: add block-stream speed value test case 2012-04-27 11:44:50 -03:00
trace trace: make trace_thread_create() use its function arg 2012-03-12 10:12:34 +00:00
ui Replace Qemu by QEMU in comments 2012-04-07 14:00:45 +00:00
.gitignore .gitignore: add qemu-bridge-helper and option rom build products 2012-03-19 10:52:52 +00:00
.gitmodules
.mailmap
CODING_STYLE Replace Qemu by QEMU in internal documentation 2012-04-07 13:58:25 +00:00
COPYING
COPYING.LIB
Changelog
HACKING
LICENSE
MAINTAINERS tracetool: Add MAINTAINERS info 2012-04-18 14:03:00 +01:00
Makefile Merge remote-tracking branch 'stefanha/tracing' into staging 2012-04-26 15:21:01 -05:00
Makefile.dis
Makefile.hw make: Remove duplicate use of GLIB_CFLAGS 2012-02-09 20:44:38 +04:00
Makefile.objs Beautify makefile commands for generation of files with tracetool 2012-04-25 14:21:35 +01:00
Makefile.target Beautify makefile commands for generation of files with tracetool 2012-04-25 14:21:35 +01:00
Makefile.user qom: Add QOM support to user emulators 2012-03-13 13:23:18 -05:00
README
TODO
VERSION
a.out.h
acl.c
acl.h
aes.c
aes.h
aio.c aio: simplify qemu_aio_wait 2012-04-19 16:51:47 +02:00
alpha-dis.c
alpha.ld
arch_init.c pcspk: initialize PC speaker if compiled in 2012-04-15 08:56:58 +04:00
arch_init.h
arm-dis.c
arm-semi.c arm-semi: Don't use CPUState 2012-03-14 22:20:25 +01:00
arm.ld
async.c main_loop_wait: block indefinitely 2012-04-26 13:14:58 -05:00
balloon.c qapi: fix qmp_balloon() conversion 2012-04-27 11:44:50 -03:00
balloon.h
bitmap.c
bitmap.h
bitops.c
bitops.h
block-migration.c Purge migration of (almost) everything to do with monitors 2012-03-15 10:39:52 -03:00
block-migration.h
block.c block: add 'speed' optional parameter to block-stream 2012-04-27 11:44:50 -03:00
block.h block: add a function to clear incoming live migration flags 2012-04-05 16:27:56 +02:00
block_int.h block: add 'speed' optional parameter to block-stream 2012-04-27 11:44:50 -03:00
blockdev.c block: add 'speed' optional parameter to block-stream 2012-04-27 11:44:50 -03:00
blockdev.h
bswap.h
bt-host.c
bt-host.h
bt-vhci.c
buffered_file.c
buffered_file.h
cache-utils.c
cache-utils.h cache-utils: Add missing include file for uintptr_t 2012-03-11 11:25:19 +00:00
cmd.c qemu-io: use main_loop_wait 2012-04-19 16:29:33 +02:00
cmd.h
compatfd.c
compatfd.h
compiler.h rewrite QEMU_BUILD_BUG_ON 2012-02-09 16:17:51 +01:00
config.h
configure Revert "configure: Virtfs doesn't require libcap." 2012-04-26 13:14:58 -05:00
console.c optimize screendump for the common non-switch case 2012-02-24 13:36:05 -06:00
console.h console: add some trace events 2012-03-12 10:30:23 +00:00
coroutine-gthread.c coroutine-gthread.c: Avoid threading APIs deprecated in GLib 2.31 2012-04-14 10:59:14 +00:00
coroutine-sigaltstack.c coroutine: adding sigaltstack method (.c source) 2012-03-12 15:14:07 +01:00
coroutine-ucontext.c coroutine: switch to QSLIST 2012-02-17 08:33:33 -06:00
coroutine-win32.c
cpu-all.h w64: Fix data types in cpu-all.h, exec.c 2012-04-15 21:25:16 +02:00
cpu-common.h w64: Fix size of ram_addr_t 2012-03-03 18:10:16 +00:00
cpu-defs.h w64: Fix struct CPUTLBEntry 2012-04-15 21:25:16 +02:00
cpu-exec.c cpu-exec: Remove non-portable type cast and fix format string 2012-04-15 21:25:17 +02:00
cpus.c kvm: Drop redundant kvm_enabled from cpu_thread_is_idle 2012-04-12 19:01:41 -03:00
cpus.h qtest: add clock management 2012-03-30 08:14:11 -05:00
cris-dis.c
cursor.c Fix sign of sscanf format specifiers 2012-03-07 13:03:51 +00:00
cursor_hidden.xpm
cursor_left_ptr.xpm
cutils.c cutils: extract buffer_is_zero() from qemu-img.c 2012-02-09 16:17:50 +01:00
def-helper.h Add support for target helper functions which don't return 2012-03-24 13:01:46 +00:00
device_tree.c
device_tree.h
dis-asm.h target-lm32: add simple disassembler 2012-04-01 20:30:23 +02:00
disas.c disas: Replace 'unsigned long' by 'uintptr_t' 2012-04-15 21:25:18 +02:00
disas.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
dma-helpers.c Use DMADirection type for dma_bdrv_io 2012-04-05 14:54:40 +02:00
dma.h Merge remote-tracking branch 'kwolf/for-anthony' into staging 2012-04-10 08:16:12 -05:00
dyngen-exec.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
elf.h elf.h: Update EF_ARM_ constants to newer ABI versions 2012-04-06 19:25:57 +03:00
envlist.c
envlist.h
error.c error.c: don't return value for void function 2012-04-20 13:14:53 +01:00
error.h Error: Introduce error_copy() 2012-03-15 10:39:52 -03:00
error_int.h
event_notifier.c
event_notifier.h
exec-all.h tci: GETPC() macro must return an uintptr_t 2012-04-21 13:28:28 +00:00
exec-memory.h
exec-obsolete.h memory: get rid of cpu_register_io_memory() 2012-03-08 19:16:39 +02:00
exec.c w64: Use uintptr_t in exec.c 2012-04-15 21:25:17 +02:00
gdbstub.c gdbstub: Synchronize CPU state unconditionally in gdb_set_cpu_pc 2012-04-21 13:27:34 +00:00
gdbstub.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
gen-icount.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
hmp-commands.hx block: add 'speed' optional parameter to block-stream 2012-04-27 11:44:50 -03:00
hmp.c block: add 'speed' optional parameter to block-stream 2012-04-27 11:44:50 -03:00
hmp.h qapi: convert device_del 2012-04-09 14:35:25 -03:00
host-utils.c
host-utils.h
hppa-dis.c
hppa.ld
i386-dis.c
i386.ld
ia64-dis.c
ia64.ld
input.c input: send kbd+mouse events only to running guests. 2012-02-17 11:02:55 -06:00
int128.h
iohandler.c
ioport-user.c
ioport.c ioport: use INT64_MAX for IO ranges 2012-03-19 15:17:21 +02:00
ioport.h ioport: add destructor method to IORange 2012-03-05 17:36:19 +02:00
iorange.h ioport: add destructor method to IORange 2012-03-05 17:36:19 +02:00
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: set gsi_bits and max_gsi correctly 2012-04-12 19:01:42 -03:00
kvm-stub.c kvm: Drop unused kvm_pit_in_kernel 2012-04-12 19:01:41 -03:00
kvm.h kvm: Drop unused kvm_pit_in_kernel 2012-04-12 19:01:41 -03:00
libfdt_env.h
linux-aio.c aio: remove process_queue callback and qemu_aio_process_queue 2012-04-19 16:37:53 +02:00
lm32-dis.c target-lm32: add simple disassembler 2012-04-01 20:30:23 +02:00
m68k-dis.c
m68k-semi.c m68k-semi: Don't use CPUState 2012-03-14 22:20:26 +01:00
m68k.ld
main-loop.c main_loop_wait: block indefinitely 2012-04-26 13:14:58 -05:00
main-loop.h main_loop_wait: block indefinitely 2012-04-26 13:14:58 -05:00
memory.c memory: check address space when a listener is registered 2012-04-05 13:09:17 +03:00
memory.h memory: fix I/O port aliases 2012-03-05 17:40:12 +02:00
microblaze-dis.c
migration-exec.c
migration-fd.c qapi: Convert migrate 2012-03-15 10:39:52 -03:00
migration-tcp.c
migration-unix.c
migration.c migration: clear BDRV_O_INCOMING flags on end of incoming live migration 2012-04-05 16:28:49 +02:00
migration.h qapi: Convert migrate 2012-03-15 10:39:52 -03:00
mips-dis.c
mips.ld
module.c Remove type field in ModuleEntry as it's not used 2012-03-19 10:52:52 +00:00
module.h qom: Unify type registration 2012-02-15 09:39:21 -06:00
monitor.c qmp: add and use q type specifier 2012-03-27 09:15:28 -03:00
monitor.h suspend: add qmp events 2012-02-24 13:36:04 -06:00
nbd.c nbd: obey FUA on reads 2012-04-19 17:19:37 +02:00
nbd.h nbd: consistently return negative errno values 2012-04-19 16:36:43 +02:00
net.c net: move compute_mcast_idx() to net.h 2012-03-16 01:04:51 +02:00
net.h net: move compute_mcast_idx() to net.h 2012-03-16 01:04:51 +02:00
notify.c notifier: switch to QLIST 2012-02-17 08:33:32 -06:00
notify.h notifier: switch to QLIST 2012-02-17 08:33:32 -06:00
os-posix.c os-posix: Fix build on FreeBSD 2012-04-26 13:14:58 -05:00
os-win32.c
osdep.c
osdep.h qtest: add C version of test infrastructure 2012-03-30 08:14:11 -05:00
oslib-posix.c
oslib-win32.c main-loop: interrupt wait when data arrives on a socket 2012-04-07 08:34:16 +00:00
path.c
pci-ids.txt
pflib.c
pflib.h
poison.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
posix-aio-compat.c aio: remove process_queue callback and qemu_aio_process_queue 2012-04-19 16:37:53 +02:00
ppc-dis.c Replace Qemu by QEMU in comments 2012-04-07 14:00:45 +00:00
ppc.ld
ppc64.ld
qapi-schema-guest.json qemu-ga: persist tracking of fsfreeze state via filesystem 2012-04-30 08:42:22 -05:00
qapi-schema-test.json qapi: add struct-errors test case to test-qmp-output-visitor 2012-03-27 09:11:00 -03:00
qapi-schema.json block: add 'speed' optional parameter to block-stream 2012-04-27 11:44:50 -03:00
qbool.c
qbool.h
qdict-test-data.txt
qdict.c
qdict.h
qemu-aio.h aio: return "AIO in progress" state from qemu_aio_wait 2012-04-19 16:50:49 +02:00
qemu-barrier.h virtio: order index/descriptor reads 2012-04-25 10:53:47 +03:00
qemu-bridge-helper.c
qemu-char.c qemu-char: Fix crash when switching consoles 2012-04-24 09:50:31 -05:00
qemu-char.h qdev: nuke qdev_init_chardev() 2012-02-03 10:41:08 -06:00
qemu-common.h Merge commit 'ff71f2e8cacefae99179993204172bc65e4303df' into staging 2012-04-10 08:21:58 -05:00
qemu-config.c arm: add device tree support 2012-03-02 11:56:38 +00:00
qemu-config.h
qemu-coroutine-int.h coroutine: switch to QSLIST 2012-02-17 08:33:33 -06:00
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c block: allow interrupting a co_sleep_ns 2012-04-19 16:03:27 +02:00
qemu-coroutine.c
qemu-coroutine.h
qemu-doc.texi Replace Qemu by QEMU in w32 installation path (prefix) 2012-04-07 13:58:42 +00:00
qemu-error.c
qemu-error.h
qemu-file.h Spelling fixes in comments (it's -> its) 2012-03-08 15:22:11 +00:00
qemu-ga.c qemu-ga: persist tracking of fsfreeze state via filesystem 2012-04-30 08:42:22 -05:00
qemu-img-cmds.hx
qemu-img.c qemu-img: let 'qemu-img convert' flush data 2012-04-20 11:42:41 +02:00
qemu-img.texi
qemu-io.c qemu-io: use main_loop_wait 2012-04-19 16:29:33 +02:00
qemu-lock.h
qemu-log.h
qemu-nbd.c nbd: do not include block_int.h 2012-04-19 17:19:37 +02:00
qemu-nbd.texi Replace Qemu by QEMU in user visible documentation 2012-04-07 13:58:06 +00:00
qemu-objects.h
qemu-option.c qemu-option: Add support for merged QemuOptsLists 2012-02-17 09:08:22 +01:00
qemu-option.h qemu-option: Add support for merged QemuOptsLists 2012-02-17 09:08:22 +01:00
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx Replace Qemu by QEMU in user visible documentation 2012-04-07 13:58:06 +00:00
qemu-os-posix.h
qemu-os-win32.h w64: Fix definition of setjmp 2012-04-15 21:25:16 +02:00
qemu-progress.c
qemu-queue.h Replace Qemu by QEMU in comments 2012-04-07 14:00:45 +00:00
qemu-sockets.c sockets: Clean up inet_listen_opts()'s convoluted bind() loop 2012-02-24 09:06:58 -06:00
qemu-tech.texi
qemu-thread-posix.c
qemu-thread-posix.h
qemu-thread-win32.c w32: Initialise critical section before starting thread (fix #922131) 2012-02-07 18:11:41 +01:00
qemu-thread-win32.h
qemu-thread.h
qemu-timer-common.c
qemu-timer.c main_loop_wait: block indefinitely 2012-04-26 13:14:58 -05:00
qemu-timer.h main_loop_wait: block indefinitely 2012-04-26 13:14:58 -05:00
qemu-tls.h
qemu-tool.c main_loop_wait: block indefinitely 2012-04-26 13:14:58 -05:00
qemu-user.c qom: Add QOM support to user emulators 2012-03-13 13:23:18 -05:00
qemu-x509.h
qemu-xattr.h
qemu.sasl
qemu_socket.h w32: Move defines for socket specific errors to qemu-os-win32.h 2012-04-15 21:25:16 +02:00
qerror.c qdev: add blocksize property type 2012-04-05 14:54:40 +02:00
qerror.h qdev: add blocksize property type 2012-04-05 14:54:40 +02:00
qfloat.c
qfloat.h
qint.c
qint.h
qjson.c
qjson.h qjson.h: include compiler.h for GCC_FMT_ATTR 2012-03-09 17:34:17 -03:00
qlist.c
qlist.h
qmp-commands.hx block: add 'speed' optional parameter to block-stream 2012-04-27 11:44:50 -03:00
qmp.c suspend: add system_wakeup monitor command 2012-02-24 13:36:03 -06:00
qobject.h
qstring.c
qstring.h
qtest.c qtest: Fix tv_usec != long 2012-04-24 09:50:31 -05:00
qtest.h qtest: add dummy functions for user emulators 2012-04-19 18:52:35 +00:00
range.h
readline.c
readline.h
rules.mak Beautify makefile commands for generation of files with tracetool 2012-04-25 14:21:35 +01:00
s390-dis.c
s390.ld
savevm.c w64: Fix time conversion for some versions of MinGW-w64 2012-04-15 21:25:18 +02:00
sh4-dis.c
softmmu-semi.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
softmmu_defs.h softmmu templates: optionally pass CPUState to memory access functions 2012-03-18 12:21:52 +00:00
softmmu_exec.h
softmmu_header.h w64: Fix data types in softmmu*.h 2012-04-15 21:25:17 +02:00
softmmu_template.h w64: Fix data types in softmmu*.h 2012-04-15 21:25:17 +02:00
sparc-dis.c
sparc.ld
sparc64.ld
spice-qemu-char.c spice-qemu-char.c: Show what name is unsupported 2012-04-20 13:14:53 +01:00
sysemu.h qapi: Convert migrate 2012-03-15 10:39:52 -03:00
targphys.h
tcg-runtime.c
tci-dis.c
tci.c tci: GETPC() macro must return an uintptr_t 2012-04-21 13:28:28 +00:00
thunk.c linux-user: add struct old_dev_t compat 2012-04-06 18:49:58 +03:00
thunk.h linux-user: add struct old_dev_t compat 2012-04-06 18:49:58 +03:00
trace-events Merge remote-tracking branch 'spice/spice.v52' into staging 2012-04-18 07:56:18 -05:00
translate-all.c w64: Fix data type of tb_next and other variables used for host addresses 2012-04-07 11:27:45 +00:00
uboot_image.h
user-exec.c Use uintptr_t for various op related functions 2012-04-14 14:23:37 +00:00
version.rc
vgafont.h
vl.c Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm 2012-03-31 12:10:07 +00:00
vmstate.h Purge migration of (almost) everything to do with monitors 2012-03-15 10:39:52 -03:00
x86_64.ld
xen-all.c xen: add a dummy xc_hvm_inject_msi for Xen < 4.2 2012-04-17 18:04:42 +00:00
xen-mapcache.c xen-mapcache: don't unmap locked entry during mapcache invalidation 2012-04-13 17:35:06 +00:00
xen-mapcache.h xen mapcache: check if memory region has moved. 2012-03-19 18:21:12 +00:00
xen-stub.c Xen: basic HVM MSI injection support. 2012-04-13 17:34:08 +00:00
xtensa-semi.c target-xtensa: Move helpers.h to helper.h 2012-04-14 03:48:08 +04:00

README

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

- QEMU team