summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tcg: mark tcg_out* and tcg_patch* with attribute 'unused'Peter Maydell2014-06-241-8/+12
| | | | | | | | | The tcg_out* and tcg_patch* functions are utility routines that may or may not be used by a particular backend; mark them with the 'unused' attribute to suppress spurious warnings if they aren't used. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* rng-random: NULL check not needed before g_free()Eduardo Habkost2014-06-241-4/+1
| | | | | | | | g_free() is NULL-safe. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* block.c: Remove useless 'buf' variableChen Gang2014-06-241-2/+0
| | | | | | | | 'buf' is not used actually, so remove it and related snprintf() statement. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* vscclient: Add required headers to fix build on FreeBSDEd Maste2014-06-241-0/+2
| | | | | | Signed-off-by: Ed Maste <emaste@freebsd.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* target-ppc: Fix compiler warningStefan Weil2014-06-241-2/+1
| | | | | | | | | | | | | | | | | | gcc reports a warning which is usually wrong: target-ppc/dfp_helper.c: In function ‘dfp_get_digit’: target-ppc/dfp_helper.c:417:1: warning: control reaches end of non-void function [-Wreturn-type] The compiler shows the warning if assert is not marked with the noreturn attribute or if the code is compiled with -DNDEBUG. Using g_assert_not_reached better documents the intention and does not have these problems. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* configure: Enable TPM by default, add --disable-tpmCole Robinson2014-06-241-1/+4
| | | | | | | | | | | I don't see why tpm is disabled by default: it doesn't have any external dependencies, or change default behavior. Leaving it disabled is just going to cause it to bit rot. Enable it by default, and add a --disable-tpm option. Signed-off-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Fix new typos (found by codespell)Stefan Weil2014-06-246-7/+7
| | | | | | | | | | | | * accomodate -> accommodate * aquiring -> acquiring * beacuse -> because * loosing -> losing * prefering -> preferring * threshhold -> threshold Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* virtio-serial: remove useless set_config functionPaolo Bonzini2014-06-241-8/+0
| | | | | | | | Its only contents are a dead memcpy. Since it is optional, drop the function altogether. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140623' ↵Peter Maydell2014-06-2411-76/+2872
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging migration/next for 20140623 # gpg: Signature made Mon 23 Jun 2014 18:18:57 BST using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * remotes/juanquintela/tags/migration/20140623: (22 commits) vmstate: Refactor & increase tests for primitive types vmstate: Return error in case of error migration: Remove unneeded minimum_version_id_old tests: vmstate static checker: add size mismatch inside substructure tests: vmstate static checker: add substructure for usb-kbd for hid section tests: vmstate static checker: remove Subsections tests: vmstate static checker: remove a subsection tests: vmstate static checker: remove Description inside Fields tests: vmstate static checker: remove Description tests: vmstate static checker: remove Fields tests: vmstate static checker: change description name tests: vmstate static checker: remove last field in a struct tests: vmstate static checker: remove a field tests: vmstate static checker: remove a section tests: vmstate static checker: minimum_version_id check tests: vmstate static checker: version mismatch inside a Description tests: vmstate static checker: add version error in main section tests: vmstate static checker: incompat machine types tests: vmstate static checker: add dump1 and dump2 files vmstate-static-checker: script to validate vmstate changes ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * vmstate: Refactor & increase tests for primitive typesJuan Quintela2014-06-231-61/+212
| | | | | | | | | | | | | | | | This commit refactor the simple tests to test all integer types. We move to hex because it is easier to read values of different types. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
| * vmstate: Return error in case of errorJuan Quintela2014-06-231-0/+4
| | | | | | | | | | | | | | | | | | If there is an error while loading a field, we should stop reading and not continue with the rest of fields. And we should also set an error in qemu_file. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
| * migration: Remove unneeded minimum_version_id_oldJuan Quintela2014-06-231-5/+2
| | | | | | | | | | | | | | Once there, make checkpatch happy. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
| * tests: vmstate static checker: add size mismatch inside substructureAmit Shah2014-06-231-1/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: add substructure for usb-kbd for hid sectionAmit Shah2014-06-231-51/+64
| | | | | | | | | | | | | | | | | | This shows how the script deals with substructures added to vmstate descriptions that don't change the on-wire format. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: remove SubsectionsAmit Shah2014-06-231-15/+0
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: remove a subsectionAmit Shah2014-06-231-13/+0
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: remove Description inside FieldsAmit Shah2014-06-231-26/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: remove DescriptionAmit Shah2014-06-231-32/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: remove FieldsAmit Shah2014-06-231-113/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: change description nameAmit Shah2014-06-231-1/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: remove last field in a structAmit Shah2014-06-231-6/+0
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: remove a fieldAmit Shah2014-06-231-6/+0
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: remove a sectionAmit Shah2014-06-231-1/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: minimum_version_id checkAmit Shah2014-06-231-1/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: version mismatch inside a DescriptionAmit Shah2014-06-231-1/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: add version error in main sectionAmit Shah2014-06-231-1/+1
| | | | | | | | | | | | Signed-off-by: Amit Shah <amit.shah@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: incompat machine typesAmit Shah2014-06-231-1/+1
| | | | | | | | | | | | | | | | | | This commit modifies the dump2 data to flag incompatibilities in the machine types being compared. Signed-off-by: Amit Shah <amit.shah@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * tests: vmstate static checker: add dump1 and dump2 filesAmit Shah2014-06-232-0/+2326
| | | | | | | | | | | | | | | | | | | | | | These are stripped-down JSON data as obtained from the -dump-vmstate option. The two files are identical in this commit, and will be modified in the later commits to show what the script does with the data. Signed-off-by: Amit Shah <amit.shah@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * vmstate-static-checker: script to validate vmstate changesAmit Shah2014-06-231-0/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script compares the vmstate dumps in JSON format as output by QEMU with the -dump-vmstate option. It flags various errors, like version mismatch, sections going away, size mismatches, etc. This script is tolerant of a few changes that do not change the on-wire format, like embedding a few fields within substructs. The script takes -s/--src and -d/--dest parameters, to which filenames are given as arguments. Example: (in a qemu 2.0 tree): ./x86_64-softmmu/qemu-system-x86_64 -dump-vmstate qemu-2.0.json (in a qemu 2.2 tree:) ./x86_64-softmmu/qemu-system-x86_64 -dump-vmstate -M pc-i440fx-2.0 \ qemu-2.2-m2.0.json ./scripts/vmstate-static-checker.py -s qemu-2.0.json -d qemu-2.2-m2.0.json The script also takes a --reverse parameter to switch the src and dest jsons. This is just a shorthand for reversing the src and dest. The --help parameter shows usage information. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * migration: dump vmstate info as a json file for static analysisAmit Shah2014-06-234-0/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a new command, '-dump-vmstate', that takes a filename as an argument. When executed, QEMU will dump the vmstate information for the machine type it's invoked with to the file, and quit. The JSON-format output can then be used to compare the vmstate info for different QEMU versions, specifically to test whether live migration would break due to changes in the vmstate data. A Python script that compares the output of such JSON dumps is included in the following commit. Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
| * rdma: bug fixesMichael R. Hines2014-06-231-10/+10
| | | | | | | | | | | | | | | | | | | | | | 1. Fix small memory leak in parsing inet address from command line in data_init() 2. Fix ibv_post_send() return value check and pass error code back up correctly. 3. Fix rdma_destroy_qp() segfault after failure to connect to destination. Reported-by: frank.yangjie@gmail.com Reported-by: dgilbert@redhat.com Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
* | Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell2014-06-2475-1316/+2050
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/qmp-unstable/queue/qmp: (43 commits) monitor: protect event emission monitor: protect outbuf and mux_out with mutex qemu-char: make writes thread-safe qemu-char: move pty_chr_update_read_handler around qemu-char: do not call chr_write directly qemu-char: introduce qemu_chr_alloc qapi event: clean up qapi event: convert QUORUM events qapi event: convert GUEST_PANICKED qapi event: convert BALLOON_CHANGE qmp: convert ACPI_DEVICE_OST event qapi event: convert SPICE events qapi event: convert VNC events qapi event: convert NIC_RX_FILTER_CHANGED qapi event: convert other BLOCK_JOB events qapi event: convert BLOCK_IMAGE_CORRUPTED qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR qapi event: convert DEVICE_TRAY_MOVED qapi event: convert DEVICE_DELETED qapi event: convert WATCHDOG ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | monitor: protect event emissionPaolo Bonzini2014-06-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Event emission must be protected by a mutex because of access to the shared rate-limiting state, and to guard against concurrent monitor "hot-plug" by means of human-monitor-command. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | monitor: protect outbuf and mux_out with mutexPaolo Bonzini2014-06-231-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | This lets the block layer emit QMP events from outside the I/O thread. Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qemu-char: make writes thread-safePaolo Bonzini2014-06-232-16/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will let threads other than the I/O thread raise QMP events. GIOChannel is thread-safe, and send and receive state is usually well-separated. The only driver that requires some care is the pty driver, where some of the state is shared by the read and write sides. That state is protected with the chr_write_lock too. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qemu-char: move pty_chr_update_read_handler aroundPaolo Bonzini2014-06-231-16/+16
| | | | | | | | | | | | | | | | | | Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qemu-char: do not call chr_write directlyPaolo Bonzini2014-06-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make the mux always go through qemu_chr_fe_write, so that we'll get the mutex for the underlying chardev. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qemu-char: introduce qemu_chr_allocPaolo Bonzini2014-06-236-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | The next patch will modify this function to initialize state that is common to all backends. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: clean upWenchao Xia2014-06-234-263/+4
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert QUORUM eventsWenchao Xia2014-06-234-61/+49
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert GUEST_PANICKEDWenchao Xia2014-06-235-31/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'monitor.h' is still included in target-s390x/kvm.c, since I have no good way to verify whether other code need it on my x86 host. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert BALLOON_CHANGEWenchao Xia2014-06-236-36/+18
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qmp: convert ACPI_DEVICE_OST eventIgor Mammedov2014-06-235-40/+18
| | | | | | | | | | | | | | | | | | | | | ... using new QAPI event infrastructure Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert SPICE eventsWenchao Xia2014-06-235-107/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPICE_INITIALIZED, SPICE_CONNECTED, SPICE_DISCONNECTED and SPICE_MIGRATE_COMPLETED are converted in one patch, since they use some common functions. inet_strfamily() is removed since no callers exist anymore. Note that there is no existing doc for SPICE_MIGRATE_COMPLETED in docs/qmp/qmp-events.txt before this patch. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert VNC eventsWenchao Xia2014-06-234-146/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since VNC_CONNECTED, VNC_DISCONNECTED, VNC_INITIALIZED share some common functions, convert them in one patch. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert NIC_RX_FILTER_CHANGEDWenchao Xia2014-06-233-27/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Param name is declared as optional, since in code it is an optional one. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert other BLOCK_JOB eventsWenchao Xia2014-06-236-99/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are related, convert them in one patch. The block_job_event_* functions are used to keep encapsulation of BlockJob structure. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert BLOCK_IMAGE_CORRUPTEDWenchao Xia2014-06-233-28/+32
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERRORWenchao Xia2014-06-236-84/+66
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | qapi event: convert DEVICE_TRAY_MOVEDWenchao Xia2014-06-233-32/+21
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
OpenPOWER on IntegriCloud