summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* usb: move uhci register defines to header fileGerd Hoffmann2014-06-021-0/+39
| | | | | | So we can easily use them in tests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' ↵Peter Maydell2014-05-283-21/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging QOM/QTest infrastructure fixes and device conversions * qom-test extension * QEMUMachineInitArgs conversion to MachineState * -machine options turned into /machine properties * Named GPIO IRQs for devices # gpg: Signature made Wed 28 May 2014 18:24:04 BST using RSA key ID 3E7E013F # gpg: Can't check signature: public key not found * remotes/afaerber/tags/qom-devices-for-peter: ssi: Name the CS GPIO qdev: Implement named GPIOs machine: Make -machine opts properties of MachineState tests: Check empty QMP output visitor qapi: Avoid output visitor crashing if it encounters a NULL value vl.c: Do not set 'type' property in obj_set_property() machine: Conversion of QEMUMachineInitArgs to MachineState qom-test: Test qom-list on link<> properties Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * ssi: Name the CS GPIOPeter Crosthwaite2014-05-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To get it out of the default GPIO list. This allows child devices to use the un-named GPIO namespace without having to be SSI aware. That is, there is no more need for machines to know about the obscure policy where GPIO 0 is the SSI chip-select and GPIO 1..N are the concrete class GPIOs (defined locally as 0..N-1). This is most notable in stellaris, which uses a device which has both SSI and concrete level GPIOs. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * qdev: Implement named GPIOsPeter Crosthwaite2014-05-281-4/+20
| | | | | | | | | | | | | | | | | | | | | | Implement named GPIOs on the Device layer. Listifies the existing GPIOs stuff using string keys. Legacy un-named GPIOs are preserved by using a NULL name string - they are just a single matchable element in the name list. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * machine: Make -machine opts properties of MachineStateMarcel Apfelbaum2014-05-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | Make machine's QemuOpts QOM properties of /machine. The properties are automatically filled in. This opens the possibility to create opts per machine rather than global. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * machine: Conversion of QEMUMachineInitArgs to MachineStateMarcel Apfelbaum2014-05-281-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Total removal of QEMUMachineInitArgs struct. QEMUMachineInitArgs's fields are copied into MachineState. Removed duplicated fields from MachineState. All the other changes are only mechanical refactoring, no semantic changes. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (s390) Reviewed-by: Michael S. Tsirkin <mst@redhat.com> (PC) [AF: Renamed ms -> machine, use MACHINE_GET_CLASS()] Signed-off-by: Andreas Färber <afaerber@suse.de>
* | tcg: Move size effects out of dh_argRichard Henderson2014-05-282-50/+39
| | | | | | | | | | | | | | Tidying the initialization of the args arrays at the same time. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | tcg: Remove sizemask and flags arguments to tcg_gen_callNRichard Henderson2014-05-282-14/+7
| | | | | | | | | | | | Take them from the TCGHelperInfo struct instead. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | tcg: Save flags and computed sizemask in TCGHelperInfoRichard Henderson2014-05-281-16/+28
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* | tcg: Move side effects out of dh_sizemaskRichard Henderson2014-05-282-15/+8
| | | | | | | | | | | | Moving them into dh_arg instead. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | tcg: Inline tcg_gen_helperNRichard Henderson2014-05-281-6/+6
| | | | | | | | | | Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | tcg: Push tcg-runtime routines into exec/helper-*Richard Henderson2014-05-284-4/+11
| | | | | | | | | | | | | | | | Rather than special casing them, use the standard mechanisms for tcg helper generation. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | tcg: Invert the inclusion of helper.hRichard Henderson2014-05-284-143/+166
|/ | | | | | | | | | Rather than include helper.h with N values of GEN_HELPER, include a secondary file that sets up the macros to include helper.h. This minimizes the files that must be rebuilt when changing the macros for file N. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
* Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell2014-05-283-3/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging Block pull request # gpg: Signature made Wed 28 May 2014 13:31:15 BST using RSA key ID 81AB73C8 # gpg: Can't check signature: public key not found * remotes/stefanha/tags/block-pull-request: (33 commits) block/sheepdog: Don't use qerror_report() block/sheepdog: Fix silent sd_open(), sd_create() failures block/sheepdog: Propagate errors to open and create methods block/sheepdog: Propagate errors through find_vdi_name() block/sheepdog: Propagate errors through do_sd_create() block/sheepdog: Propagate errors through sd_prealloc() block/sheepdog: Propagate errors through get_sheep_fd() block/sheepdog: Propagate errors through connect_to_sdog() block/vvfat: Propagate errors through init_directories() block/vvfat: Propagate errors through enable_write_target() block/ssh: Propagate errors to open and create methods block/ssh: Propagate errors through connect_to_ssh() block/ssh: Propagate errors through authenticate() block/ssh: Propagate errors through check_host_key() block/ssh: Drop superfluous libssh2_session_last_errno() calls block/rbd: Propagate errors to open and create methods qemu-nbd: Don't use qerror_report() blockdev: Don't use qerror_report() in do_drive_del() blockdev: Don't use qerror_report_err() in drive_init() docs: Define refcount_bits value ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * block: Add backing_blocker in BlockDriverStateFam Zheng2014-05-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This makes use of op_blocker and blocks all the operations except for commit target, on each BlockDriverState->backing_hd. The asserts for op_blocker in bdrv_swap are removed because with this change, the target of block commit has at least the backing blocker of its child, so the assertion is not true. Callers should do their check. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * block: Add bdrv_set_backing_hd()Fam Zheng2014-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | This is the common but non-trivial steps to assign or change the backing_hd of BDS. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * block: Replace in_use with operation blockerFam Zheng2014-05-283-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This drops BlockDriverState.in_use with op_blockers: - Call bdrv_op_block_all in place of bdrv_set_in_use(bs, 1). - Call bdrv_op_unblock_all in place of bdrv_set_in_use(bs, 0). - Check bdrv_op_is_blocked() in place of bdrv_in_use(bs). The specific types are used, e.g. in place of starting block backup, bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP, ...). There is one exception in block_job_create, where bdrv_op_blocker_is_empty() is used, because we don't know the operation type here. This doesn't matter because in a few commits away we will drop the check and move it to callers that _do_ know the type. - Check bdrv_op_blocker_is_empty() in place of assert(!bs->in_use). Note: there is only bdrv_op_block_all and bdrv_op_unblock_all callers at this moment. So although the checks are specific to op types, this changes can still be seen as identical logic with previously with in_use. The difference is error message are improved because of blocker error info. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * block: Introduce op_blockers to BlockDriverStateFam Zheng2014-05-282-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX elements. Each list is a list of blockers of an operation type (BlockOpType), that marks this BDS as currently blocked for a certain type of operation with reason errors stored in the list. The rule of usage is: * BDS user who wants to take an operation should check if there's any blocker of the type with bdrv_op_is_blocked(). * BDS user who wants to block certain types of operation, should call bdrv_op_block (or bdrv_op_block_all to block all types of operations, which is similar to the existing bdrv_set_in_use()). * A blocker is only referenced by op_blockers, so the lifecycle is managed by caller, and shouldn't be lost until unblock, so typically a caller does these: - Allocate a blocker with error_setg or similar, call bdrv_op_block() to block some operations. - Hold the blocker, do his job. - Unblock operations that it blocked, with the same reason pointer passed to bdrv_op_unblock(). - Release the blocker with error_free(). Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * block: Add BlockOpType enumFam Zheng2014-05-281-0/+19
| | | | | | | | | | | | | | | | | | | | | | This adds the enum of all the operations that can be taken on a block device. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | Merge remote-tracking branch 'remotes/kraxel/tags/pull-console-1' into stagingPeter Maydell2014-05-281-0/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | console: multiwindow support for text terminal QemuConsoles console: small fixes # gpg: Signature made Mon 26 May 2014 09:17:27 BST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found * remotes/kraxel/tags/pull-console-1: console: add kbd_put_keysym_console console: rework text terminal cursor logic console: update text terminal surface unconditionally console: nicer initial screen console: Abort on property access errors Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * console: add kbd_put_keysym_consoleGerd Hoffmann2014-05-261-0/+1
| | | | | | | | | | | | So you can send keysyms to a specific (text terminal) console. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-9' into stagingPeter Maydell2014-05-282-2/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | input: add event routing and multiseat support. input: misc bugfixes and minor improvements. # gpg: Signature made Mon 26 May 2014 07:44:29 BST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found * remotes/kraxel/tags/pull-input-9: docs: add multiseat.txt usb: add input routing support for tablet and keyboard sdl: pass key event source to input layer input: bind devices and input routing input: switch hid mouse and tablet to the new input layer api. input: switch hid keyboard to new input layer api. input: keymap: add meta keys input: add name to input_event_key_number input: add qemu_input_key_number_to_qcode input (curses): mask keycodes to remove modifier bits Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | input: bind devices and input routingGerd Hoffmann2014-05-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add function to bind input devices to display devices. Implementing input routing on top of this: Events coming from the display device in question are routed to the input device bound to it (if there is one). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | input: switch hid mouse and tablet to the new input layer api.Gerd Hoffmann2014-05-261-1/+0
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | input: switch hid keyboard to new input layer api.Gerd Hoffmann2014-05-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Minimal patch to get the switchover done. We continue processing ps/2 scancodes for now as they are part of the live migration stream. Fixing that, then mapping directly from QKeyValue to HID keycodes is left as excercise for another day. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | input: add qemu_input_key_number_to_qcodeGerd Hoffmann2014-05-261-0/+1
| |/ | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-05-26' ↵Peter Maydell2014-05-271-22/+23
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging trivial patches for 2014-05-26 # gpg: Signature made Mon 26 May 2014 08:17:08 BST using RSA key ID A4C3D7DB # gpg: Can't check signature: public key not found * remotes/mjt/tags/trivial-patches-2014-05-26: (23 commits) libcacard: remove useless initializers net: cadence_gem: Fix top comment bsd-user: replace fprintf(stderr, ...) with error_report() audio: replace fprintf(stderr, ...) with error_report() in audio libcacard: fix wrong array expansion logic libcacard/vcard_emul_nss: Drop a redundant conditional libcacard: Convert two leftover realloc() to GLib libcacard/vreader: Tighten assertion to clarify intent libcacard/vreader: Drop broken recovery from failed assertion libcacard: Plug memory leaks around vreader_get_reader_list() libcacard/vscclient: Bury some dead code vl: fix 'name' option to work with -readconfig configure: Put tempfiles in a subdir of the build directory dma-helpers: avoid calling dma_bdrv_unmap() twice arch_init: replace fprintf(stderr, ...) with error_report() pci: move dereferencing of root only after verifying valid root pointer jazz_led: Add missing break in switch case bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etc configure: Automatically select GTK+ 3.0 if GTK+ 2.0 is unavailable nbd: Miscellaneous typo fixes. ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etcPeter Maydell2014-05-241-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>
* | tcg-mips: Enable direct chaining of TBsRichard Henderson2014-05-241-2/+2
|/ | | | | | | | 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>
* Merge remote-tracking branch 'remotes/kraxel/tags/pull-chardev-2' into stagingPeter Maydell2014-05-221-6/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * error: error_is_set() is finally unused; removeMarkus Armbruster2014-05-211-6/+0
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20140520' into stagingPeter Maydell2014-05-224-13/+82
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some s390 patches: - Enable irqfds on s390 via the new adapter interrupt routing type. As a prereq, fix the kvm enable_cap helpers for some compilers and split the s390 flic into kvm and non-kvm parts. - Enable software and hardware debugging support on s390. This needs a kernel headers update. # gpg: Signature made Tue 20 May 2014 12:30:54 BST using RSA key ID C6F02FAF # gpg: Can't check signature: public key not found * remotes/cohuck/tags/s390x-20140520: s390x/kvm: hw debugging support via guest PER facility s390x/kvm: software breakpoint support s390x: remove duplicate definitions of DIAG 501 linux-headers: update s390x/virtio-ccw: wire up irq routing and irqfds s390x/virtio-ccw: reference-counted indicators s390x: add I/O adapter registration s390x: split flic into kvm and non-kvm parts kvm: Fix enable_cap helpers on older gcc Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | s390x/virtio-ccw: wire up irq routing and irqfdsCornelia Huck2014-05-204-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make use of the new s390 adapter irq routing support to enable real in-kernel irqfds for virtio-ccw with adapter interrupts. Note that s390 doesn't provide the common KVM_CAP_IRQCHIP capability, but rather needs KVM_CAP_S390_IRQCHIP to be enabled. This is to ensure backward compatibility. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * | s390x: add I/O adapter registrationCornelia Huck2014-05-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Register an I/O adapter interrupt source for when virtio-ccw devices start using adapter interrupts. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * | s390x: split flic into kvm and non-kvm partsCornelia Huck2014-05-201-11/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a common parent class for both cases, where kvm and non-kvm can hook up callbacks. This will be used by follow-on patches for adapter registration and mapping. We now always have a flic, regardless of whether we use kvm; the non-kvm implementation just doesn't do anything. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
| * | kvm: Fix enable_cap helpers on older gccAlexander Graf2014-05-201-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6) seem to choke on signedness detection in inline created variables: target-ppc/kvm.c: In function 'kvmppc_booke_watchdog_enable': target-ppc/kvm.c:1302:21: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] target-ppc/kvm.c: In function 'kvmppc_set_papr': target-ppc/kvm.c:1504:21: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] However - thanks to Thomas Huth for the suggestion - we can just cast the offending potentially 0 value to a signed type, making the comparison signed. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* | Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell2014-05-204-4/+12
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block patches # gpg: Signature made Mon 19 May 2014 15:21:14 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (22 commits) block: optimize zero writes with bdrv_write_zeroes blockdev: add a function to parse enum ids from strings util: add qemu_iovec_is_zero qcow1: Stricter backing file length check qcow1: Validate image size (CVE-2014-0223) qcow1: Validate L2 table size (CVE-2014-0222) qcow1: Check maximum cluster size qcow1: Make padding in the header explicit curl: Add usage documentation curl: Add sslverify option curl: Remove broken parsing of options from url curl: Fix build when curl_multi_socket_action isn't available qemu-iotests: Fix blkdebug in VM drive in 030 qemu-iotests: Fix core dump suppression in test 039 iotests: Add test for the JSON protocol block: Allow JSON filenames check-qdict: Add test for qdict_join() qdict: Add qdict_join() block: add test for vhdx image created by Disk2VHD block: vhdx - account for identical header sections ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * block: optimize zero writes with bdrv_write_zeroesPeter Lieven2014-05-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this patch tries to optimize zero write requests by automatically using bdrv_write_zeroes if it is supported by the format. This significantly speeds up file system initialization and should speed zero write test used to test backend storage performance. I ran the following 2 tests on my internal SSD with a 50G QCOW2 container and on an attached iSCSI storage. a) mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/vdX QCOW2 [off] [on] [unmap] ----- runtime: 14secs 1.1secs 1.1secs filesize: 937M 18M 18M iSCSI [off] [on] [unmap] ---- runtime: 9.3s 0.9s 0.9s b) dd if=/dev/zero of=/dev/vdX bs=1M oflag=direct QCOW2 [off] [on] [unmap] ----- runtime: 246secs 18secs 18secs filesize: 51G 192K 192K throughput: 203M/s 2.3G/s 2.3G/s iSCSI* [off] [on] [unmap] ---- runtime: 8mins 45secs 33secs throughput: 106M/s 1.2G/s 1.6G/s allocated: 100% 100% 0% * The storage was connected via an 1Gbit interface. It seems to internally handle writing zeroes via WRITESAME16 very fast. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * util: add qemu_iovec_is_zeroPeter Lieven2014-05-191-0/+1
| | | | | | | | | | Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qdict: Add qdict_join()Max Reitz2014-05-191-0/+3
| | | | | | | | | | | | | | | | | | This function joins two QDicts by absorbing one into the other. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: Fix bdrv_is_allocated() for short backing filesKevin Wolf2014-05-191-4/+7
| | | | | | | | | | | | | | | | | | bdrv_is_allocated() shouldn't return true for sectors that are unallocated, but after the end of a short backing file, even though such sectors are (correctly) marked as containing zeros. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* | Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell2014-05-192-9/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/qmp-unstable/queue/qmp: qapi: skip redundant includes monitor: Add netdev_del id argument completion. monitor: Add netdev_add type argument completion. monitor: Add set_link arguments completion. monitor: Add chardev-add backend argument completion. monitor: Add chardev-remove command completion. monitor: Convert sendkey to use command_completion. qapi: Show qapi-commands.py invocation in qapi-code-gen.txt qapi: Replace uncommon use of the error API by the common one tests: Don't call visit_end_struct() after visit_start_struct() fails hw: Don't call visit_end_struct() after visit_start_struct() fails hmp: Call visit_end_struct() after visit_start_struct() succeeds qapi: Un-inline visit of implicit struct qapi-visit.py: Clean up a sloppy use of field prefix qapi: Clean up shadowing of parameters and locals in inner scopes qapi-visit.py: Clean up confusing push_indent() / pop_indent() use qapi: Replace start_optional()/end_optional() by optional() qapi: Remove unused Visitor callbacks start_handle(), end_handle() qapi: Normalize marshalling's visitor initialization and cleanup qapi: Update qapi-code-gen.txt example to match current code Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | qapi: Replace start_optional()/end_optional() by optional()Markus Armbruster2014-05-152-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Semantics of end_optional() differ subtly from the other end_FOO() callbacks: when start_FOO() succeeds, the matching end_FOO() gets called regardless of what happens in between. end_optional() gets called only when everything in between succeeds as well. Entirely undocumented, like all of the visitor API. The only user of Visitor Callback end_optional() never did anything, and was removed in commit 9f9ab46. I'm about to clean up error handling in the generated visitor code, and end_optional() is in my way. No users mean no test cases, and making non-trivial cleanup transformations without test cases doesn't strike me as a good idea. Drop end_optional(), and rename start_optional() to optional(). We can always go back to a pair of callbacks when we have an actual need. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi: Remove unused Visitor callbacks start_handle(), end_handle()Markus Armbruster2014-05-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | These have never been called or implemented by anything, and their intended use is undocumented, like all of the visitor API. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | | input: add qemu_input_handler_deactivateGerd Hoffmann2014-05-161-0/+1
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | input: key mapping helpersGerd Hoffmann2014-05-161-0/+4
| |/ |/| | | | | | | | | | | | | Add helper functions to translate KeyValue (qapi key representation) into other representations: traditional qemu key numbers, qapi key codes (Q_KEY_CODE_*) and scancode sequences. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-s390-20140515' into ↵Peter Maydell2014-05-151-0/+9
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging tcg/s390 updates # gpg: Signature made Thu 15 May 2014 17:24:40 BST using RSA key ID 4DD0279B # gpg: Can't check signature: public key not found * remotes/rth/tags/pull-tcg-s390-20140515: tcg-s390: Implement direct chaining of TBs tcg-s390: Don't force -march=z990 tcg-s390: Improve setcond tcg-s390: Allow immediate operands to add2 and sub2 tcg-s390: Implement tcg_register_jit tcg-s390: Use more risbg in the tlb sequence tcg-s390: Move ldst helpers out of line tcg-s390: Convert to new ldst opcodes tcg-s390: Integrate endianness into TCGMemOp tcg-s390: Convert to TCGMemOp tcg-s390: Fix off-by-one in wraparound andi Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * tcg-s390: Implement direct chaining of TBsRichard Henderson2014-05-151-0/+9
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* | Merge remote-tracking branch 'remotes/kvm/uq/master' into stagingPeter Maydell2014-05-152-5/+25
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/kvm/uq/master: pc: port 92 reset requires a low->high transition cpu: make CPU_INTERRUPT_RESET available on all targets apic: do not accept SIPI on the bootstrap processor target-i386: preserve FPU and MSR state on INIT target-i386: fix set of registers zeroed on reset kvm: forward INIT signals coming from the chipset kvm: reset state from the CPU's reset method target-i386: the x86 CPL is stored in CS.selector - auto update hflags accordingly. target-i386: set eflags prior to calling cpu_x86_load_seg_cache() in seg_helper.c target-i386: set eflags and cr0 prior to calling cpu_x86_load_seg_cache() in smm_helper.c target-i386: set eflags prior to calling svm_load_seg_cache() in svm_helper.c pci-assign: limit # of msix vectors pci-assign: Fix a bug when map MSI-X table memory failed kvm: make one_reg helpers available for everyone target-i386: Remove unused data from local array Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * cpu: make CPU_INTERRUPT_RESET available on all targetsPaolo Bonzini2014-05-131-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the x86, some devices need access to the CPU reset pin (INIT#). Provide a generic service to do this, using one of the internal cpu_interrupt targets. Generalize the PPC-specific code for CPU_INTERRUPT_RESET to other targets. Since PPC does not support migration across QEMU versions (its machine types are not versioned yet), I picked the value that is used on x86, CPU_INTERRUPT_TGT_INT_1. Consequently, TGT_INT_2 and TGT_INT_3 are shifted down by one while keeping their value. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud