aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-24lm32: remove lm32_sysMichael Walle4-193/+0
Since we have now semihosting on the lm32 target, this device is no longer needed. Remove it. Signed-off-by: Michael Walle <michael@walle.cc>
2014-05-24test: lm32: use semihosting for testingMichael Walle5-22/+103
Instead of the lm32-sys device, use semihosting to print to the host console and exit the test. Signed-off-by: Michael Walle <michael@walle.cc>
2014-05-24target-lm32: add semihosting supportMichael Walle6-3/+240
Intercept certain system calls if semihosting is enabled. This should behave like the GDB simulator. Signed-off-by: Michael Walle <michael@walle.cc>
2014-05-24test: lm32: make test cases independentMichael Walle8-0/+25
Make test cases independent from from each other. Eg. if a test case needs a specific value in register A, don't rely on the fact that it is already set by the preceding test case. Signed-off-by: Michael Walle <michael@walle.cc>
2014-05-24tcg-mips: Enable direct chaining of TBsRichard Henderson2-3/+12
Now that the code_gen_buffer is constrained to not cross 256mb regions, we are assured that we can use J to reach another TB. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Simplify movcondRichard Henderson1-49/+17
Use the same table to fold comparisons as with setcond. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Simplify brcond2Richard Henderson1-57/+20
Emitting a single branch instead of (up to) 3, using setcond2 to generate the composite compare. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Improve setcond eq/ne vs zerosRichard Henderson1-4/+36
The original code results in one too many insns per zero present in the input. And since comparing 64-bit numbers vs zero is common... Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Simplify setcond2Richard Henderson1-64/+31
Using tcg_unsigned_cond and tcg_high_cond. Also, move the function up in the file for future cleanups. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Simplify brcondRichard Henderson1-46/+41
Use the same table to fold comparisons as with setcond. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Simplify setcondRichard Henderson1-58/+67
Use a table to fold comparisons to less-than. Also, move the function up in the file for futher simplifications. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Commonize opcode implementationsRichard Henderson1-114/+98
Most opcodes fall in to one of a couple of patterns. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Improve add2/sub2Richard Henderson1-31/+56
Reduce insn count from 5 to either 3 or 4. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Hoist args loadsRichard Henderson1-98/+103
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Fix subtract immediate rangeRichard Henderson1-5/+11
Since we must use ADDUI, we would generate incorrect code for -32768. Leaving off subtract of +32768 makes things easier for a follow-on patch. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Name the opcode enumerationRichard Henderson1-9/+9
And use it in the opcode emission functions. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Use EXT for AND on mips32r2Richard Henderson2-14/+50
At the same time, tidy deposit by introducing tcg_out_opc_bf. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Use T9 for TCG_TMP1Richard Henderson1-1/+1
T0 is an argument register for the n32 and n64 abis. T9 is the call address register for the abis, and is more directly under the control of the backend. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Introduce TCG_TMP0, TCG_TMP1Richard Henderson1-114/+117
Use these instead of hard-coding the registers to use for temporaries. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Rearrange register allocationRichard Henderson2-11/+19
Use FP (also known as S8) as a normal call-saved register. Include T0 in the allocation order and call-clobbered list even though it's currently used as a TCG temporary. Put the argument registers at the end of the allocation order. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Convert to new_ldstRichard Henderson2-53/+25
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Convert to new qemu_l/st helpersRichard Henderson1-51/+56
In addition, fill delay slots calling the helpers and tail call to the store helpers. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Move softmmu slow path out of lineRichard Henderson1-389/+383
At the same time, tidy up the call helpers, avoiding a memory reference. Split out several subroutines. Use TCGMemOp constants. Make endianness selectable at runtime. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Split large ldst offsetsRichard Henderson1-11/+12
Use this to reduce goto_tb by one insn. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Fill the exit_tb delay slotRichard Henderson1-7/+18
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Use J and JAL opcodesRichard Henderson1-6/+40
For userland builds calls will normally be in range, and for the exit_tb opcode the branch to the epilogue. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Constrain the code_gen_buffer to be within one 256mb segmentRichard Henderson1-5/+85
This assures us use of J for exit_tb and goto_tb, and JAL for calling into the generated bswap helpers. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24tcg-mips: Layout executable and code_gen_bufferRichard Henderson2-2/+18
Choosing good addresses for them means we can use JAL for helper calls. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-24libcacard/vcard_emul_nss: Drop a redundant conditionalMarkus Armbruster1-5/+0
Bailing out when PK11_FindGenericObjects() returns null ensures the loop that follows it executes at least once. The "loop did not execute" test right after it is useless. Drop it. Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24libcacard: Convert two leftover realloc() to GLibMarkus Armbruster2-16/+4
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24libcacard/vreader: Tighten assertion to clarify intentMarkus Armbruster1-1/+1
Bonus: hushes up Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24libcacard/vreader: Drop broken recovery from failed assertionMarkus Armbruster1-5/+3
We suppress some code when we got unexpected status and assertion checking is off: assert(card_status == VCARD_DONE); if (card_status == VCARD_DONE) { int size = MIN(*receive_buf_len, response->b_total_len); memcpy(receive_buf, response->b_data, size); *receive_buf_len = size; } Such "recovery" is of dubious value even when it works. This one doesn't: it fails to assign to receive_buf[] and *receive_buf_len, which the callers expect. Make the code unconditional. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24libcacard: Plug memory leaks around vreader_get_reader_list()Markus Armbruster2-0/+5
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24libcacard/vscclient: Bury some dead codeMarkus Armbruster1-4/+2
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24vl: fix 'name' option to work with -readconfigDr. David Alan Gilbert1-2/+7
The 'name' option silently failed when used in config files ( http://lists.gnu.org/archive/html/qemu-devel/2014-04/msg00378.html ) -readconfig stores the configuration read in QemuOpts. Command line option parsing should do the same, and no more. In particular it should not act upon the option. That needs to be done separately, where both command line and -readconfig settings are visible in QemuOpts. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reported-by: William Dauchy <william@gandi.net> Tested-by: William Dauchy <william@gandi.net> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> (mjt: added commit message by ambru@ and subject prefix)
2014-05-24configure: Put tempfiles in a subdir of the build directoryPeter Maydell2-13/+17
When libtool support was added to configure, the new temporary files were left out of the list of files cleaned up on exit; this results in a lot of stale .lo files being left around in /tmp. Worse, libtool creates a /tmp/.libs directory which we can't easily clean up. Put all our temporary files in a single temporary directory created as a subdirectory of the build directory, so we can easily clean it up, and don't need fragile or complicated code for creation to avoid it clashing with temporary directories from other instances of QEMU configure or being subject to attack from adversaries who can write to /tmp. Since the temporaries now live in the build tree, we have no need to jump through hoops with a trap handler to try to remove them when configure exits; this fixes some weird bugs where hitting ^C during a configure run wouldn't actually make it stop, because we would run the trap handler but then not stop. (It is possible to get the trap handler semantics right but it is convoluted largely because of bugs in dash, so it is simpler to just avoid it.) Note that "temporary files go in the build directory, not /tmp" is the way autoconf behaves. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24dma-helpers: avoid calling dma_bdrv_unmap() twiceJules Wang1-1/+1
Calling dma_bdrv_unmap() twice is not necessary and may cause potential problems if some code changes. Signed-off-by: Jules Wang <junqing.wang@cs2c.com.cn> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24arch_init: replace fprintf(stderr, ...) with error_report()Le Tan1-17/+15
Replace fprintf(stderr,...) with error_report() in the file arch_init.c. The trailing "\n"s of the @fmt argument have been removed because @fmt of error_report() should not contain newline. Signed-off-by: Le Tan <tamlokveer@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24pci: move dereferencing of root only after verifying valid root pointerSaravanakumar1-2/+2
Signed-off-by: Saravanakumar <saravanakumar.punith@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24jazz_led: Add missing break in switch caseSaravanakumar1-0/+1
Signed-off-by: Saravanakumar <saravanakumar.punith@gmail.com> Reviewed-by: Paolo Bonizni <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etcPeter Maydell1-22/+23
We have an unfortunate naming clash between the functions ldl_p, stl_p, etc defined in bswap.h (which have semantics "load/store in host endianness") and the #defines of the same name in cpu-all.h (which have the semantics "load/store in target endianness"). Fortunately it turns out that the only users of the bswap.h functions are all within bswap.h itself, so we can simply rename them to include a _he_ infix for "host endianness". Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24configure: Automatically select GTK+ 3.0 if GTK+ 2.0 is unavailableStefan Weil1-3/+19
The configure option --with-gtkabi=3.0 is still supported, but no longer needed when GTK+-2.0 is missing. When no GTK+ ABI is selected by the user, configure first tries 2.0, then 3.0. For some platforms (e.g. Windows) newer binaries of GTK+ are only available for GTK+ 3.0. Now building on these platforms is a little bit easier. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24nbd: Miscellaneous typo fixes.Hani Benhabiles3-3/+3
Signed-off-by: Hani Benhabiles <hani@linux.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24nbd: Close socket on negotiation failure.Hani Benhabiles2-3/+5
Otherwise, the nbd client may hang waiting for the server response. Signed-off-by: Hani Benhabiles <hani@linux.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24iohandler.c: Properly initialize sigaction structPeter Maydell1-0/+1
The code in qemu_init_child_watch() wasn't clearing the 'struct sigaction' before passing it to sigaction(); this meant that we would block a random set of signals while executing the SIGCHLD handler. Initialize properly by using memset() on the struct, as we do in similar cases elsewhere. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-05-24libcacard: g_malloc cleanupsMichael Tokarev6-46/+23
This patch replaces g_malloc() in libcacard into g_new() or g_new0() where appropriate (removing some init-to-zero surrounding code), g_malloc+memcpy into g_memdup() and the like. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Alon Levy <alevy@redhat.com>
2014-05-22tci: Fix tcg_out_callRichard Henderson1-0/+3
Broken since dddbb2e1e3f8137d7e3f1faf9758c66cca0c94ea. Do all the rest of the things that tcg_out_op did before and after the big switch statement. Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-05-22Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell4-4/+4
* remotes/qmp-unstable/queue/qmp: qapi: zero-initialize all QMP command parameters scripts/qapi.py: Avoid syntax not supported by Python 2.4 doc: add "setup" to list of migration states Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-22Merge remote-tracking branch 'remotes/kraxel/tags/pull-chardev-2' into stagingPeter Maydell4-35/+36
purge error_is_set() # gpg: Signature made Wed 21 May 2014 11:43:44 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-chardev-2: error: error_is_set() is finally unused; remove char: Explain qmp_chardev_add()'s unusual error handling char: Clean up fragile use of error_is_set() char: Use return values instead of error_is_set(errp) qemu-socket: Clean up inet_connect_opts() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-05-22Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-5' into stagingPeter Maydell1-3/+4
audio: two intel-hda fixes. # gpg: Signature made Wed 21 May 2014 09:49:39 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-audio-5: hw/audio/intel-hda: Avoid shift into sign bit audio/intel-hda: support FIFORDY Signed-off-by: Peter Maydell <peter.maydell@linaro.org>