adding Irix (and, to a lesser extent, Solaris) userland emulation to QEMU
Go to file
David Gibson 92e4b519e0 kvm: Comparison with ioctl number macros needs to be unsigned
In kvm-all.c we store an ioctl cmd number in the irqchip_inject_ioctl field
of KVMState, which has type 'int'.  This seems to make sense since the
ioctl() man page says that the cmd parameter has type int.

However, the kernel treats ioctl numbers as unsigned - sys_ioctl() takes an
unsigned int, and the macros which generate ioctl numbers expand to
unsigned expressions.  Furthermore, some ioctls (IOC_READ ioctls on x86
and IOC_WRITE ioctls on powerpc) have bit 31 set, and so would be negative
if interpreted as an int. This has the surprising and compile-breaking
consequence that in kvm_irqchip_set_irq() where we do:
    return (s->irqchip_inject_ioctl == KVM_IRQ_LINE) ? 1 : event.status;
We will get a "comparison is always false due to limited range of data
type" warning from gcc if KVM_IRQ_LINE is one of the bit-31-set ioctls,
which it is on powerpc.

So, despite the fact that the man page and posix say ioctl numbers are
signed, they're actually unsigned.  The kernel uses unsigned, the glibc
header uses unsigned long, and FreeBSD, NetBSD and OSX also use unsigned
long ioctl numbers in the code.

Therefore, this patch changes the variable to be unsigned, fixing the
compile.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
2012-03-15 13:12:12 +01:00
QMP qmp: add DEVICE_TRAY_MOVED event 2012-02-22 17:23:50 -02:00
audio audio: Add some fall through comments 2012-02-25 18:16:11 +04:00
block qcow2: Reduce number of I/O requests 2012-03-12 15:14:07 +01:00
bsd-user Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
darwin-user Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
default-configs Merge remote-tracking branch 'bonzini/virtio-scsi' into staging 2012-02-24 09:33:03 -06:00
docs docs: correct ./configure line in tracing.txt 2012-03-12 10:12:34 +00:00
fpu
fsdev fsdev: Fix parameter parsing for proxy helper 2012-01-30 10:54:16 +05:30
gdb-xml
hw pseries: Add support for level interrupts to XICS 2012-03-15 13:12:12 +01:00
include/qemu qom: Introduce CPU class 2012-03-14 22:20:27 +01:00
libcacard Merge remote-tracking branch 'stefanha/trivial-patches' into staging 2012-03-09 12:30:20 -06:00
linux-headers PPC: KVM: Update HIOR code to new interface 2012-02-02 02:47:45 +01:00
linux-user Bad zero comparison for sas_ss_flags on powerpc 2012-03-15 13:12:10 +01:00
net net: remove extra spaces in help messages 2012-02-10 10:44:52 +00:00
pc-bios pseries: Update SLOF firmware image 2012-03-15 13:12:11 +01:00
qapi qapi: add string-based visitors 2012-02-21 10:21:05 +01:00
qga qemu-ga: add guest-sync-delimited 2012-03-12 15:09:23 -05:00
qom qom: Introduce CPU class 2012-03-14 22:20:27 +01:00
roms pseries: Update SLOF firmware image 2012-03-15 13:12:11 +01:00
scripts Merge remote-tracking branch 'kwolf/for-anthony' into staging 2012-03-12 20:51:42 -05:00
slirp slirp: Fix compiler warning for w64 2012-03-13 16:15:19 +01:00
sysconfigs/target add Opteron_G4 CPU model (v2) 2012-03-12 14:05:25 -05:00
target-alpha Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-arm Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-cris Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-i386 Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-lm32 target-lm32/microblaze: Drop second CPU{LM32, MB}State typedef 2012-03-14 19:48:37 -05:00
target-m68k Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-microblaze target-lm32/microblaze: Drop second CPU{LM32, MB}State typedef 2012-03-14 19:48:37 -05:00
target-mips Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-ppc ppc: Correctly define POWERPC_INSNS2_DEFAULT 2012-03-15 13:12:12 +01:00
target-s390x Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-sh4 Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-sparc Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-unicore32 Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
target-xtensa Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
tcg Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
tests Add 'make check-block' 2012-03-12 15:14:07 +01:00
trace trace: make trace_thread_create() use its function arg 2012-03-12 10:12:34 +00:00
ui vnc: Limit r/w access to size of allocated memory 2012-03-14 16:22:46 -05:00
.gitignore Merge remote-tracking branch 'qemu-kvm/uq/master' into staging 2012-03-01 15:26:01 -06:00
.gitmodules
.mailmap
CODING_STYLE CODING_STYLE: Clarify style for enum and function type names 2012-02-10 10:44:51 +00:00
COPYING
COPYING.LIB
Changelog
HACKING
LICENSE
MAINTAINERS maintainers: Add docs/tracing.txt to Tracing 2012-03-12 10:27:53 +00:00
Makefile qom: Add QOM support to user emulators 2012-03-13 13:23:18 -05:00
Makefile.dis
Makefile.hw make: Remove duplicate use of GLIB_CFLAGS 2012-02-09 20:44:38 +04:00
Makefile.objs qom: Introduce CPU class 2012-03-14 22:20:27 +01:00
Makefile.target Merge remote-tracking branch 'kraxel/usb.44' into staging 2012-03-13 13:55:02 -05: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
alpha-dis.c
alpha.ld
arch_init.c pcspk: Convert to qdev 2012-02-17 09:58:22 -06: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
balloon.c
balloon.h
bitmap.c
bitmap.h
bitops.c
bitops.h
block-migration.c
block-migration.h
block.c block: handle -EBUSY in bdrv_commit_all() 2012-03-12 15:14:06 +01:00
block.h block: handle -EBUSY in bdrv_commit_all() 2012-03-12 15:14:06 +01:00
block_int.h qapi: Introduce blockdev-group-snapshot-sync command 2012-02-29 15:48:33 +01:00
blockdev.c qmp: convert blockdev-snapshot-sync to a wrapper around transactions 2012-03-12 15:14:07 +01: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
check-qdict.c
check-qfloat.c
check-qint.c
check-qjson.c
check-qlist.c
check-qstring.c
cmd.c
cmd.h
compatfd.c
compatfd.h
compiler.h rewrite QEMU_BUILD_BUG_ON 2012-02-09 16:17:51 +01:00
config.h
configure qom: Introduce CPU class 2012-03-14 22:20:27 +01: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-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 Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
cpu-common.h w64: Fix size of ram_addr_t 2012-03-03 18:10:16 +00:00
cpu-defs.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
cpu-exec.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
cpus.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
cpus.h
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 Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
device_tree.c
device_tree.h
dis-asm.h
disas.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
disas.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
dma-helpers.c dma-helpers: add accounting wrappers 2012-02-22 13:29:07 +01:00
dma.h dma-helpers: add accounting wrappers 2012-02-22 13:29:07 +01:00
dyngen-exec.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
elf.h
envlist.c
envlist.h
error.c
error.h
error_int.h
event_notifier.c
event_notifier.h
exec-all.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01: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 Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
gdbstub.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01: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 qmp: convert blockdev-snapshot-sync to a wrapper around transactions 2012-03-12 15:14:07 +01:00
hmp.c qmp: convert blockdev-snapshot-sync to a wrapper around transactions 2012-03-12 15:14:07 +01:00
hmp.h suspend: add system_wakeup monitor command 2012-02-24 13:36:03 -06: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: add destructor method to IORange 2012-03-05 17:36:19 +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: Comparison with ioctl number macros needs to be unsigned 2012-03-15 13:12:12 +01:00
kvm-stub.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
kvm.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
libfdt_env.h
linux-aio.c
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: For tools, initialize timers as part of qemu_init_main_loop() 2012-02-01 14:45:02 -06:00
main-loop.h main-loop: For tools, initialize timers as part of qemu_init_main_loop() 2012-02-01 14:45:02 -06:00
memory.c memory: get rid of cpu_register_io_memory() 2012-03-08 19:16:39 +02: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
migration-tcp.c
migration-unix.c
migration.c notifier: switch to QLIST 2012-02-17 08:33:32 -06:00
migration.h
mips-dis.c
mips.ld
module.c
module.h qom: Unify type registration 2012-02-15 09:39:21 -06:00
monitor.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
monitor.h suspend: add qmp events 2012-02-24 13:36:04 -06:00
nbd.c
nbd.h
net.c w32: Fix build with new net bridge code 2012-02-04 11:49:34 +00:00
net.h Add support for net bridge 2012-02-01 16:24:40 -06: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 keep the PID file locked for the lifetime of the process 2012-02-01 16:23:57 -06:00
os-win32.c
osdep.c
osdep.h osdep: Remove local definition of macro offsetof 2012-03-08 15:22:12 +00:00
oslib-posix.c
oslib-win32.c
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
ppc-dis.c
ppc.ld
ppc64.ld
qapi-schema-guest.json qemu-ga: add guest-sync-delimited 2012-03-12 15:09:23 -05:00
qapi-schema-test.json qapi: complete implementation of unions 2012-03-12 15:14:07 +01:00
qapi-schema.json Merge remote-tracking branch 'kwolf/for-anthony' into staging 2012-03-12 20:51:42 -05:00
qbool.c
qbool.h
qdict-test-data.txt
qdict.c
qdict.h
qemu-aio.h
qemu-barrier.h
qemu-bridge-helper.c Add cap reduction support to enable use as SUID 2012-02-01 16:24:39 -06:00
qemu-char.c qemu-char: qemu_chr_open_fd() can't fail, don't check 2012-02-24 09:06:57 -06:00
qemu-char.h qdev: nuke qdev_init_chardev() 2012-02-03 10:41:08 -06:00
qemu-common.h w64: Don't redefine lseek, ftruncate 2012-03-11 11:27:30 +00: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 coroutine: add co_sleep_ns() coroutine sleep function 2012-01-26 11:45:26 +01:00
qemu-coroutine.c
qemu-coroutine.h coroutine: add co_sleep_ns() coroutine sleep function 2012-01-26 11:45:26 +01:00
qemu-doc.texi iSCSI: add configuration variables for iSCSI 2012-02-09 16:17:50 +01: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: add guest-sync-delimited 2012-03-12 15:09:23 -05:00
qemu-img-cmds.hx
qemu-img.c qcow2: Add error messages in qcow2_truncate 2012-03-12 15:14:06 +01:00
qemu-img.texi
qemu-io.c qemu-io: fix segment fault when the image format is qed 2012-02-29 16:05:00 +01:00
qemu-lock.h
qemu-log.h
qemu-nbd.c open /dev/nbd in nbd_client_thread 2012-02-17 12:41:59 +01:00
qemu-nbd.texi
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 qemu-options.hx: allow -dtb argument for all archs 2012-03-05 23:00:15 +01:00
qemu-os-posix.h
qemu-os-win32.h
qemu-progress.c
qemu-queue.h qemu-queue: drop QCIRCLEQ 2012-02-17 08:33:33 -06: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 notifier: switch to QLIST 2012-02-17 08:33:32 -06:00
qemu-timer.h
qemu-tls.h
qemu-tool.c qemu-tool: revert cpu_get_clock() abort(3) 2012-02-29 15:48:44 +01: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
qerror.c qdev: print error message before aborting 2012-02-14 18:57:33 +00:00
qerror.h qdev: print error message before aborting 2012-02-14 18:57:33 +00: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 qmp: convert blockdev-snapshot-sync to a wrapper around transactions 2012-03-12 15:14:07 +01:00
qmp.c suspend: add system_wakeup monitor command 2012-02-24 13:36:03 -06:00
qobject.h
qstring.c
qstring.h
range.h
readline.c
readline.h
rules.mak
s390-dis.c
s390.ld
savevm.c
sh4-dis.c
softmmu-semi.h Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
softmmu_defs.h
softmmu_exec.h
softmmu_header.h
softmmu_template.h memory: dispatch directly via MemoryRegion 2012-03-08 19:06:11 +02:00
sparc-dis.c
sparc.ld
sparc64.ld
spice-qemu-char.c Revert "qemu-char: Print strerror message on failure" and deps 2012-02-24 09:06:56 -06:00
sysemu.h suspend: make acpi timer wakeup the guest. 2012-02-24 13:36:04 -06:00
targphys.h
tcg-runtime.c
tci-dis.c
tci.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
test-coroutine.c test-coroutine: add performance test for nesting 2012-03-12 15:14:08 +01:00
test-qmp-commands.c
test-qmp-input-visitor.c qapi: complete implementation of unions 2012-03-12 15:14:07 +01:00
test-qmp-output-visitor.c qapi: complete implementation of unions 2012-03-12 15:14:07 +01:00
test-string-input-visitor.c qapi: add tests for string-based visitors 2012-02-21 10:21:05 +01:00
test-string-output-visitor.c qapi: add tests for string-based visitors 2012-02-21 10:21:05 +01:00
thunk.c
thunk.h Remove macro HOST_LONG_SIZE 2012-02-28 22:33:41 +01:00
trace-events uhci: tracing support 2012-03-13 10:15:32 +01:00
translate-all.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
uboot_image.h
user-exec.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
version.rc
vgafont.h
vl.c qom: Register QOM infrastructure early 2012-03-13 13:23:17 -05:00
vmstate.h
x86_64.ld
xen-all.c Rename CPUState -> CPUArchState 2012-03-14 22:20:27 +01:00
xen-mapcache.c
xen-mapcache.h
xen-stub.c
xtensa-semi.c xtensa-semi: Don't use CPUState 2012-03-14 22:20:26 +01:00

README

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

- QEMU team