Commit Graph

42433 Commits

Author SHA1 Message Date
Daniel P. Berrange 61b9251a3a crypto: fix leak of gnutls_dh_params_t data on credential unload
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-18 14:56:58 +00:00
Peter Maydell c27e9014d5 vnc: buffer code improvements, bugfixes.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJWShBCAAoJEEy22O7T6HE4/L4P/j2do44O18ni7OfloXQvCa5q
 xI21F/FqWZvpNVQnuhkFaBP8j9ggHIaKHJCMzQqSTs/ub+izKvsgFVWu5M9NAMPx
 OOhT20enigsBxP/WPrpjUknrMmjcnEXfYQfRhVREOZCkak95jfP8cLEAg1W81ehf
 /xS5TAJtGkxpxhQNpv94jXV5WdJmBYtKSUfUtHaEA2mgUeUrvUYlCQUUJrb23foG
 2LKGiv1GMqtNGHtl+uvBBc4XDdRrBR2iMgjjhj6IWniDCL2uxHojEN+Z23d1ldSK
 DXnNvoCVb5qzhSVVxJW34P0V2WJ8fClc0gvMWxtOvA4vLn/jnJw/Ig2MV1n4iQNu
 6vm3ZUUbz4f18eB63xy35AN4C63YgZ5xduGQ55HVMyMUtcyxkNv4SFA4NEY8Osj3
 Iy1TR+zXvdjH3d4K26J/s8/Lc1MVWlvGw6JzQn6gCF5x4ig8uKbA89S19skNw0Fe
 IXm5qHjUNNRwzG6/eGB1xpNz4O+yqGXfBAErsb0IbLBUdlweGLCZHvek2FCOUWiF
 7DY+dutFSW+nRjdOEKbRsHZL7ENB6vMzXFD3RH/EzWyvjveYl2yj2CshvHhBWxcx
 B4us35hQd7+KnkbcOQAcq5hxeXN9ZxLXjuOVB/3he+blH9uVPWo4BX6bQ71sXUpa
 kgIsPhzxCo+Bto/7P93F
 =oNDV
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20151116-1' into staging

vnc: buffer code improvements, bugfixes.

# gpg: Signature made Mon 16 Nov 2015 17:20:02 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-20151116-1:
  vnc: fix mismerge
  buffer: allow a buffer to shrink gracefully
  buffer: factor out buffer_adj_size
  buffer: factor out buffer_req_size
  vnc: recycle empty vs->output buffer
  vnc: fix local state init
  vnc: only alloc server surface with clients connected
  vnc: use vnc_{width,height} in vnc_set_area_dirty
  vnc: factor out vnc_update_server_surface
  vnc: add vnc_width+vnc_height helpers
  vnc: zap dead code
  vnc-jobs: move buffer reset, use new buffer move
  vnc: kill jobs queue buffer
  vnc: attach names to buffers
  buffer: add tracing
  buffer: add buffer_shrink
  buffer: add buffer_move
  buffer: add buffer_move_empty
  buffer: add buffer_init
  buffer: make the Buffer capacity increase in powers of two

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-17 12:34:07 +00:00
Peter Maydell 9be060f527 -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
 
 iQEcBAABAgAGBQJWSwvBAAoJEJykq7OBq3PIfUkIAJ/7NQlFTFwDnxG9cZA63h1Q
 Rq6B9dbzNmyBdtKSMIDgDOOLFiPIV6D978pd5isBhlJrQB1QZQoyn94TBN1u+kHE
 8eCYSsLjcdh2Vcn8nVTJCRAEdt42Fv6EFZAJ5cJGbI/dgrSrGAYvSj+BHOLFFseC
 5bHJ33Sdcb6iGg9IJqWct00sHfawUsVznR1grySbYOJoCmN4ReUwzBu2fCGK60dW
 0am0QLv5CVcy6Ulj1yndhmuHUyaR3jwTQqP6WlIrXsrVjoCfpMH9i6QJ65kYOKqg
 XnIeTI/DqKY6EKSSfEX1oR2G6obS7GbmSU0NjtsnruFXEPTNjhC7N4b98eaoE+Y=
 =NHaw
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

# gpg: Signature made Tue 17 Nov 2015 11:13:05 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/block-pull-request:
  virtio-blk: Fix double completion for werror=stop
  block: make 'stats-interval' an array of ints instead of a string
  aio-epoll: Fix use-after-free of node
  disas/arm: avoid clang shifting negative signed warning
  tpm: avoid clang shifting negative signed warning
  tests: Ignore recent test binaries
  docs: update bitmaps.md

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-17 11:33:38 +00:00
Fam Zheng 10f5a72f70 virtio-blk: Fix double completion for werror=stop
When a request R is absorbed by request M, it is appended to the
"mr_next" queue led by M, and is completed together with the completion
of M, in virtio_blk_rw_complete.

During DMA restart in virtio_blk_dma_restart_bh, requests in s->rq are
parsed and submitted again, possibly with a stale req->mr_next. It could
be a problem if the request merging in virtio_blk_handle_request hasn't
refreshed every mr_next pointer, in which case, virtio_blk_rw_complete
could walk through unexpected requests following the stale pointers.

Fix this by unsetting the pointer in virtio_blk_rw_complete. It is safe
because this req is either completed and freed right away, or it will be
restarted and parsed from scratch out of the vq later.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-17 18:35:57 +08:00
Alberto Garcia 40119effc5 block: make 'stats-interval' an array of ints instead of a string
This is the natural JSON representation and prevents us from having to
decode the list manually.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 0e3da8fa206f4ab534ae3ce6086e75fe84f1557e.1447665472.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-17 18:35:57 +08:00
Fam Zheng 0ed39f3df2 aio-epoll: Fix use-after-free of node
aio_epoll_update needs the fields in node, so delay the free.

Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-id: 1447655534-13974-1-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-17 18:35:57 +08:00
Stefan Hajnoczi 02460c3b42 disas/arm: avoid clang shifting negative signed warning
clang 3.7.0 on x86_64 warns about the following:

  disas/arm.c:1782:17: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    imm |= (-1 << 7);
            ~~ ^

Note that this patch preserves the tab indent in this source file
because the surrounding code still uses tabs.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-17 18:35:56 +08:00
Stefan Hajnoczi 886ce6f8b6 tpm: avoid clang shifting negative signed warning
clang 3.7.0 on x86_64 warns about the following:

  hw/tpm/tpm_tis.c:1000:36: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
            tis->loc[c].iface_id = TPM_TIS_IFACE_ID_SUPPORTED_FLAGS1_3;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  hw/tpm/tpm_tis.c:144:10: note: expanded from macro 'TPM_TIS_IFACE_ID_SUPPORTED_FLAGS1_3'
     (~0 << 4)/* all of it is don't care */)
      ~~ ^

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-17 18:35:56 +08:00
Eric Blake a12e52a151 tests: Ignore recent test binaries
Commits 6c6f312d and bd797fc1 added new tests (test-blockjob-txn
and test-timed-average, respectively), but did not mark them for
exclusion in .gitignore.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1447386423-13160-1-git-send-email-eblake@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-17 18:35:56 +08:00
John Snow c4c2daa1ae docs: update bitmaps.md
Include new error handling scenarios for 2.5.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1447196417-26081-1-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-17 18:35:56 +08:00
Peter Maydell 361cb26827 QAPI patches
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWSuUoAAoJEDhwtADrkYZTMXIP/ijz05sXbgx06GWvhWBEeAxK
 /LSU2+a6CjVaj8yX+nzbGnK6b3Xu3GVFtjgy2XrSzDvuCyVv6olq1yh3UNZUlyBh
 cQrQe7BAwFUJVDyB8Znwvwadona8fp9WjJoKFRmTgO9quSUJR4ZE5EtxLqqAz0WR
 dfK+t7kG3P25dHHjRSXdGjQOZa/jOHcJboccQoPGDVFx0WkaS21U2kd22rjVPmjM
 B4DpHkIKxM3rpDne5Xg17rHwoBB1PvgdZ3Ib2mj6B2gnLT/mCeXFKxCUeQBeKcVL
 E5D7/co77BQrDbiTQB8SuXw03LfnuA+EGTOmXgClqErh6GrIBo8YrYsbFU4yxV/l
 glaQ7ionkbRGawpSWgQxMuQ73s2Nvyz74w3lo/WmaR/2Vvjuu4KPLLO+Dd2apqPX
 HOv8x0h3IFVYxhOGVdFCIX13NFb1d7jGFSOl/9hzfoZc8zWgZOEMYcAN3nMl24DW
 K2wBA2dzGvmzpiCNiEppL0rysZU33cnEKJtxwGjYpS3OgqcBp2OyxBlrHUtfZ6tF
 KmB/JMNDx8Kh3r+PI1ZqdAWP9yfBAWDvGp8Vol+Nv06T/MSQlIN2PlkTopR+czZE
 sbSQeKSI0S3mlCv45PLY9oB+kOgSIYcRCD5xwGO9tAbxyfW69eew+nPqSnhcLmQt
 lacneNDlYjHKfmAfv0VB
 =Lr9c
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-11-17' into staging

QAPI patches

# gpg: Signature made Tue 17 Nov 2015 08:28:24 GMT using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"

* remotes/armbru/tags/pull-qapi-2015-11-17:
  input: Document why x-input-send-event is still experimental
  qapi: Document introspection stability considerations

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-17 10:20:25 +00:00
Eric Blake 513e7cdbae input: Document why x-input-send-event is still experimental
The x-input-send-event command was introduced in 2.2 with mention
that it is experimental, but now that several releases have elapsed
without any changes, it would be nice to document why that was done
and should still remain experimental in 2.5.

Meanwhile, our documentation states that we prefer 'lower-case',
rather than 'CamelCase', for qapi enum values.  The InputButton and
InputAxis enums violate this convention.  However, because they are
currently used primarily for generating code that is used internally;
and their only exposure through QMP is via the experimental
'x-input-send-event' command, we are free to change their spelling.
Of course, it would be nicer to delay such a change until the same
time we promote the command to non-experimental.  Adding
documentation will help us remember to do that rename.

We have plans to tighten the qapi generator to flag instances of
inconsistent use of naming conventions; if that lands first, it
will just need to whitelist these exceptions until the time we
settle on the final interface.

Fix a typo in the docs for InputAxis while at it.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1447354243-31825-1-git-send-email-eblake@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2015-11-17 08:42:07 +01:00
Eric Blake 39a65e2c24 qapi: Document introspection stability considerations
We are not ready (and might never be ready) to declare
introspection stable between releases. Clients written to
control multiple versions of qemu, and desiring to know
whether a particular member is supported for a given
command, must be prepared to locate that member in spite
of qapi changes that may affect the member's location or
type within the overall object, even though such changes
did not break QMP wire back-compatibility.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1447264202-19554-1-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2015-11-17 08:42:07 +01:00
Peter Maydell c257779e2a seccomp branch queue
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWSZjUAAoJEP0M/1sS+L0vR3oH/3mlk8bMtuiNZbKE7SlwL7Nu
 7NdOnYlPHyX+wAV/dpjUf4WXIqAy0c01zOcy3a1uWslW52NgDU7Xn9sT5+j6Kc87
 PbRhWcN3tvApKgi2KD/il3/z7KnC6BUMbnsfIDM7ZAsejOshF69p72XVJmcsrsgK
 +J/2HD9RobJMt86JceaFRoWe5wBWp2AFydWcjOePqFkzcj6sHnQNbMl9YM8jw6/8
 nTc7NnK5DDYY+wgOBb14ywPhMLZBbjDHRoTGRhojx0HFd3/NcKUMxzgVqF/7A+2Y
 XZ2OE4yFe2Z8hQeCnE1wuUrgyqYgwOiVVgCk8ovHxYeqVzej8Qu863qQT4E56Bo=
 =dH0/
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20151116' into staging

seccomp branch queue

# gpg: Signature made Mon 16 Nov 2015 08:50:28 GMT using RSA key ID 12F8BD2F
# gpg: Good signature from "Eduardo Otubo (Software Engineer @ ProfitBricks) <eduardo.otubo@profitbricks.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 1C96 46B6 E1D1 C38A F2EC  3FDE FD0C FF5B 12F8 BD2F

* remotes/otubo/tags/pull-seccomp-20151116:
  seccomp: loosen library version dependency
  configure: arm/aarch64: allow enable-seccomp
  seccomp: add cacheflush to whitelist

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-16 12:09:47 +00:00
Peter Maydell bc7c6c1fec -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
 
 iQIcBAABAgAGBQJWRkUVAAoJEH3vgQaq/DkOfywP/RacpMoAorAX15K/t5RF1Df2
 hATfCH8Rxf4uJZ2OBk7q7gRaLGoluwJvUHgykKpfByHwe+nK0vt/O8/bkSvKSBfw
 FvgkywsJibBcd0zDWsqSeSrbIfQ87o+5ZdNFUsyw7w/FxNjn0RYPuvuyyk0kEQq5
 GObTbX8s7bT3APWBVZS3WGi9rnWbTrXz3SXLhwf3r9gFtVgBKiL3dmrgT0U7FzwO
 7Ua31LhDx8oXzb3MRvBqcnwmUEvrtAzpdazYIFq+Xt6lUFzXO1/h/Ue0glmcP6Yi
 ddML9J4WbFxWuVkZPKppR+s6/RkUYIB3Npo1e8/0THGrHsEdpAKh+o5Y6TtxeqYt
 F8PpdG+kfleKKnTGZCN6x3vzpHqTawH2/ltavSmEbBG2aV1MFV0NK4CcCvc3UGtB
 PxRIJDfAQCztPyrprvdIMC5gAwZZr2clSowfoYK5luTTIgtLTtYKRRAtHjr5YXjY
 IWG7xurJGI43Iw09B/IUlG+Uvc59g9NiufPcXIVN0aj7Ss8lf+oeaJV/JVYQEJKz
 7s52SR98pZZeNKoKDS1PLhx4LWjCEFRpCW++dYVbsEDje5wrPlF24IEqz5K779Kp
 CRxHl46feH/NAmd6aOvu8TvpTTOaEgFZF1MGUaRkWpBRTKgnnpYQkiJLAGN6GDoi
 N7FcguurxYL9pI5XZni5
 =dYlR
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging

# gpg: Signature made Fri 13 Nov 2015 20:16:21 GMT using RSA key ID AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>"

* remotes/jnsnow/tags/ide-pull-request:
  qtest/ahci: use raw format when qemu-img is absent
  libqos: add qemu-img presence check
  qtest/ahci: always specify image format
  ahci/qtest: don't use tcp sockets for migration tests
  atapi: Prioritize unknown cmd error over BCL error
  atapi: add byte_count_limit helper

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-16 10:14:33 +00:00
dann frazier ba060c53d5 seccomp: loosen library version dependency
Drop the libseccomp required version back to 2.1.0, restoring the ability
to build w/ --enable-seccomp on Ubuntu 14.04.

Commit 4cc47f8b3c tightened the dependency
on libseccomp from version 2.1.0 to 2.1.1. This broke building on Ubuntu
14.04, the current Ubuntu LTS release. The commit message didn't mention
any specific functional need for 2.1.1, just that it was the most recent
stable version at the time. I reviewed the changes between 2.1.0 and 2.1.1,
but it looks like that update just contained minor fixes and cleanups - no
obvious (to me) new interfaces or critical bug fixes.

Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
2015-11-16 09:49:47 +01:00
Andrew Jones 693e59105d configure: arm/aarch64: allow enable-seccomp
This is a revert of ae6e8ef11e, but with a bit of refactoring,
and also specifically adding arm/aarch64, rather than all
architectures. Currently, libseccomp code appears to also support
mips, ppc, and s390. We could therefore allow qemu to enable
seccomp for those platforms as well, with additional configure
patches, given they're tested and proven to work.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Acked-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
2015-11-16 09:49:14 +01:00
Andrew Jones 47d2067af3 seccomp: add cacheflush to whitelist
cacheflush is an arm-specific syscall that qemu built for arm
uses. Add it to the whitelist, but only if we're linking with
a recent enough libseccomp.

Signed-off-by: Andrew Jones <drjones@redhat.com>
2015-11-16 09:48:53 +01:00
John Snow 917158dc3b qtest/ahci: use raw format when qemu-img is absent
If we don't have the qemu-img tool, use the raw format
for tests and skip the high-sector LBA48 tests.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1447439479-16775-4-git-send-email-jsnow@redhat.com
2015-11-13 14:31:43 -05:00
John Snow cb11e7b2f3 libqos: add qemu-img presence check
To allow tests to optionally exercise additional tests
that require the qemu-img tool that may not be present
in all builds.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1447439479-16775-3-git-send-email-jsnow@redhat.com
2015-11-13 14:31:42 -05:00
John Snow b236b61056 qtest/ahci: always specify image format
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1447439479-16775-2-git-send-email-jsnow@redhat.com
2015-11-13 14:31:42 -05:00
John Snow 6d9e7295c5 ahci/qtest: don't use tcp sockets for migration tests
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1447108074-20609-1-git-send-email-jsnow@redhat.com
2015-11-13 14:31:42 -05:00
John Snow f36aa12d2f atapi: Prioritize unknown cmd error over BCL error
If we don't know about the command at all, we need to prioritize
that failure above the zero byte-count-limit failure.

This fixes a failure in the sparc64 NetBSD 7.0 installer bootup.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 1447095959-10046-3-git-send-email-jsnow@redhat.com
2015-11-13 14:31:42 -05:00
John Snow af0e00db0e atapi: add byte_count_limit helper
Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 1447095959-10046-2-git-send-email-jsnow@redhat.com
2015-11-13 14:31:42 -05:00
Peter Maydell 8337c6cbc3 Update version for v2.5.0-rc0 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-13 17:10:36 +00:00
Guenter Roeck 74fcbd22d2 hw/misc: Add support for ADC controller in Xilinx Zynq 7000
Add support for the Xilinx XADC core used in Zynq 7000.

References:
- Zynq-7000 All Programmable SoC Technical Reference Manual
- 7 Series FPGAs and Zynq-7000 All Programmable SoC XADC
  Dual 12-Bit 1 MSPS Analog-to-Digital Converter

Tested with Linux using QEMU machine xilinx-zynq-a9 with devicetree
files zynq-zc702.dtb and zynq-zc706.dtb, and kernel configuration
multi_v7_defconfig.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
[ PC changes:
  * Changed macro names to match TRM where possible
  * Made programmers model macro scheme consistent
  * Dropped XADC_ZYNQ_ prefix on local macros
  * Fix ALM field width
  * Update threshold-comparison interrupts in _update_ints()
  * factored out DFIFO pushes into helper. Renamed to "push/pop"
  * Changed xadc_reg to 10 bits and added OOB check.
  * Reduced scope of MCTL reset to just stop channel coms.
  * Added dummy read data to write commands
  * Changed _ to - seperators in string names and filenames
  * Dropped ------------ in header comment
  * Catchall'ed _update_ints() in _write handler.
  * Minor whitespace changes.
  * Use ZYNQ_XADC_FIFO_DEPTH instead of ARRAY_SIZE()
]
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-12 21:30:42 +00:00
Peter Maydell f3bcfc5663 migration/next for 20151112
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWRMTMAAoJEPSH7xhYctcjgvEP/07awe/NxCI0cdC4yNJH03YZ
 boxexDPLOHKS/KZ5LZTdkBvBHJ2+KVm7mEDb5PrdsjZqrxqkUQdTpbMv1lI6wz6e
 kj4rFkzb9jkc6dqnK2shYcEYs0Fb5EkRTfxglN8nepbMeKzrgTo99Q7Ulg+EjnHY
 8Ryty7zHGgYECVd5xdZwJwBaFgRkxRyp3mpO+o8jf3y3j8JV700Xp6QRj2CCCk64
 KRVueQ3y/Cqfe6UlNOslN5or+TM/vWJq/qHXOclLshdfkPB17I+UCpb8U1HZKIHS
 aHKZRvnIBUMm1vvsOvuWhP5p5qfdsMbycXnViTxQpZAeym+DEW0xjyAzolSNweX9
 nAtFJSH1Iz/qD/9B+9JZ/aWrbcKRO7U8N8iqbWUJLcTkvY4VjpN/9KZFJEsumZCa
 1LDSLeTFjkKuFCfAzsXe+RyJfELtycVJMHh0ZVyNsg7XsqLwfQcpkSUr0h+l2j5s
 YgDPzFCQ6sr0GA8FFx1VJNdkSxe6Lxe0fBUt0u9cUIlhrb+X3xoxyOcs/V7+wboL
 CynGiy1QjU9PnJCfHagDgNujrXcuWjtzSc4X7J3MKy4w8APmtuWeCllSCXcydFbU
 wJNWEVRdJR8Z0+r2ub5p3HkruG4ghl+gW3DeWSYcncYDnYnq9Vo3Zl5ecKKGLh8i
 8cdi1+zeQ6YTAUh1ts2a
 =VCty
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151112' into staging

migration/next for 20151112

# gpg: Signature made Thu 12 Nov 2015 16:56:44 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/20151112:
  migration_init: Fix lock initialisation/make it explicit
  migrate-start-postcopy: Improve text
  Postcopy: Fix TP!=HP zero case
  Finish non-postcopiable iterative devices before package
  migration: Make 32bit linux compile with RDMA
  migration: print ram_addr_t as RAM_ADDR_FMT not %zx

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-12 18:08:19 +00:00
Peter Maydell b2df6a79df Block layer patches (rebased Stefan's pull request)
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJWRLF4AAoJEH8JsnLIjy/WpIcQAK+gSTtFQA8EyWqYVENyTDcI
 MTrvWI3p87XGTO11jNS8zJQIXGjenwM0jfAVoUAUHv+i9sV+/XORK1txpDZF3dhU
 Oy+16owb75e1mbBX+PYilU2SG/Uy5m81O4EX5yFXelh4xdTG1yz+ZcZjc6sKno5A
 DUJEkQDRgged5y9o2nFNjWA1jC617mGtlywmAqBRvDQA8cjO5ePF0P4jCe+RPpqW
 BRcLO59THqGkbFlB5JahSYo5gt1QwMoEGnT5YT8NGNcDUp1Cm+PfkTZrdgcv5nGj
 Or4nvmt7OuLIWG3yPeJJSfRU7HQbi2GmE6LtjEBPYWRjSzDxDMRyty3US2VtvhT2
 aIa7HDX81yclUeyyeRoLL9PFvo759D9QM9OpuY1JNOuYqcJ56DHPA7N9dX2oK3wt
 tMbPxpH1sAzD/12demj+ULrxAwcDbfyz5QvD8Sx/+6RHxRKXuUSoPxI8RN/yzyeR
 aQuKKNByymFSJfWEm3s4mHCtf/lieyESMBLUnAVyP+doZOOI3dL2+DZIBzYXFQWp
 RFndoMLmHDnSCjo72J7N3KF2l2Fc5q94aXZJcp/erpVDkAf7XOXSxcqSWmx6Swn3
 Uf18v/1Y2NJonUls7VFHpuT1AbPR2F1VYOh0VyrGzNnWqspH84ain2p2TxSXOLcV
 WkwMN5B2cXbs2nbtaqk+
 =9mKZ
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches (rebased Stefan's pull request)

# gpg: Signature made Thu 12 Nov 2015 15:34:16 GMT using RSA key ID C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"

* remotes/kevin/tags/for-upstream: (43 commits)
  block: Update copyright of the accounting code
  scsi-disk: Account for failed operations
  macio: Account for failed operations
  ide: Account for failed and invalid operations
  atapi: Account for failed and invalid operations
  xen_disk: Account for failed and invalid operations
  virtio-blk: Account for failed and invalid operations
  nvme: Account for failed and invalid operations
  iotests: Add test for the block device statistics
  block: Use QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode
  qemu-io: Account for failed, invalid and flush operations
  block: New option to define the intervals for collecting I/O statistics
  block: Add average I/O queue depth to BlockDeviceTimedStats
  block: Compute minimum, maximum and average I/O latencies
  block: Allow configuring whether to account failed and invalid ops
  block: Add statistics for failed and invalid I/O operations
  block: Add idle_time_ns to BlockDeviceStats
  util: Infrastructure for computing recent averages
  block: define 'clock_type' for the accounting code
  ide: Account for write operations correctly
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-12 17:22:06 +00:00
Dr. David Alan Gilbert 389775d1f6 migration_init: Fix lock initialisation/make it explicit
Peter reported a lock error on MacOS after my a82d593b
patch.

migrate_get_current does one-time initialisation of
a bunch of variables.
migrate_init does reinitialisation even on a 2nd
migrate after a cancel.

The problem here was that I'd initialised the mutex
in migrate_get_current, and the memset in migrate_init
corrupted it.

Remove the memset and replace it by explicit initialisation
of fields that need initialising; this also turns out to be simpler
than the old code that had to preserve some fields.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Fixes: a82d593b
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-12 17:55:27 +01:00
Dr. David Alan Gilbert a54d340b9d migrate-start-postcopy: Improve text
Improve the text in both the qapi-schema and hmp help to point out
you need to set the postcopy-ram capability prior to issuing
migrate-start-postcopy.

Also fix the text of the migrate_start_postcopy error that
deals with capabilities.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Acked-by: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-12 17:54:39 +01:00
John Snow cfcc7c1448 configure: check for $cxx before use
I broke this when adding checks for clang++.

Reported-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1447345789-840-1-git-send-email-jsnow@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-12 16:53:44 +00:00
Dr. David Alan Gilbert a3b6ff6d0a Postcopy: Fix TP!=HP zero case
Where the target page size is different from the host page
we special case it, but I messed up on the zero case check.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-12 17:52:29 +01:00
Dr. David Alan Gilbert 1c0d249ddf Finish non-postcopiable iterative devices before package
Where we have iterable, but non-postcopiable devices (e.g. htab
or block migration), complete them before forming the 'package'
but with the CPUs stopped.  This stops them filling up the package.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-11-12 17:52:29 +01:00
Juan Quintela 80e60c6e1c migration: Make 32bit linux compile with RDMA
Rest of the file already use that trick. 64bit offsets make no sense in
32bit archs, but that is ram_addr_t for you.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2015-11-12 17:52:29 +01:00
Juan Quintela 9458ad6b44 migration: print ram_addr_t as RAM_ADDR_FMT not %zx
Not all the wold is 64bits (yet).

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2015-11-12 17:52:29 +01:00
Sergey Fedorov ed6c64489e target-arm: Update PC before calling gen_helper_check_breakpoints()
PC should be updated in the CPU state before calling check_breakpoints()
helper. Otherwise, the helper would not see the correct PC in the CPU
state if it is not at the start of a TB.

Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
Message-id: 1447176222-16401-1-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-12 16:16:02 +00:00
Peter Maydell 8f0da01d18 virtio, vhost: fixes for 2.5
This fixes a performance regression with virtio 1,
 and makes device stop/start more robust for vhost-user.
 virtio devices on pcie bus now have pcie and pm
 capability, as required by the PCI Express spec.
 migration now works better with virtio 9p.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWRKTqAAoJECgfDbjSjVRpHCsH/3HBYev+wwUxbxh2Z/TVTadK
 uAOskZN5etuvl9guyLnE8iBYMHpDY/mHUrYEb7p/Yawmi7VWy3A/3ZMGJuMML3hq
 /jM7oKhJyaBaHzVUX2WOIktiHihZxk8+Bwgmc8Ho301Mg5pnBiwdbEVhZU7BC/0g
 M4I98EEW42u3t2zRo6IwOuEaiErevTdSd2ugmP37i25x3/VWcP7r0475NRnD0EcH
 /kUDM0Kb75EOWWSj+aBDySBOWR//kW7t8KpcERolUslmf25os/fGoGMlpY5nr3M0
 fraFXsKR3lvjUPZjQ9JUneOD3LaPdV+DjBh5mG+ob3MmO/dGUI3FkFaK1y+7ckA=
 =RCs3
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

virtio, vhost: fixes for 2.5

This fixes a performance regression with virtio 1,
and makes device stop/start more robust for vhost-user.
virtio devices on pcie bus now have pcie and pm
capability, as required by the PCI Express spec.
migration now works better with virtio 9p.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Thu 12 Nov 2015 14:40:42 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:
  virtio-9p: add savem handlers
  hw/virtio: Add PCIe capability to virtio devices
  vhost: send SET_VRING_ENABLE at start/stop
  vhost: rename RESET_DEVICE backto RESET_OWNER
  vhost-user: modify SET_LOG_BASE to pass mmap size and offset
  virtio-pci: unbreak queue_enable read
  virtio-pci: introduce pio notification capability for modern device
  virtio-pci: use zero length mmio eventfd for 1.0 notification cap when possible
  KVM: add support for any length io eventfd
  memory: don't try to adjust endianness for zero length eventfd
  virtio-pci: fix 1.0 virtqueue migration

Conflicts:
	include/hw/compat.h
[Fixed a trivial merge conflict in compat.h]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-11-12 15:25:40 +00:00
Alberto Garcia aece5edc96 block: Update copyright of the accounting code
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 80a2278e3ec2dafd5daab20a7cb2d6a9b83371e4.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:47 +01:00
Alberto Garcia d7628080f3 scsi-disk: Account for failed operations
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 0ead7b0e59c22926e033ca12725e3a31985ec46b.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:47 +01:00
Alberto Garcia b88b3c8b83 macio: Account for failed operations
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: ee6f4fde6a7c1071ca96d4ddd53e4934ff812fcd.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:47 +01:00
Alberto Garcia ecca3b397d ide: Account for failed and invalid operations
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: bf4d6c9c563877e699b0bf42e7eaf8b096c4a35e.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:47 +01:00
Alberto Garcia ece2d05ed4 atapi: Account for failed and invalid operations
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 59dee4e2921b0c79d41c49b67dfb93d32db9f7f9.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:47 +01:00
Alberto Garcia 57ee366ce9 xen_disk: Account for failed and invalid operations
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: e0cbb96cb0e1f86c37c7ce332efdf02b57b9d365.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:46 +01:00
Alberto Garcia 01762e0322 virtio-blk: Account for failed and invalid operations
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 4f623ce52c9d673d35a043fc2959526b41b685c6.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:46 +01:00
Alberto Garcia 1753f3dc17 nvme: Account for failed and invalid operations
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 678dc67da229759d404b44f7cc2bf5ed8bf8ad14.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:46 +01:00
Alberto Garcia 4214face09 iotests: Add test for the block device statistics
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 0fb8501bbf3666b3d5d3f67fa899729c88f21baf.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:46 +01:00
Alberto Garcia 918a17a464 block: Use QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode
This patch switches to QEMU_CLOCK_VIRTUAL for the accounting code in
qtest mode, and makes the latency of the operation constant. This way we
can perform tests on the accounting code with reproducible results.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 35ed0501450fa572684e9b5e92c361ab6cce565b.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:46 +01:00
Alberto Garcia 556c2b6071 qemu-io: Account for failed, invalid and flush operations
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 78a7662a8636e55991737ece50003a2dc5a5f3e0.1446044838.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:46 +01:00
Alberto Garcia 2be5506fc8 block: New option to define the intervals for collecting I/O statistics
The BlockAcctStats structure contains a list of BlockAcctTimedStats.
Each one of these collects statistics about the minimum, maximum and
average latencies of all I/O operations in a certain interval of time.

This patch adds a new "stats-intervals" option that allows defining
these intervals.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 41cbcd334a61c6157f0f495cdfd21eff6c156f2a.1446044837.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:46 +01:00
Alberto Garcia 96e4dedaff block: Add average I/O queue depth to BlockDeviceTimedStats
This patch adds two new fields to BlockDeviceTimedStats that track the
average number of pending read and write requests for a block device.

The values are calculated for the period of time defined for that
interval.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: fd31fef53e2714f2f30d59ed58ca2f67ec9ab926.1446044837.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:46 +01:00