adding Irix (and, to a lesser extent, Solaris) userland emulation to QEMU
Go to file
Stefan Hajnoczi da888d37b0 block/raw-posix: detect readonly Linux block devices using BLKROGET
Linux block devices can be set read-only with "blockdev --setro
<device>".  The same thing can be done for LVM volumes using "lvchange
--permission r <volume>".  This read-only setting is independent of
device node permissions.  Therefore the device can still be opened
O_RDWR but actual writes will fail.

This results in odd behavior for QEMU.  bdrv_open() is supposed to fail
if a read-only image is being opened with BDRV_O_RDWR.  By not failing
for Linux block devices, the guest boots up but every write produces an
I/O error.

This patch checks whether the block device is read-only so that Linux
block devices behave like regular files.

Reported-by: Sibiao Luo <sluo@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-02-12 12:22:49 +01:00
QMP
audio audio: Replace non-portable asprintf in debug code by g_strdup_printf 2013-01-16 12:03:26 -06:00
backends Make all static TypeInfos const 2013-01-10 15:11:53 -06:00
block block/raw-posix: detect readonly Linux block devices using BLKROGET 2013-02-12 12:22:49 +01:00
bsd-user linux-user: bsd-user: Don't reset X86CPU twice 2013-02-01 01:35:43 +01:00
default-configs Add TEWS TPCI200 IndustryPack emulation 2013-01-14 13:26:12 -06:00
disas build: remove universal-obj-y 2013-01-26 13:15:35 +00:00
docs trace: Fix location of simpletrace.py in docs 2013-02-05 21:52:55 +01:00
fpu softfloat: Handle float_muladd_negate_c when product is zero 2013-01-26 13:22:09 +00:00
fsdev virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup() 2013-01-30 11:14:46 +01:00
gdb-xml
hw error: Strip trailing '\n' from error string arguments (again) 2013-02-11 08:13:19 -06:00
include bswap: Fix width of swap in leul_to_cpu 2013-02-06 08:29:21 -06:00
ldscripts
libcacard libcacard: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
linux-headers Update Linux kernel headers 2013-01-18 19:06:57 +01:00
linux-user Merge branch 'for-linux-user' of https://git.gitorious.org/qemu-m68k/qemu-m68k into staging 2013-02-06 16:39:04 -06:00
net net: fix infinite loop on exit 2013-02-07 13:13:39 -06:00
pc-bios Update OpenBIOS images 2013-02-09 13:39:45 +00:00
pixman@97336fad32
qapi qapi: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
qga qemu-ga: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
qobject build: move qobject files to qobject/ and libqemuutil.a 2013-01-12 18:42:50 +01:00
qom qom: remove object_delete 2013-02-01 15:53:11 -06:00
roms Update OpenBIOS images 2013-02-09 13:39:45 +00:00
scripts Merge remote-tracking branch 'qemu-kvm/uq/master' into staging 2013-01-29 16:57:41 -06:00
slirp g_strdup(NULL) returns NULL; simplify 2013-01-30 11:14:46 +01:00
stubs stubs: fully replace qemu-tool.c and qemu-user.c 2013-01-12 17:19:08 +01:00
sysconfigs/target
target-alpha target-alpha: Catch attempt to instantiate abstract type in cpu_init() 2013-01-27 23:33:34 +01:00
target-arm target-arm: Rename CPU types 2013-01-30 16:03:57 +00:00
target-cris target-cris: Build fix for debug output 2013-02-04 16:12:57 +01:00
target-i386 error: Strip trailing '\n' from error string arguments (again) 2013-02-11 08:13:19 -06:00
target-lm32 cpu: Move cpu_index field to CPUState 2013-01-15 04:09:13 +01:00
target-m68k target-m68k: Fix comment 2013-02-06 15:52:07 +01:00
target-microblaze target-microblaze: Mark as unmigratable 2013-02-01 01:35:21 +01:00
target-mips target-mips: enable access to DSP ASE if implemented 2013-01-31 23:42:03 +01:00
target-openrisc target-openrisc: Rename CPU subtypes 2013-02-01 01:35:43 +01:00
target-ppc error: Strip trailing '\n' from error string arguments (again) 2013-02-11 08:13:19 -06:00
target-s390x target-s390x: Fix wrong comparison in interrupt handling 2013-02-04 15:24:15 -06:00
target-sh4 target-sh4: Mark as unmigratable 2013-02-01 01:35:22 +01:00
target-sparc cpu: do not use object_delete 2013-02-01 15:53:11 -06:00
target-unicore32 target-unicore32: Rename CPU subtypes 2013-02-01 01:35:43 +01:00
target-xtensa target-xtensa: Mark as unmigratable 2013-02-01 01:35:21 +01:00
tcg tcg/target-arm: Add missing parens to assertions 2013-01-19 10:27:45 +00:00
tests libi2c-omap: Fix endianness dependency 2013-02-11 13:22:48 -06:00
trace trace: Clean up the "try to update atomic until it worked" loops 2013-02-05 21:52:55 +01:00
ui error: Strip trailing '\n' from error string arguments (again) 2013-02-11 08:13:19 -06:00
util qemu-option: Disable two helpful messages that got broken recently 2013-02-11 08:13:19 -06:00
.exrc
.gitignore Add libcacard/trace/generated-tracers.c to .gitignore 2013-01-15 10:34:54 +01:00
.gitmodules
.mailmap
CODING_STYLE
COPYING
COPYING.LIB
Changelog
HACKING
LICENSE
MAINTAINERS prep: Move PReP machine to hw/ppc/ 2013-01-30 10:42:29 +01:00
Makefile build: remove *.lo, *.a, *.la files from all subdirectories on make clean 2013-01-26 13:30:00 +00:00
Makefile.objs Move XBZRLE encoding code to a separate file to allow testing 2013-02-01 08:32:20 +01:00
Makefile.target build: remove universal-obj-y 2013-01-26 13:15:35 +00:00
README
TODO
VERSION Update version for release 2013-02-06 18:33:47 -06:00
aio-posix.c aio: Fix return value of aio_poll() 2013-01-17 10:51:42 +01:00
aio-win32.c aio: Fix return value of aio_poll() 2013-01-17 10:51:42 +01:00
arch_init.c Allow XBZRLE decoding without enabling the capability 2013-02-01 08:32:21 +01:00
async.c
balloon.c
block-migration.c block-migration: fix block_save_iterate() return value 2013-02-11 08:14:05 -06:00
block.c block: Fix is_allocated_above with resized files 2013-02-01 14:58:28 +01:00
blockdev-nbd.c
blockdev.c Merge remote-tracking branch 'kwolf/for-anthony' into staging 2013-01-28 14:46:45 -06:00
blockjob.c
bt-host.c
bt-vhci.c
cmd.c
cmd.h
configure configure: Fix build with XFree 2013-02-06 08:29:21 -06:00
coroutine-gthread.c
coroutine-sigaltstack.c
coroutine-ucontext.c gcc: rename CONFIG_PRAGMA_DISABLE_UNUSED_BUT_SET to CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE 2013-01-12 12:42:53 +00:00
coroutine-win32.c
cpu-exec.c
cpus.c kvm: Pass CPUState to kvm_on_sigbus_vcpu() 2013-01-28 16:57:56 +01:00
cputlb.c
device_tree.c
disas.c
dma-helpers.c
dump-stub.c
dump.c
exec.c Replace non-portable asprintf by g_strdup_printf 2013-01-19 10:24:43 +00:00
gdbstub.c cpu: Move cpu_index field to CPUState 2013-01-15 04:09:13 +01:00
hmp-commands.hx hmp: Disable chardev-add and chardev-remove 2013-02-06 16:35:43 -06:00
hmp.c error: Strip trailing '\n' from error string arguments (again) 2013-02-11 08:13:19 -06:00
hmp.h qemu-char: Saner naming of memchar stuff & doc fixes 2013-02-06 16:35:19 -06:00
iohandler.c
ioport.c
kvm-all.c kvm: Pass CPUState to kvm_on_sigbus_vcpu() 2013-01-28 16:57:56 +01:00
kvm-stub.c kvm: Pass CPUState to kvm_on_sigbus_vcpu() 2013-01-28 16:57:56 +01:00
main-loop.c Check return values from g_poll and select 2013-01-09 11:03:05 -06:00
memory.c bitops: unify bitops_ffsl with the one in host-utils.h, call it bitops_ctzl 2013-02-02 20:16:00 +00:00
memory_mapping-stub.c
memory_mapping.c
migration-exec.c
migration-fd.c
migration-tcp.c
migration-unix.c
migration.c migration: restrict scope of incoming fd read handler 2013-02-11 13:22:52 -06:00
monitor.c HMP: add sub command table to info 2013-01-17 10:24:52 -02:00
nbd.c
os-posix.c
os-win32.c
page_cache.c
qapi-schema-test.json
qapi-schema.json qapi: Improve chardev-add documentation 2013-02-11 13:22:52 -06:00
qdict-test-data.txt
qemu-bridge-helper.c
qemu-char.c error: Strip trailing '\n' from error string arguments (again) 2013-02-11 08:13:19 -06:00
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c
qemu-coroutine.c
qemu-doc.texi
qemu-img-cmds.hx
qemu-img.c
qemu-img.texi
qemu-io.c
qemu-log.c qemu-log: Plug trivial memory leak in cpu_set_log_filename() 2013-01-30 11:14:46 +01:00
qemu-nbd.c
qemu-nbd.texi qemu-nbd: document --cache and --aio options 2013-02-08 11:14:19 -06:00
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx qemu-char: Saner naming of memchar stuff & doc fixes 2013-02-06 16:35:19 -06:00
qemu-seccomp.c
qemu-tech.texi
qemu-timer.c
qemu.sasl
qmp-commands.hx qemu-char: Saner naming of memchar stuff & doc fixes 2013-02-06 16:35:19 -06:00
qmp.c
qtest.c qtest: Use strtoull() for uint64_t 2013-02-11 13:22:39 -06:00
readline.c readline: Fix unchecked strdup() by converting to g_strdup() 2013-01-30 11:14:46 +01:00
rules.mak rules/mak: make clean should blow away timestamp files 2013-01-30 01:31:08 +02:00
savevm.c migration: restrict scope of incoming fd read handler 2013-02-11 13:22:52 -06:00
spice-qemu-char.c
tcg-runtime.c
tci.c
thread-pool.c
thunk.c
trace-events s390: Add new channel I/O based virtio transport. 2013-01-29 21:50:04 +01:00
translate-all.c
translate-all.h
user-exec.c
version.rc
vl.c vl: Exit unsuccessfully on option argument syntax error 2013-02-11 08:13:19 -06:00
xbzrle.c Move XBZRLE encoding code to a separate file to allow testing 2013-02-01 08:32:20 +01:00
xen-all.c xen: Simplify halting of first CPU 2013-01-15 04:09:14 +01:00
xen-mapcache.c
xen-stub.c

README

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

- QEMU team