aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2010-02-07Do not use dprintfmalc14-204/+204
dprintf is already claimed by POSIX[1], and on at least one system is implemented as a macro [1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html Signed-off-by: malc <av1474@comtv.ru>
2010-02-06arm host: fix compiler warningStefan Weil2-27/+0
Compilation for arm (native or cross) results in this warning: fpu/softfloat-native.c: In function ‘float64_round_to_int’: fpu/softfloat-native.c:387: error: control reaches end of non-void function float64_round_to_int uses special assembler code for arm and has no explicit return value. As there is no obvious reason why arm should need special code, all fpu related conditionals were removed. The remaining code is standard (C99) and compiles for arm, too. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06tcg-i386: Implement setcond.Richard Henderson1-3/+70
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06tcg-i386: Implement small forward branches.Richard Henderson2-38/+81
There are places, like brcond2, where we know that the destination of a forward branch will be within 127 bytes. Add the R_386_PC8 relocation type to support this. Add a flag to tcg_out_jxx and tcg_out_brcond* to enable it. Set the flag in the brcond2 label_next branches; pass along the input flag otherwise. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06Add -static earlier to LDFLAGS for compile_prog()Loïc Minier1-2/+3
Add -static to LDFLAGS earlier as to run the compile_prog() tests with this flags, this will avoid turning on features for which a shared library is available but not a static one. Signed-off-by: Loïc Minier <lool@dooz.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06Fix missing symbols in .rel/.rela.plt sectionsLoïc Minier2-4/+28
Fix .rel.plt sections in the output to not only include .rel.plt sections from the input but also the .rel.iplt sections and to define the hidden symbols __rel_iplt_start and __rel_iplt_end around .rel.iplt as otherwise we get undefined references to these when linking statically to a multilib libc.a. This fixes the static build under i386. Apply similar logic to rela.plt/.iplt and __rela_iplt/_plt_start/_end to fix the static build under amd64. Signed-off-by: Loïc Minier <lool@dooz.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06configure: remove debugging code introduced in ↵Aurelien Jarno1-3/+0
aa527b65d8187b97d73f889b6cae7b6ac6f82d32 Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06configure: fix compilation on hosts without -fstack-protector-allAurelien Jarno1-2/+5
Commit a0f291fc101a7ab3e40850a329da2cc2f2cd1f2d has enabled -fstack-protector-all on all targets, as the configure test is bogus. GCC only emits a warning and not an error if this option is not supported, so the configure scripts doesn't detect the problem. This patch changes the configure script to try the various flags with -Werror in addition to catch the possible warnings. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06Update MAINTAINERSAurelien Jarno1-2/+2
Remove Thiemo from the maintainers. Requiescat in pace. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06target-mips: don't call cpu_loop_exit() from helper.cAurelien Jarno3-8/+22
In helper.c AREG0 may not correspond do env, so it's not possible to call cpu_loop_exit() here. Call it from op_helper.c instead. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06target-arm: refactor cp15.c13 register accessRiku Voipio2-16/+55
Access the cp15.c13 TLS registers directly with TCG ops instead of with a slow helper. If the the cp15 read/write was not TLS register access, fall back to the cp15 helper. This makes accessing __thread variables in linux-user when apps are compiled with -mtp=cp15 possible. legal cp15 register to acces from linux-user are already checked in cp15_user_ok. While at it, make the cp15.c13 Thread ID registers available only on ARMv6K and newer. Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
2010-02-06linux-user: remove signal handler before calling abort()Riku Voipio1-0/+9
Qemu may hang in host_signal_handler after qemu has done a seppuku with cpu_abort(). But at this stage we are not really interested in target process coredump anymore, so unregister host_signal_handler to die grafefully. Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
2010-02-06fix locking error with current_tbRiku Voipio1-2/+2
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
2010-02-06linux-user: adapt uname machine to emulated CPULoïc Minier4-2/+76
This patch for linux-user adapts the output of the emulated uname() syscall to match the configured CPU. Tested with x86, x86-64 and arm emulation. Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Loïc Minier <lool@dooz.org>
2010-02-06target-ppc: change DCR helpers to target_long argumentsAurelien Jarno2-8/+8
The recent transition to always have the DCR helper functions take 32 bit values broke the PPC64 target, as target_long became 64 bits there. This patch changes DCR helpers to target_long arguments, and cast the values to 32 bit when needed. Fixes PPC64 build with --enable-debug-tcg Based on a patch from Alexander Graf <agraf@suse.de> Reported-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06tcg-x86_64: implement setcondRichard Henderson1-5/+33
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06tcg: add tcg_invert_condRichard Henderson1-0/+5
It is very handy to have a reliable mapping of a condition to its inverse. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06tcg: generic support for conditional setRichard Henderson4-6/+78
Defines setcond_{i32,i64} and setcond2_i32 for 64-on-32-bit. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06tcg: document double-word support opcodes.Richard Henderson1-0/+23
The internal opcodes brcond2, add2, sub2, mulu2 were undocumented. Place these in a new section that clearly indicates that they are not to be emitted by translators. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06usb-linux: increase buffer for USB control requestsChristian Krause1-1/+1
The WLAN USB stick ZyXEL NWD271N (0586:3417) uses very large usb control transfers of more than 2048 bytes which won't fit into the buffer of the ctrl_struct. This results in an error message "husb: ctrl buffer too small" and a non-working device. Increasing the buffer size to 8192 seems to be a safe choice. Signed-off-by: Christian Krause <chkr@plauener.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06mips/malta: fix typoAurelien Jarno1-1/+1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-02-06PCI: show also host bridge data in "info pci" outputBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-06PCI: fix multiple bridge problemsBlue Swirl1-11/+17
When several PCI bridges were in use, monitor command "info pci" would enter into infinite loop. Buses behind the bridge were not discoverable because secondary and subordinate bus numbers were not used properly. Other buses were not found because bus search terminated on first miss. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-05Refactor DEC 21154 PCI bridgeBlue Swirl4-107/+85
It's currently not used by PPC machines. Refactor so that also Sparc64 machines can use it. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-05usb-linux.c: remove write-only variablePaolo Bonzini1-2/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-05vnc.c: remove dead codePaolo Bonzini1-3/+0
to= is handled in qemu-sockets.c inet_listen. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-05remove two dead assignments in target-i386/translate.cPaolo Bonzini1-2/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-05exec.c: dead assignmentsPaolo Bonzini1-4/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-05fix undefined shifts by >32Paolo Bonzini1-2/+2
This one is for 0.12 too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-02-03qdev: Add rudimentary help for property valueMarkus Armbruster1-1/+1
This provides the same information as reverted commit 2ba6edf0. Not much, just better than nothing. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03qdev: update help on -deviceMarkus Armbruster1-13/+10
While there, use "property" rather than "option", for consistency with -global. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03qdev: Add help for device propertiesMarkus Armbruster1-1/+14
Option "-device DRIVER,?" and monitor command "device_add DRIVER,?" print the supported properties instead of creating a device. The former also terminates the program. This is commit 2ba6edf0 (just reverted) done right. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03Revert "qdev: Add help for device properties"Markus Armbruster1-13/+2
This reverts commit 2ba6edf0dd740166632df80caa85992b20791a68. The commit has two issues: * When it runs from the monitor, e.g. "device_add e1000,?", it prints to stderr instead of the monitor. * Help looks to callers just like failed device creation. This makes main() exit unsuccessfully on "-device e1000,?". We need to do this differently. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03Revert "qdev: Add help for property value"Markus Armbruster1-7/+2
This reverts commit 922910ce42d15bdb7c2347436b1b5798b5401de4. The commit has four issues: * When it runs from the monitor, e.g. "device_add e1000,mac=?", it prints to stderr instead of the monitor. * Help looks to callers just like failed device creation. This makes main() exit unsuccessfully on "-device e1000,mac=?". * It has an undocumented side effect on -global: "-global e1000.mac=?" prints help, but only when we actually add an e1000 device. * It does not work for properties that accept the value "?". We need to do this differently. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03qdev: Fix exit code for -device ?Markus Armbruster3-9/+28
Help was shoehorned into device creation, qdev_device_add(). Since help doesn't create a device, it returns NULL, which looks to callers just like failed device creation. Monitor handler do_device_add() doesn't care, but main() exits unsuccessfully. Move help out of device creation, into new qdev_device_help(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03qemu-option: Make qemu_opts_foreach() accumulate return valuesMarkus Armbruster1-1/+1
Return the bitwise inclusive or of all return values instead of the last call's value. This lets you find out whether any of the calls returned a non-zero value. No functional change, as existing users either don't care for the value, or pass non-zero abort_on_failure, which breaks the loop on the first non-zero return value. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03Revert "QError: New QERR_INVALID_CPU_INDEX"Markus Armbruster2-7/+0
This reverts commit 64a34bb14c0e358a6b2f14805e59ef25bf62d6d5. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEXMarkus Armbruster1-1/+1
This changes the error message from "Invalid CPU index" to "Invalid parameter index" in the human monitor. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03monitor: convert do_migrate_set_downtime() to QObjectMarkus Armbruster3-3/+6
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03monitor: Use argument type 'T' for migrate_set_downtimeMarkus Armbruster2-14/+3
Before, it used type 's', which strips quotes and interprets escapes, and is quite inappropriate for QMP. Negative arguments are no flushed to zero. Before, they were cast to uint32_t, which wrecked the sign. Ridiculously large arguments including infinities are now rejected. Before, they were interpreted as zero. Same for NaN. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03monitor: New argument type 'T'Markus Armbruster1-1/+16
This is a double value with optional suffixes ms, us, ns. We'll need this to get migrate_set_downtime() QMP-ready. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03monitor: convert do_migrate_set_speed() to QObjectMarkus Armbruster3-3/+4
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03monitor: Use argument type 'b' for migrate_set_speedMarkus Armbruster2-16/+4
Before, it used type 's', which strips quotes and interprets escapes, and is quite inappropriate for QMP. Negative arguments are no flushed to zero. Before, they were cast to uint32_t, which wrecked the sign. Ridiculously large arguments including infinities are now rejected. Before, they were interpreted as zero. Same for NaN. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03monitor: New argument type 'b'Markus Armbruster1-0/+64
This is a double value with optional suffixes G, g, M, m, K, k. We'll need this to get migrate_set_speed() QMP-ready. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03QDict: New qdict_get_double()Markus Armbruster3-1/+26
Helper function just like qdict_get_int(), just for QFloat/double. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03monitor: Document argument type 'M'Markus Armbruster1-0/+2
Was forgotten in commit b6e098d7. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-02-03seabios: use correct submodule hashAnthony Liguori1-0/+0
Commit 392ecf543dd2b219828374850d833296a55567ea introduced an accidental change to the roms/seabios submodule. This commit partially reverts that commit to ensure the seabios module points to the right commit. Reported-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-31bsd/darwin-user: mmap_frag() users only check for -1 errorBlue Swirl2-2/+2
See also ee636500d6eab44b83f09cb730b67226b70423b1. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-31cris: Prettify register dumps.Edgar E. Iglesias1-2/+2
Use friendly names for registers in the dumps. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-01-31sparc32 don't mark page dirty when failingArtyom Tarasenko1-5/+6
if the access check fails, the page can not be modified and shouldn't be marked dirty. The patch fixes the "hsfs_putpage: dirty HSFS page" error in Solaris guests. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>