aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-01-23iotests: Add tests for more corruption casesMax Reitz2-0/+28
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-01-23qcow2: Add two more unalignment checksMax Reitz1-0/+21
This adds checks for unaligned L2 table offsets and unaligned data cluster offsets (actually the preallocated offsets for zero clusters) to the zero cluster expansion function. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-01-23virtio-blk: Use blk_aio_ioctlFam Zheng1-46/+79
Use the asynchronous interface of ioctl. This will not make the VM unresponsive if the ioctl takes a long time. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-01-23virtio-blk: Pass req to virtio_blk_handle_scsi_reqFam Zheng2-7/+5
In preparation for calling blk_aio_ioctl. Also make the function static as no other files need it. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-01-22Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20150122-1' ↵Peter Maydell1-2/+2
into staging b16: fix interrupt acknowledgement # gpg: Signature made Thu 22 Jan 2015 11:38:29 GMT 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-20150122-1: sb16: fix interrupt acknowledgement Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-01-22Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20150122-1' ↵Peter Maydell2-1/+34
into staging input: misc fixes. # gpg: Signature made Thu 22 Jan 2015 11:27:37 GMT 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-input-20150122-1: hw/input/hid.c Fix capslock hid code hid: handle full ptr queues in post_load input: improve docs for input-send-event qmp command Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-01-22Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20150122-1' into ↵Peter Maydell3-4/+14
staging spice: fix coverity defect, add unix address support # gpg: Signature made Thu 22 Jan 2015 11:17:24 GMT 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/spice/tags/pull-spice-20150122-1: spice: fix coverity reported defect in display code spice: add unix address support Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-01-22Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20150122-1' into ↵Peter Maydell8-198/+611
staging vnc: add support for multiple vnc displays # gpg: Signature made Thu 22 Jan 2015 11:00:54 GMT 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-vnc-20150122-1: monitor: add vnc websockets monitor: add query-vnc-servers command vnc: factor out qmp_query_client_list vnc: track & limit connections vnc: update docs/multiseat.txt vnc: allow binding servers to qemu consoles vnc: switch to QemuOpts, allow multiple servers vnc: add display id to acl names vnc: remove unused DisplayState parameter, add id instead. vnc: remove vnc_display global Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-01-22hw/input/hid.c Fix capslock hid codeDinar Valeev1-1/+1
When ever USB keyboard is used, e.g. '-usbdevice keyboard' pressing caps lock key send 0x32 hid code, which is treated as backslash. Instead it should be 0x39 code. This affects sending uppercase keys, as they typed whith caps lock active. While on x86 this can be workarounded by using ps/2 protocol. On Power it is crusial as we don't have anything else than USB. This is fixes guest automation tasts over vnc. Signed-off-by: Dinar Valeev <dvaleev@suse.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22hid: handle full ptr queues in post_loadGerd Hoffmann1-0/+21
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
2015-01-22input: improve docs for input-send-event qmp commandGerd Hoffmann1-0/+12
Text partly suggested by Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into ↵Peter Maydell3-61/+7
staging qemu-sparc update # gpg: Signature made Wed 21 Jan 2015 16:56:31 GMT using RSA key ID AE0F321F # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" * remotes/mcayland/tags/qemu-sparc-signed: disas/sparc: Remove unused data sparc_opcode_archs[] target-sparc: Mark gen_load_trap_state_at_tl() as !CONFIG_USER_ONLY target-sparc: is_translating_asi() is TARGET_SPARC64 only target-sparc: address_mask(), asi_address_mask() are TARGET_SPARC64 only target-sparc: Remove unused gen_op_subi_cc and gen_op_addi_cc Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-01-22monitor: add vnc websocketsGerd Hoffmann2-4/+16
Add websockets bool to VncBasicInfo, report websocket server sockets, flag websocket client connections. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22monitor: add query-vnc-servers commandGerd Hoffmann3-0/+206
Add new query vnc qmp command, for the lack of better ideas just name it "query-vnc-servers". Changes over query-vnc: * It returns a list of vnc servers, so multiple vnc server instances are covered. * Each vnc server returns a list of server sockets. Followup patch will use that to also report websockets. In case we add support for multiple server sockets server sockets (to better support ipv4+ipv6 dualstack) we can add them to the list too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22vnc: factor out qmp_query_client_listGerd Hoffmann1-15/+15
so we can reuse it for the new vnc query command. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22vnc: track & limit connectionsGerd Hoffmann2-3/+46
Also track the number of connections in "connecting" and "shared" state (in addition to the "exclusive" state). Apply a configurable limit to these connections. The logic to apply the limit to connections in "shared" state is pretty simple: When the limit is reached no new connections are allowed. The logic to apply the limit to connections in "connecting" state (this is the state you are in *before* successful authentication) is slightly different: A new connect kicks out the oldest client which is still in "connecting" state. This avoids a easy DoS by unauthenticated users by simply opening connections until the limit is reached. Cc: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22vnc: update docs/multiseat.txtGerd Hoffmann1-4/+14
vnc joins the party ;) Also some s/head/seat/ to clarify. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22vnc: allow binding servers to qemu consolesGerd Hoffmann1-7/+43
This patch adds a display= parameter to the vnc options. This allows to bind a vnc server instance to a specific display, allowing to create a multiseat setup with a vnc server for each seat. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22vnc: switch to QemuOpts, allow multiple serversGerd Hoffmann4-132/+199
This patch switches vnc over to QemuOpts, and it (more or less as side effect) allows multiple vnc server instances. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22vnc: add display id to acl namesGerd Hoffmann1-2/+20
In case the display id is "default" (which is the one you get if you don't explicitly assign one) we keep the old name scheme, without display, for backward compatibility reasons. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
2015-01-22vnc: remove unused DisplayState parameter, add id instead.Gerd Hoffmann3-26/+26
DisplayState isn't used anywhere, drop it. Add the vnc server ID as parameter instead, so it is possible to specify the server instance. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
2015-01-22vnc: remove vnc_display globalGerd Hoffmann2-22/+43
Replace with a vnc_displays list, so we can have multiple vnc server instances. Add vnc_server_find function to lookup a display by id. With no id supplied return the first vnc server, for backward compatibility reasons. It is not possible (yet) to actually create multiple vnc server instances. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com>
2015-01-22spice: fix coverity reported defect in display codeGerd Hoffmann1-3/+3
Report: 1. Condition surface, taking false branch 406 if (surface && ssd->surface && 407 surface_width(surface) == pixman_image_get_width(ssd->surface) && 408 surface_height(surface) == pixman_image_get_height(ssd->surface)) { 409 /* no-resize fast path: just swap backing store */ ... 10. alias_transfer: Assigning: ssd->ds = surface. 440 ssd->ds = surface; 11. var_deref_op: Dereferencing null pointer ssd->ds. CID 1264334 (#1 of 1): Dereference after null check (FORWARD_NULL) 441 ssd->surface = pixman_image_ref(ssd->ds->image); Fix: Move code block dereferencing ssd->ds into the already existing if (ssd->ds) { ... } block. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22spice: add unix address supportMarc-André Lureau2-1/+11
Teach qemu to set up a Spice server with a UNIX socket using the following arguments -spice unix,addr=path. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-22sb16: fix interrupt acknowledgementPaolo Bonzini1-2/+2
SoundBlaster 16 emulation is very broken and consumes a lot of CPU, but a small fix was suggested offlist and it is enough to fix some games. I got Epic Pinball to work with the "SoundBlaster Clone" option. The processing of the interrupt register is wrong due to two missing "not"s. This causes the interrupt flag to remain set even after the Acknowledge ports have been read (0x0e and 0x0f). The line was introduced by commit 85571bc (audio merge (malc), 2004-11-07), but the code might have been broken before because I did not look closely at the huge patches from 10 years ago. Reported-by: Joshua Bair <j_bair@bellsouth.net> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-01-21disas/sparc: Remove unused data sparc_opcode_archs[]Peter Maydell1-32/+0
Remove sparc_opcode_archs and the macros which use it, because we don't use them in QEMU and they provoke clang warnings: disas/sparc.c:307:39: warning: unused variable 'sparc_opcode_archs' [-Wunused-const-variable] static const struct sparc_opcode_arch sparc_opcode_archs[] = ^ Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2015-01-21target-sparc: Mark gen_load_trap_state_at_tl() as !CONFIG_USER_ONLYPeter Maydell1-0/+2
The function gen_load_trap_state_at_tl() is only used in the softmmu configs; wrap it in #ifndef CONFIG_USER_ONLY to avoid clang compiler warnings in linux-user builds. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2015-01-21target-sparc: is_translating_asi() is TARGET_SPARC64 onlyPeter Maydell1-6/+2
Move the is_translating_asi() inside the TARGET_SPARC64 ifdef (and remove the unimplemented 32-bit codepath), as it is only called from TARGET_SPARC64 code. This fixes a clang 3.4 unused-function warning. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2015-01-21target-sparc: address_mask(), asi_address_mask() are TARGET_SPARC64 onlyPeter Maydell1-0/+4
The address_mask() and asi_address_mask() functions are only used in TARGET_SPARC64 configs, so guard with ifdefs to avoid warnings about unused functions in 32-bit builds. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2015-01-21target-sparc: Remove unused gen_op_subi_cc and gen_op_addi_ccPeter Maydell1-24/+0
The functions gen_op_addi_cc() and gen_op_subi_cc() are unused; remove them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2015-01-20Merge remote-tracking branch 'remotes/pmaydell/tags/pull-misc-20150120' into ↵Peter Maydell30-309/+242
staging Miscellaneous cross-tree patches: * load/store helper cleanup * drop TARGET_HAS_ICE define and checks * scripts/qapi-types.py: Add dummy member to empty structs * cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined # gpg: Signature made Tue 20 Jan 2015 15:43:38 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-misc-20150120: cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessors cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessors cpu_ldst.h: Drop unused _raw macros, saddr() and laddr() cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessors cpu_ldst.h: Remove unused very short ld*/st* defines cpu_ldst.h: Drop unused ld/st*_kernel defines target-mips: Don't use _raw load/store accessors linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loop linux-user/vm86.c: Use cpu_ldl_data &c rather than plain ldl &c bsd-user/elfload.c: Don't use ldl() or ldq_raw() linux-user/elfload.c: Don't use _raw accessor functions target-sparc: Don't use {ld, st}*_raw functions monitor.c: Use ld*_p() instead of ld*_raw() cpu_ldst.h: Remove unused ldul_ macros exec.c: Drop TARGET_HAS_ICE define and checks scripts/qapi-types.py: Add dummy member to empty structs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-01-20cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not definedPeter Maydell1-4/+8
Not all targets define a full set of suffix strings for the NB_MMU_MODES that they have. In this situation, don't define any helper functions for that mode, rather than defining helper functions with no suffix at all. The MMU mode is still functional; it is merely not directly accessible via cpu_ld*_MODE from target helper functions. Also add an "NB_MMU_MODES >= 2" check to the definition of the mode 1 helpers -- some targets only define one MMU mode. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 1421432008-6786-1-git-send-email-peter.maydell@linaro.org
2015-01-20cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessorsPeter Maydell3-38/+32
Add documentation of what the cpu_*_* accessors look like. Correct some minor errors in the existing documentation of the direct _p accessor family. Remove the near-duplicate comment on the _p accessors from cpu-all.h and replace it with a reference to the comment in bswap.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-16-git-send-email-peter.maydell@linaro.org
2015-01-20cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessorsPeter Maydell1-53/+1
The cpu_ldfq/stfq/ldfl/stfl accessors for loading and storing float32 and float64 are completely unused, so delete them. (The union they use for converting from the float32/float64 type to uint32_t or uint64_t is the wrong way to do it anyway: they should be using make_float* and float*_val.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-15-git-send-email-peter.maydell@linaro.org
2015-01-20cpu_ldst.h: Drop unused _raw macros, saddr() and laddr()Peter Maydell1-23/+0
The _raw macros and their helpers saddr() and laddr() are now totally unused -- delete them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-14-git-send-email-peter.maydell@linaro.org
2015-01-20cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macrosPeter Maydell1-3/+3
The ld*_raw and st*_raw macros are now only used within the code produced by cpu_ldst_template.h, and only in three places. Expand these out to just call the ld_p and st_p functions directly. Note that in all the callsites the address argument is a uintptr_t, so we can drop that part of the double-cast used in the saddr() and laddr() macros. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-13-git-send-email-peter.maydell@linaro.org
2015-01-20cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessorsPeter Maydell3-40/+127
Use inline functions rather than macros for cpu_ld/st accessors for the *-user configurations, as we already do for softmmu. This has a two advantages: * we can actually typecheck our arguments * we don't need to leak the _raw macros everywhere Since the _kernel functions were only used by target-i386/seg_helper.c, put the definitions for them in that file too. (It already has the similar template include code to define them for the softmmu case, so it makes sense to have it deal with defining them for user-only.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-12-git-send-email-peter.maydell@linaro.org
2015-01-20cpu_ldst.h: Remove unused very short ld*/st* definesPeter Maydell1-26/+0
The very short ld*/st* defines are now not used anywhere; delete them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-11-git-send-email-peter.maydell@linaro.org
2015-01-20cpu_ldst.h: Drop unused ld/st*_kernel definesPeter Maydell1-15/+0
The ld*_kernel and st*_kernel defines are not used anywhere; delete them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-10-git-send-email-peter.maydell@linaro.org
2015-01-20target-mips: Don't use _raw load/store accessorsPeter Maydell1-2/+2
Use cpu_*_data instead of the direct *_raw load/store accessors. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-9-git-send-email-peter.maydell@linaro.org
2015-01-20linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loopPeter Maydell1-1/+1
In the m68k cpu_loop() use get_user_u16 to read the immediate for the simcall rahter than lduw, to bring it into line with how other archs do it and to remove another user of the ldl family of functions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-8-git-send-email-peter.maydell@linaro.org
2015-01-20linux-user/vm86.c: Use cpu_ldl_data &c rather than plain ldl &cPeter Maydell1-26/+31
Use the cpu_ld*_data and cpu_st*_data family of functions to access guest memory in vm86.c rather than the very short-named ldl/stl functions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-7-git-send-email-peter.maydell@linaro.org
2015-01-20bsd-user/elfload.c: Don't use ldl() or ldq_raw()Peter Maydell1-4/+7
Use get_user_u64() and get_user_ual() instead of the ldl() and ldq_raw() functions. [Note that this change is not compile tested as it is actually in dead code -- none of the bsd-user configurations are PPC.] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-6-git-send-email-peter.maydell@linaro.org
2015-01-20linux-user/elfload.c: Don't use _raw accessor functionsPeter Maydell1-2/+5
The _raw accessor functions are an implementation detail that has leaked out to some callsites. Use get_user_u64() instead of ldq_raw(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-5-git-send-email-peter.maydell@linaro.org
2015-01-20target-sparc: Don't use {ld, st}*_raw functionsPeter Maydell1-12/+12
Instead of using the _raw family of ld/st accessor functions, use cpu_*_data. All this code is CONFIG_USER_ONLY, so the two are the same semantically, but the _raw functions are really a detail of the implementation which has leaked into a few callsites like this one. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-4-git-send-email-peter.maydell@linaro.org
2015-01-20monitor.c: Use ld*_p() instead of ld*_raw()Peter Maydell1-4/+4
The monitor code for doing a memory_dump() was using ld*_raw() to do target-CPU accesses out of a local buf[] array. The correct functions for this purpose are ld*_p(), which take a host pointer, rather than ld*_raw(), which take an integer representing a guest address and are somewhat meaningless in softmmu configurations. Nobody noticed because for softmmu the _raw functions are the same as ldl_p but with some extra casts thrown in. Switch to using the correct functions instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1421334118-3287-3-git-send-email-peter.maydell@linaro.org
2015-01-20cpu_ldst.h: Remove unused ldul_ macrosPeter Maydell1-9/+0
The five ldul_ macros are not used anywhere and are marked up with an XXX comment. "ldul" is a non-standard prefix for our family of load instructions: we don't mark 32-bit accesses for signedness because they return a 32 bit quantity. So just delete them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 1421334118-3287-2-git-send-email-peter.maydell@linaro.org
2015-01-20exec.c: Drop TARGET_HAS_ICE define and checksPeter Maydell17-48/+2
The TARGET_HAS_ICE #define is intended to indicate whether a target-* guest CPU implementation supports the breakpoint handling. However, all our guest CPUs have that support (the only two which do not define TARGET_HAS_ICE are unicore32 and openrisc, and in both those cases the bp support is present and the lack of the #define is just a bug). So remove the #define entirely: all new guest CPU support should include breakpoint handling as part of the basic implementation. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Message-id: 1420484960-32365-1-git-send-email-peter.maydell@linaro.org
2015-01-20scripts/qapi-types.py: Add dummy member to empty structsPeter Maydell1-0/+8
Make sure that all generated C structs have at least one field; this avoids potential issues with attempting to malloc space for zero-length structs in C (g_malloc(sizeof struct) would return NULL). It also avoids an incompatibility with C++ (where an empty struct is size 1); that isn't important to us now but might be in future. Generated empty structures look like this: struct Abort { char qapi_dummy_field_for_empty_struct; }; This silences clang warnings like: ./qapi-types.h:3752:1: warning: empty struct has size 0 in C, size 1 in C++ [-Wextern-c-compat] struct Abort ^ Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1419359069-16611-1-git-send-email-peter.maydell@linaro.org
2015-01-20Merge remote-tracking branch 'remotes/sstabellini/xen-2015-01-20-v2' into ↵Peter Maydell8-53/+526
staging * remotes/sstabellini/xen-2015-01-20-v2: xen: add a lock for the mapcache xen: do not use __-named variables in mapcache Xen: Use the ioreq-server API when available Add device listener interface Signed-off-by: Peter Maydell <peter.maydell@linaro.org>