aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-04-18error: Convert qemu_opts_create() to QErrorMarkus Armbruster1-2/+2
Fixes device_add to report duplicate ID properly in QMP, as DuplicateId instead of UndefinedError. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: New QERR_DUPLICATE_IDMarkus Armbruster2-0/+7
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: Put error definitions back in alphabetical orderMarkus Armbruster2-7/+13
Add suitable comments to help keerp them in order. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18monitor: convert do_device_del() to QObject, QErrorMarkus Armbruster3-6/+7
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18qdev: Convert qdev_unplug() to QErrorMarkus Armbruster1-2/+1
Note: our device unplug methods don't need conversion work, because they can't currently fail. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18Add qerror message if the 'change' target filename can't be openedRyan Harper1-0/+1
Currently when using the change command to switch the file in the cd drive the command doesn't complain if the file doesn't exit or can't be opened and the drive keeps the existing image. This patch adds a qerror_report call to print a message out indicating the failure. This error message can be used to catch failures. Current behavior: QEMU 0.12.50 monitor - type 'help' for more information (qemu) info block ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) change ide1-cd0 /home/rharper/work/isos/Fedora-9-i386-DVD.iso (qemu) info block ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 file=/home/rharper/work/isos/Fedora-9-i386-DVD.iso ro=0 drv=raw encrypted=0 floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) change ide1-cd0 /tmp/non_existent_file.iso (qemu) info block ide0-hd0: type=hd removable=0 file=/dev/null ro=0 drv=host_device encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] floppy0: type=floppy removable=1 locked=0 [not inserted] sd0: type=floppy removable=1 locked=0 [not inserted] (qemu) With patch: QEMU 0.12.50 monitor - type 'help' for more information (qemu) change ide1-cd0 /tmp/non_existent_file.iso Could not open '/tmp/non_existent_file.iso' (qemu) Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-18slirp: fix unused return value, spotted by clangBlue Swirl1-1/+2
Fix clang errors like: CC slirp/cksum.o /src/qemu/slirp/cksum.c:78:3: error: expression result unused [-Wunused-value] REDUCE; /src/qemu/slirp/cksum.c:45:66: note: instantiated from: Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18i386-dis: Fix unused return value, spotted by clangBlue Swirl1-24/+32
Fix clang erros like: CC libdis/i386-dis.o /src/qemu/i386-dis.c:3323:7: error: expression result unused [-Wunused-value] FETCH_DATA (the_info, codep + 1); /src/qemu/i386-dis.c:285:6: note: instantiated from: ? 1 : fetch_data ((info), (addr))) Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18PPC: avoid function pointer type mismatch, spotted by clangBlue Swirl1-5/+3
Fixes clang errors: CC ppc-softmmu/translate.o /src/qemu/target-ppc/translate.c:3748:13: error: comparison of distinct pointer types ('void (*)(void *, int, int)' and 'void *') if (likely(read_cb != SPR_NOACCESS)) { /src/qemu/target-ppc/translate.c:3748:28: note: instantiated from: if (likely(read_cb != SPR_NOACCESS)) { /src/qemu/target-ppc/translate.c:3903:13: error: comparison of distinct pointer types ('void (*)(void *, int, int)' and 'void *') if (likely(write_cb != SPR_NOACCESS)) { /src/qemu/target-ppc/translate.c:3903:29: note: instantiated from: if (likely(write_cb != SPR_NOACCESS)) { Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18kvm: avoid collision with dprintf macro in stdio.h, spotted by clangBlue Swirl2-25/+25
Fixes clang errors: CC i386-softmmu/kvm.o /src/qemu/target-i386/kvm.c:40:9: error: 'dprintf' macro redefined In file included from /src/qemu/target-i386/kvm.c:21: In file included from /src/qemu/qemu-common.h:27: In file included from /usr/include/stdio.h:910: /usr/include/bits/stdio2.h:189:12: note: previous definition is here CC i386-softmmu/kvm-all.o /src/qemu/kvm-all.c:39:9: error: 'dprintf' macro redefined In file included from /src/qemu/kvm-all.c:23: In file included from /src/qemu/qemu-common.h:27: In file included from /usr/include/stdio.h:910: /usr/include/bits/stdio2.h:189:12: note: previous definition is here Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18Fix harmless if statements with empty body, spotted by clangBlue Swirl2-5/+8
These clang errors are harmless but worth fixing: CC ppc-softmmu/usb-ohci.o /src/qemu/hw/usb-ohci.c:1104:59: error: if statement has empty body [-Wempty-body] ohci->ctrl_head, ohci->ctrl_cur); /src/qemu/hw/usb-ohci.c:1371:57: error: if statement has empty body [-Wempty-body] DPRINTF("usb-ohci: port %d: SUSPEND\n", portnum); CC sparc64-softmmu/translate.o /src/qemu/target-sparc/translate.c:3173:37: error: if statement has empty body [-Wempty-body] ; // XXX Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18sparc32 use empty_slot for missing RAM v1Artyom Tarasenko3-0/+7
use empty_slot device for the RAM which is not installed Models without ECC don't trap when missing ram is accessed. v0->v1 compile only once and fix indentation Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18create empty_slot deviceArtyom Tarasenko2-0/+94
The empty_slot device emulates known to a bus but not connected devices. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18Fix harmless if statements with empty body, spotted by clangBlue Swirl2-2/+5
These clang errors are harmless but worth fixing: CC libhw64/fdc.o /src/qemu/hw/fdc.c:998:74: error: if statement has empty body [-Wempty-body] FLOPPY_DPRINTF("Floppy digital input register: 0x%02x\n", retval); CC libhw64/cuda.o /src/qemu/hw/cuda.c:320:66: error: if statement has empty body [-Wempty-body] CUDA_DPRINTF("read: reg=0x%x val=%02x\n", (int)addr, val); Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-18tcg/ppc: Remove redundant comparison from brcond2malc1-2/+1
Signed-off-by: malc <av1474@comtv.ru>
2010-04-17Fix --enable-profiler compilation.Richard Henderson3-12/+12
There's a header file inclusion ordering problem between cpu-all.h and qemu-timer.h, such that cpu_get_real_ticks is not defined when we attempt to use it in profile_getclock. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-17target-sparc: Free instruction temporaries.Richard Henderson1-25/+27
Rather than creating new temporaries for constants, use the ones created in disas_sparc_insn. Remember the temps created there so that they can be freed at the end of the function. Profile data collected by TCG while booting sparc-test kernel: -avg temps/TB 70.61 max=421 +avg temps/TB 62.75 max=66 Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-17target-sparc: Fix TARGET_{PHYS,VIRT}_ADDR_SPACE_BITS.Richard Henderson1-6/+6
The 32 and 64-bit definitions were swapped in the ifdef. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-17Sparc: fix PC/NPC during FPU trapsBlue Swirl1-0/+2
All FPU instructions can trap, so save PC/NPC state before executing them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-17tcg: Add missing static qualifiermalc1-1/+1
Build breaks otherwise when USE_LIVENESS_ANALYSIS is not defined. Signed-off-by: malc <av1474@comtv.ru>
2010-04-17tcg/ppc: Fix signed versions of brcond2malc1-1/+2
Thanks to: Alexander Graff, Thomas Gleixner and Andreas Faerber. Signed-off-by: malc <av1474@comtv.ru>
2010-04-17Fix format stringsArnaud Lacombe1-2/+2
This fix the following build failure: CC libdis-user/microblaze-dis.o cc1: warnings being treated as errors microblaze-dis.c: In function 'print_insn_microblaze': microblaze-dis.c:829: warning: format '%04x' expects type 'unsigned int', but argument 4 has type 'long unsigned int' microblaze-dis.c:962: warning: format '%04x' expects type 'unsigned int', but argument 4 has type 'long unsigned int' Reported-at: http://www.monstr.eu/wiki/doku.php?id=log:2010-04-13_12_10_00 Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-04-13Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori3-340/+213
2010-04-14sparc: Fix compiler warning (fprintf format string)Stefan Weil1-1/+1
When argument checking is enabled, gcc throws this error: error: format not a string literal and no format arguments The patch rewrites the statement to satisfy the compiler. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-14sh4: Fix compiler warning (fprintf format string)Stefan Weil1-2/+2
When argument checking is enabled, gcc throws this error: error: format not a string literal and no format arguments The patch rewrites the statement to satisfy the compiler. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-14m68k: Fix compiler warning (fprintf format string)Stefan Weil1-3/+3
When argument checking is enabled, gcc throws this error: error: format not a string literal and no format arguments The patch rewrites the statement to satisfy the compiler. It also removes a type cast which is not needed. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-14arm: Fix compiler warning (fprintf format string)Stefan Weil1-4/+4
When argument checking is enabled, gcc throws this error: error: format not a string literal and no format arguments The patch rewrites the statement to satisfy the compiler. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-14tcp/mips: Change TCG_AREG0 (fp -> s0)Stefan Weil3-4/+5
Register fp (frame pointer) is a bad choice for compilations without optimisation, because the compiler makes heavy use of this register (so the resulting code crashes). Register s0 had been used for TCG_AREG1 in earlier releases, but was no longer used and is now free for TCG_AREG0. The resulting code works for compilations without optimisation (tested with qemu mips in qemu mips on x86 host). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-14Use correct cflags for kvm-kmod when cross compilingStefan Weil1-1/+1
Using $pkgconfig instead of pkg-config will use ${cross_prefix}pkg-config if that is available. This fix is needed for cross compilations without modified PATH. Without the fix, PATH must be modified to find the cross pkg-config before the native pkg-config. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-14linux-user: do_shmdt(): Fix page_set_flags's 2nd arg.takasi-y@ops.dti.ne.jp1-1/+1
2nd arg of page_set_flags() should be start+size, but size. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-14vhost.c: include <linux/vhost.h> lastMarcelo Tosatti1-1/+1
So the userspace headers define KERNEL_STRICT_NAMES and there's no conflict on type definition for older kernels. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-13vhost-net: disable mergeable buffersMichael S. Tsirkin1-0/+1
vhost in current kernels doesn't support mergeable buffers. Disable this feature if vhost is enabled, until such support is implemented. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-13vhost: fix features ackDavid L Stevens1-0/+8
vhost driver in qemu didn't ack features, and this happens to work because we don't really require any features. However, it's better not to rely on this. This patch passes features to vhost as guest acks them. Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-13sh_pci: fix memory and I/O accessAurelien Jarno3-96/+17
Since commit 8da3ff180974732fc4272cb4433fef85c1822961 ("MMIO callback interface changes"), the addresses passed to the I/O functions are an offset to the start of the area. As a consequence, there is no need to correct the address using the value of IOBR. This make possible the use of the default MMIO functions. Moreover the addresses are now remaped when the value if IOBR change. The memory area corresponds to the devices behing the PCI bus, it should not be mapped by the PCI controller. Remove the corresponding code. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-13r2d: always enable IDE and flashAurelien Jarno1-10/+8
IDE and flash are part of the R2D board, and can't be removed. Emulate them even if there is no hard-drive plugged to the IDE or if the flash content is empty.
2010-04-12Fix build when configured with --enable-io-threadBlue Swirl3-12/+21
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-11Cleanup dead codeJun Koi1-3/+0
This patch removes some dead code in exec.c Signed-off-by: Jun Koi <junkoi2004@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-11Sparc: fix exceptions in delay slotBlue Swirl1-4/+4
Fix a case where an exception happens with the instruction in the delay slot. Recovery of branch condition in the exception handling code was not converted to TCG. Because the condition was bogus, wrong NPC could be selected from the two candidates. A nice bug report with a test case can be found in: https://bugs.launchpad.net/qemu/+bug/551814 Fix based on patch by Fabrice Bellard. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-11hw/r2d: add initrd supportAurelien Jarno1-21/+59
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-11vhost.c: include <linux/vhost.h> lastMarcelo Tosatti1-1/+1
So the userspace headers define KERNEL_STRICT_NAMES and there's no conflict on type definition for older kernels. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-04-11vhost-net: disable mergeable buffersMichael S. Tsirkin1-0/+1
vhost in current kernels doesn't support mergeable buffers. Disable this feature if vhost is enabled, until such support is implemented. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-04-11vhost: fix features ackDavid L Stevens1-0/+8
vhost driver in qemu didn't ack features, and this happens to work because we don't really require any features. However, it's better not to rely on this. This patch passes features to vhost as guest acks them. Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-04-11eepro100: convert to new capability APIMichael S. Tsirkin1-13/+9
Using new pci_add_capability_at_offset makes eepro100 code cleaner. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Stefan Weil <weil@mail.berlios.de>
2010-04-11pci: add API to add capability at a known offsetMichael S. Tsirkin2-4/+15
Unlike virtio, device emulations need to add pci capabilities at known offsets to match real hardware. Make this possible by adding an appropriate API. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-04-11hw/r2d: add flash memoryAurelien Jarno3-0/+15
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-10Revert "Avoid page_set_flags() assert in qemu-user host page protection code"Aurelien Jarno1-7/+6
This reverts commit 01c0bef1625d8e5d6d5c6abaf413214d667615ad. (breaks build on 32-bit hosts)
2010-04-10tcg/README: improve description of bswap*Aurelien Jarno1-4/+4
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-10target-alpha: Use non-inverted arguments to gen_{f}cmov.Richard Henderson1-18/+19
The inverted conditions as argument to the function looks wrong at a glance inside translate_one. Since we have an easy function to produce the inversion now, use it. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-10target-alpha: Use setcond for int comparisons.Richard Henderson1-21/+22
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-10target-alpha: Implement cvtql inline.Richard Henderson3-30/+39
It's a simple mask and shift sequence. Also, fix a typo in the actual masks used. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>