aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-11-20Update version for v2.5.0-rc1 releasev2.5.0-rc1Peter Maydell1-1/+1
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-20tests: fix cdrom_pio_impl in ide-testPeter Lieven1-8/+8
The check for the cleared BSY flag has to be performed before each data transfer and not just before the first one. Commit 5f81724d revealed this glitch as the BSY flag was not set in ATAPI PIO transfers before. While at it fix the descriptions and add a comment before the nested for loop that transfers the data. Signed-off-by: Peter Lieven <pl@kamp.de> Message-id: 1448029742-19771-1-git-send-email-pl@kamp.de Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-19Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' ↵Peter Maydell9-53/+388
into staging QOM infrastructure fixes and device conversions * Fix for properties on objects > 4 GiB * Performance improvements for QOM property handling * Assertion cleanups * MAINTAINERS additions # gpg: Signature made Thu 19 Nov 2015 14:32:16 GMT using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/qom-devices-for-peter: MAINTAINERS: Add check-qom-{interface,proplist} to QOM qom: Clean up assertions to display values on failure qom: Replace object property list with GHashTable qom: Add a test case for complex property finalization net: Convert net filter code to use object property iterators ppc: Convert spapr code to use object property iterators vl: Convert machine help code to use object property iterators qmp: Convert QMP code to use object property iterators qom: Introduce ObjectPropertyIterator struct for iteration qdev: Change Property::offset field to ptrdiff_t type Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-19Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell14-85/+311
vhost, pc: fixes for 2.5 Fixes all over the place. This also re-enables a test we disabled in 2.5 cycle now that there's a way not to get a warning from it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Thu 19 Nov 2015 13:27:43 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: exec: silence hugetlbfs warning under qtest tests: re-enable vhost-user-test acpi: fix buffer overrun on migration vhost-user: fix log size vhost-user: ignore qemu-only features specs/vhost-user: fix spec to match reality tests/vhost-user-bridge: implement logging of dirty pages i440fx: print an error message if user tries to enable iommu q35: Check propery to determine if iommu is set vhost-user: start/stop all rings vhost-user: print original request on error vhost-user-test: support VHOST_USER_SET_VRING_ENABLE vhost-user: update spec description vhost: don't send RESET_OWNER at stop vhost: let SET_VRING_ENABLE message depends on protocol feature Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-19Merge remote-tracking branch ↵Peter Maydell2-2/+4
'remotes/pmaydell/tags/pull-target-arm-20151119' into staging target-arm queue: * add missing condexec updates when emulating architectural breakpoints and coprocessor access checks in Thumb translation (could in theory cause problems when these happened inside a Thumb IT block and an exception was taken) * arm_gic: correctly restore nested IRQ priority # gpg: Signature made Thu 19 Nov 2015 13:29:37 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" * remotes/pmaydell/tags/pull-target-arm-20151119: target-arm: Update condexec before arch BP check in AA32 translation target-arm: Update condexec before CP access check in AA32 translation hw/arm_gic: Correctly restore nested irq priority Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-19Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151119' ↵Peter Maydell5-152/+217
into staging migration/next for 20151119 # gpg: Signature made Thu 19 Nov 2015 11:17:07 GMT using RSA key ID 5872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" # gpg: aka "Juan Quintela <quintela@trasno.org>" * remotes/juanquintela/tags/migration/20151119: migration: normalize locking in migration/savevm.c migration: implement bdrv_all_find_vmstate_bs helper migration: reorder processing in hmp_savevm snapshot: create bdrv_all_create_snapshot helper migration: drop find_vmstate_bs check in hmp_delvm snapshot: create bdrv_all_find_snapshot helper migration: factor our snapshottability check in load_vmstate snapshot: create bdrv_all_goto_snapshot helper snapshot: create bdrv_all_delete_snapshot helper snapshot: return error code from bdrv_snapshot_delete_by_id_or_name snapshot: create helper to test that block drivers supports snapshots Unneeded NULL check migration: Dead assignment of current_time Set last_sent_block Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-19MAINTAINERS: Add check-qom-{interface,proplist} to QOMAndreas Färber1-0/+2
Add the QOM unit tests to the QOM maintenance area so that maintainers get CC'ed on changes and to document QOM test coverage. Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-19qom: Clean up assertions to display values on failureAndreas Färber1-6/+6
Instead of using g_assert() for integer comparisons, use g_assert_cmpint() so that we can see the respective values. While at it, fix one stray indentation. Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-19qom: Replace object property list with GHashTablePavel Fedin2-47/+83
ARM GICv3 systems with large number of CPUs create lots of IRQ pins. Since every pin is represented as a property, number of these properties becomes very large. Every property add first makes sure there's no duplicates. Traversing the list becomes very slow, therefore QEMU initialization takes significant time (several seconds for e. g. 16 CPUs). This patch replaces list with GHashTable, making lookup very fast. The only drawback is that object_child_foreach() and object_child_foreach_recursive() cannot add or remove properties during traversal, since GHashTableIter does not have modify-safe version. However, the code seems not to modify objects via these functions. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Pavel Fedin <p.fedin@samsung.com> [AF: Fixed object_property_del_{all,child}() issues; g_hash_table_contains() -> g_hash_table_lookup(), suggested by Daniel] Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-19exec: silence hugetlbfs warning under qtestMarc-André Lureau2-15/+18
vhost-user-test prints a warning. A test should not need to run on hugetlbfs, let's silence the warning under qtest. The condition can't check on qtest_enabled() since vhost-user-test actually doesn't use qtest accel. However, qtest_driver() can be used, if qtest_init() is called early enough. For that reason, move chardev and qtest initialization early. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-19tests: re-enable vhost-user-testMarc-André Lureau2-2/+4
Commit 7fe34ca9c2e actually disabled vhost-user-test altogether, since CONFIG_VHOST_NET is a per-target config variable. tests/vhost-user-test is already x86/x64 softmmu specific test, in order to enable it correctly, kvm & vhost-net are also conditions. To check that, set CONFIG_VHOST_NET_TEST_$target when kvm is also enabled. Since "check-qtest-x86_64-y = $(check-qtest-i386-y)", avoid duplication when both x86 & x64 are enabled. Other targets than x86 aren't enabled yet, and is intentionally left as a future improvement, since I can't easily test those. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-19acpi: fix buffer overrun on migrationMichael S. Tsirkin1-2/+6
ich calls acpi_gpe_init with length ICH9_PMIO_GPE0_LEN so ICH9_PMIO_GPE0_LEN/2 bytes are allocated, but then the full ICH9_PMIO_GPE0_LEN bytes are migrated. As a quick work-around, allocate twice the memory. We'll probably want to tweak code to avoid migrating the extra ICH9_PMIO_GPE0_LEN/2 bytes, but that is a bit trickier to do without breaking migration compatibility. Tested-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Reported-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-19target-arm: Update condexec before arch BP check in AA32 translationSergey Fedorov1-0/+1
Architectural breakpoint check could raise an exceptions, thus condexec bits should be updated before calling gen_helper_check_breakpoints(). Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Message-id: 1447767527-21268-3-git-send-email-serge.fdrv@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-19target-arm: Update condexec before CP access check in AA32 translationSergey Fedorov1-0/+1
Coprocessor access instructions are allowed inside IT block. gen_helper_access_check_cp_reg() can raise an exceptions thus condexec bits should be updated before. Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com> Message-id: 1447767527-21268-2-git-send-email-serge.fdrv@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-19hw/arm_gic: Correctly restore nested irq priorityFrançois Baldassari1-2/+2
Upon activating an interrupt, set the corresponding priority bit in the APR/NSAPR registers without touching the currently set bits. In the event of nested interrupts, the GIC will then have the information it needs to restore the priority of the pre-empted interrupt once the higher priority interrupt finishes execution. Signed-off-by: François Baldassari <francois@pebble.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-19migration: normalize locking in migration/savevm.cDenis V. Lunev1-1/+18
basically all bdrv_* operations must be called under aio_context_acquire except ones with bdrv_all prefix. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> CC: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19migration: implement bdrv_all_find_vmstate_bs helperDenis V. Lunev3-15/+21
The patch also ensures proper locking for the operation. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19migration: reorder processing in hmp_savevmDenis V. Lunev1-9/+9
State deletion can be performed on running VM which reduces VM downtime This approach looks a bit more natural. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19snapshot: create bdrv_all_create_snapshot helperDenis V. Lunev3-13/+34
to create snapshot for all loaded block drivers. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19migration: drop find_vmstate_bs check in hmp_delvmDenis V. Lunev1-5/+0
There is no much sense to do the check and write warning. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19snapshot: create bdrv_all_find_snapshot helperDenis V. Lunev3-33/+30
to check that snapshot is available for all loaded block drivers. The check bs != bs1 in hmp_info_snapshots is an optimization. The check for availability of this snapshot will return always true as the list of snapshots was collected from that image. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19migration: factor our snapshottability check in load_vmstateDenis V. Lunev1-8/+7
We should check that all inserted and not read-only images support snapshotting. This could be made using already invented helper bdrv_all_can_snapshot(). Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19snapshot: create bdrv_all_goto_snapshot helperDenis V. Lunev3-10/+26
to switch to snapshot on all loaded block drivers. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19snapshot: create bdrv_all_delete_snapshot helperDenis V. Lunev3-44/+34
to delete snapshots from all loaded block drivers. The patch also ensures proper locking. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19snapshot: return error code from bdrv_snapshot_delete_by_id_or_nameDenis V. Lunev2-6/+7
this will make code better in the next patch Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19snapshot: create helper to test that block drivers supports snapshotsDenis V. Lunev3-13/+36
The patch enforces proper locking for this operation. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19Unneeded NULL checkDr. David Alan Gilbert1-1/+1
The check is unneccesary, we read the value at the start of the thread, use it, and never change it. The value is checked to be non-NULL before thread creation. Spotted by coverity, CID 1339211 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19migration: Dead assignment of current_timeDr. David Alan Gilbert1-1/+0
I set current_time before the postcopy test but never use it; (I think this was from the original version where it was time based). Spotted by coverity, CID 1339208 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-19Set last_sent_blockDr. David Alan Gilbert1-0/+1
In a82d593b61054b3dea43 I accidentally removed the setting of last_sent_block, put it back. Symptoms: Multithreaded compression only uses one thread. Migration is a bit less efficient since it won't use 'cont' flags. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Fixes: a82d593b61054b3dea43 Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-18qom: Add a test case for complex property finalizationDaniel P. Berrange1-0/+159
Devices have some quite complex object child/link relationships which place some requirements on the object_property_del_all() function to consider that properties can be modified while being iterated over. This extends the QOM property test case to replicate the device like structure and expose any potential bugs in the object_property_del_all() function. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-18net: Convert net filter code to use object property iteratorsDaniel P. Berrange1-1/+4
Stop directly accessing the Object::properties field data structure and instead use the formal object property iterator APIs. This insulates the code from future data structure changes in the Object struct. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-18ppc: Convert spapr code to use object property iteratorsDaniel P. Berrange1-1/+4
Stop directly accessing the Object::properties field data structure and instead use the formal object property iterator APIs. This insulates the code from future data structure changes in the Object struct. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-18vl: Convert machine help code to use object property iteratorsDaniel P. Berrange1-1/+4
Stop directly accessing the Object::properties field data structure and instead use the formal object property iterator APIs. This insulates the code from future data structure changes in the Object struct. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-18qmp: Convert QMP code to use object property iteratorsDaniel P. Berrange1-2/+8
Stop directly accessing the Object::properties field data structure and instead use the formal object property iterator APIs. This insulates the code from future data structure changes in the Object struct. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Pavel Fedin <p.fedin@samsung.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-18qom: Introduce ObjectPropertyIterator struct for iterationDaniel P. Berrange3-0/+123
Some users of QOM need to be able to iterate over properties defined against an object instance. Currently they are just directly using the QTAIL macros against the object properties data structure. This is bad because it exposes them to changes in the data structure used to store properties, as well as changes in functionality such as ability to register properties against the class. This provides an ObjectPropertyIterator struct which will insulate the callers from the particular data structure used to store properties. It can be used thus ObjectProperty *prop; ObjectPropertyIterator *iter; iter = object_property_iter_init(obj); while ((prop = object_property_iter_next(iter))) { ... do something with prop ... } object_property_iter_free(iter); Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Tested-by: Pavel Fedin <p.fedin@samsung.com> [AF: Fixed examples, style cleanups] Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-18qdev: Change Property::offset field to ptrdiff_t typeIldar Isaev1-1/+1
Property::offset field is calculated as a diff between two pointers: arrayprop->prop.offset = eltptr - (void *)dev; If offset is declared as int, this subtraction can cause type overflow, thus leading to failure of the subsequent assertion: assert(qdev_get_prop_ptr(dev, &arrayprop->prop) == eltptr); So ptrdiff_t should be used instead. Signed-off-by: Ildar Isaev <ild@inbox.ru> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-11-18Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell3-3/+8
Block layer patches # gpg: Signature made Wed 18 Nov 2015 15:28:32 GMT using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: block: Call external_snapshot_clean after blockdev-snapshot blockdev: Add missing bdrv_unref() in drive-backup iotests: fix race in 030 nand: fix address overflow Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-18vhost-user: fix log sizeMichael S. Tsirkin1-1/+1
commit 2b8819c6eee517c1582983773f8555bb3f9ed645 ("vhost-user: modify SET_LOG_BASE to pass mmap size and offset") passes log size in units of 4 byte chunks instead of the expected size in bytes. Fix this up. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-18vhost-user: ignore qemu-only featuresMichael S. Tsirkin1-7/+1
Some features (such as ctrl vq) are supported by qemu without need to communicate with the backend. Drop them from the feature mask so we set them unconditionally. Reported-by: Victor Kaplansky <vkaplans@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-11-18Merge remote-tracking branch ↵Peter Maydell3-3/+10
'remotes/berrange/tags/qcrypto-fixes-20151118-1' into staging Pull qcrypto fixes 2015/11/18 v1 # gpg: Signature made Wed 18 Nov 2015 15:44:07 GMT using RSA key ID 15104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" * remotes/berrange/tags/qcrypto-fixes-20151118-1: crypto: avoid passing NULL to access() syscall crypto: fix leaks in TLS x509 helper functions crypto: fix mistaken setting of Error in success code path crypto: fix leak of gnutls_dh_params_t data on credential unload Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-18crypto: avoid passing NULL to access() syscallDaniel P. Berrange1-1/+2
The qcrypto_tls_creds_x509_sanity_check() checks whether certs exist by calling access(). It is valid for this method to be invoked with certfile==NULL though, since for client credentials the cert is optional. This caused it to call access(NULL), which happens to be harmless on current Linux, but should none the less be avoided. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-11-18Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-11-18' ↵Kevin Wolf1-0/+1
into queue-block One block patch for qemu 2.5-rc1. # gpg: Signature made Wed Nov 18 16:26:59 2015 CET using RSA key ID E838ACAD # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" * mreitz/tags/pull-block-for-kevin-2015-11-18: block: Call external_snapshot_clean after blockdev-snapshot Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-18block: Call external_snapshot_clean after blockdev-snapshotAlberto Garcia1-0/+1
Otherwise the AioContext will never be released. Signed-off-by: Alberto Garcia <berto@igalia.com> Message-id: 1447419624-21918-1-git-send-email-berto@igalia.com Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2015-11-18blockdev: Add missing bdrv_unref() in drive-backupMax Reitz1-0/+1
All error paths after a successful bdrv_open() of target_bs should contain a bdrv_unref(target_bs). This one did not yet, so add it. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-18crypto: fix leaks in TLS x509 helper functionsDaniel P. Berrange1-0/+2
The test_tls_get_ipaddr() method forgot to free the returned data from getaddrinfo(). The test_tls_write_cert_chain() method forgot to free the allocated buffer holding the certificate data after writing it out to a file. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-11-18crypto: fix mistaken setting of Error in success code pathDaniel P. Berrange1-2/+2
The qcrypto_tls_session_check_certificate() method was setting an Error even when the ACL check suceeded. This didn't affect the callers detection of errors because they relied on the function return status, but this did cause a memory leak since the caller would not free an Error they did not expect to be set. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-11-18crypto: fix leak of gnutls_dh_params_t data on credential unloadDaniel P. Berrange1-0/+4
The QCryptoTLSCredsX509 object was not free'ing the allocated gnutls_dh_params_t data when unloading the credentials Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-11-18iotests: fix race in 030John Snow1-1/+4
the stop_test case tests that we can resume a block-stream command after it has stopped/paused due to error. We cannot always reliably query it before it finishes after resume, though, so make this a conditional. The important thing is that we are still testing that it has stopped, and that it finishes successfully after we send a resume command. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-18nand: fix address overflowRabin Vincent1-2/+2
The shifts of the address mask and value shift beyond 32 bits when there are 5 address cycles. Cc: qemu-stable@nongnu.org Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-18Merge remote-tracking branch ↵Peter Maydell2-2/+8
'remotes/mdroth/tags/qga-pull-2015-11-13-v2-tag' into staging qemu-ga patch queue for 2.5 * fixes for guest-exec gspawn() usage: - inherit default lookup path by default instead of explicitly defining it as being empty. - don't inherit default PATH when PATH/ENV are explicit v2: * added fix for w32 'make install' target * added version check for new g_spawn() flag # gpg: Signature made Tue 17 Nov 2015 22:33:03 GMT using RSA key ID F108B584 # gpg: Good signature from "Michael Roth <flukshun@gmail.com>" # gpg: aka "Michael Roth <mdroth@utexas.edu>" # gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>" * remotes/mdroth/tags/qga-pull-2015-11-13-v2-tag: makefile: fix w32 install target for qemu-ga qga: allow to lookup in PATH from the passed envp for guest-exec qga: fix for default env processing for guest-exec Signed-off-by: Peter Maydell <peter.maydell@linaro.org>