summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-04-18QMP: Improve RTC_CHANGE event descriptionLuiz Capitulino1-1/+1
Some people might think that this event is emitted whenever the time changes, be more specific. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18virtio-blk: Fix use after free in error caseKevin Wolf1-3/+3
virtio_blk_req_complete frees the request, so we can't access it any more when calling bdrv_mon_event. Use the pointer that was copied earlier. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18monitor: Convert do_set_link() to QObject, QErrorMarkus Armbruster3-5/+7
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18monitor: Use argument type 'b' for set_linkMarkus Armbruster2-12/+6
Second argument is now "on" or "off" instead of "up" or "down". Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18monitor: New argument type 'b'Markus Armbruster1-0/+31
This is a boolean value. Human monitor accepts "on" or "off". Consistent with option parsing (see parse_option_bool()). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18monitor: Rename argument type 'b' to 'f'Markus Armbruster2-5/+5
To make 'b' available for boolean argument. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18monitor: New commands netdev_add, netdev_delMarkus Armbruster3-0/+87
Monitor commands to go with -netdev. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: New QERR_DEVICE_IN_USEMarkus Armbruster2-0/+7
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: Convert net_client_init() to QErrorMarkus Armbruster1-20/+18
The conversion is shallow: client type init() methods aren't converted. Converting them is a big job for relatively little practical benefit, so leave it for later. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: Convert qemu_opts_validate() to QErrorMarkus Armbruster1-2/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETERMarkus Armbruster2-3/+5
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()Markus Armbruster4-10/+0
Both functions report errors nicely enough now, no need for additional messages. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: Convert qemu_opts_set() to QErrorMarkus Armbruster1-10/+7
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2010-04-18error: New QERR_INVALID_PARAMETER_VALUEMarkus Armbruster2-0/+7
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
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>