Commit Graph

74665 Commits (ef97d608c7f069331d8141d1d59df715f4a3beaf)

Author SHA1 Message Date
Alberto Garcia ef97d608c7 qcow2: Don't round the L1 table allocation up to the sector size
The L1 table is read from disk using the byte-based bdrv_pread() and
is never accessed beyond its last element, so there's no need to
allocate more memory than that.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: b2e27214ec7b03a585931bcf383ee1ac3a641a10.1579374329.git.berto@igalia.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Thomas Huth ce95a15e42 iotests: Enable more tests in the 'auto' group to improve test coverage
According to Kevin, tests 030, 040 and 041 are among the most valuable
tests that we have, so we should always run them if possible, even if
they take a little bit longer.

According to Max, it would be good to have a test for iothreads and
migration. 127 and 256 seem to be good candidates for iothreads. For
migration, let's enable 181 and 203 (which also tests iothreads).
(091 would be a good candidate for migration, too, but Alex Bennée
reported that this test fails on ZFS file systems, so it can't be
included yet)

Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 20200121095205.26323-7-thuth@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Thomas Huth cd2058289b iotests: Skip Python-based tests if QEMU does not support virtio-blk
We are going to enable some of the python-based tests in the "auto" group,
and these tests require virtio-blk to work properly. Running iotests
without virtio-blk likely does not make too much sense anyway, so instead
of adding a check for the availability of virtio-blk to each and every
test (which does not sound very appealing), let's rather add a check for
this a central spot in the "check" script instead (so that it is still
possible to run "make check" for qemu-system-tricore for example).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 20200121095205.26323-6-thuth@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Thomas Huth 9bdabfbe72 iotests: Check for the availability of the required devices in 267 and 127
We are going to enable 127 in the "auto" group, but it only works if
virtio-scsi and scsi-hd are available - which is not the case with
QEMU binaries like qemu-system-tricore for example, so we need a
proper check for the availability of these devices here.

A very similar problem exists in iotest 267 - it has been added to
the "auto" group already, but requires virtio-blk and thus currently
fails with qemu-system-tricore for example. Let's also add aproper
check there.

Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 20200121095205.26323-5-thuth@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Thomas Huth 30ad36f55f iotests: Test 183 does not work on macOS and OpenBSD
In the long run, we might want to add test 183 to the "auto" group
(but it still fails occasionally, so we cannot do that yet). However,
when running 183 in Cirrus-CI on macOS, or with our vm-build-openbsd
target, it currently always fails with an "Timeout waiting for return
on handle 0" error.

Let's mark it as supported only on systems where the test is working
most of the time (i.e. Linux, FreeBSD and NetBSD).

Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 20200121095205.26323-4-thuth@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Thomas Huth 877d18f2aa iotests: Test 041 only works on certain systems
041 works fine on Linux, FreeBSD, NetBSD and OpenBSD, but fails on macOS.
Let's mark it as only supported on the systems where we know that it is
working fine.

Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 20200121095205.26323-3-thuth@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
John Snow 72b2903056 iotests: remove 'linux' from default supported platforms
verify_platform will check an explicit whitelist and blacklist instead.
The default will now be assumed to be allowed to run anywhere.

For tests that do not specify their platforms explicitly, this has the effect of
enabling these tests on non-linux platforms. For tests that always specified
linux explicitly, there is no change.

For Python tests on FreeBSD at least; only seven python tests fail:
045 147 149 169 194 199 211

045 and 149 appear to be misconfigurations,
147 and 194 are the AF_UNIX path too long error,
169 and 199 are bitmap migration bugs, and
211 is a bug that shows up on Linux platforms, too.

This is at least good evidence that these tests are not Linux-only. If
they aren't suitable for other platforms, they should be disabled on a
per-platform basis as appropriate.

Therefore, let's switch these on and deal with the failures.

Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20200121095205.26323-2-thuth@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Alberto Garcia 7cdca2e233 qcow2: Use a GString in report_unsupported_feature()
This is a bit more efficient than having to allocate and free memory
for each item.

The default size (60) is enough for all the existing incompatible
features or the "Unknown incompatible feature" message.

Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20200115135626.19442-1-berto@igalia.com
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Pan Nengyuan cb8956144c block: fix memleaks in bdrv_refresh_filename
If we call the qmp 'query-block' while qemu is working on
'block-commit', it will cause memleaks, the memory leak stack is as
follow:

Indirect leak of 12360 byte(s) in 3 object(s) allocated from:
    #0 0x7f80f0b6d970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
    #1 0x7f80ee86049d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d)
    #2 0x55ea95b5bb67 in qdict_new /mnt/sdb/qemu-4.2.0-rc0/qobject/qdict.c:29
    #3 0x55ea956cd043 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6427
    #4 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399
    #5 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399
    #6 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399
    #7 0x55ea958818ea in bdrv_block_device_info /mnt/sdb/qemu-4.2.0-rc0/block/qapi.c:56
    #8 0x55ea958879de in bdrv_query_info /mnt/sdb/qemu-4.2.0-rc0/block/qapi.c:392
    #9 0x55ea9588b58f in qmp_query_block /mnt/sdb/qemu-4.2.0-rc0/block/qapi.c:578
    #10 0x55ea95567392 in qmp_marshal_query_block qapi/qapi-commands-block-core.c:95

Indirect leak of 4120 byte(s) in 1 object(s) allocated from:
    #0 0x7f80f0b6d970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
    #1 0x7f80ee86049d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d)
    #2 0x55ea95b5bb67 in qdict_new /mnt/sdb/qemu-4.2.0-rc0/qobject/qdict.c:29
    #3 0x55ea956cd043 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6427
    #4 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399
    #5 0x55ea956cc950 in bdrv_refresh_filename /mnt/sdb/qemu-4.2.0-rc0/block.c:6399
    #6 0x55ea9569f301 in bdrv_backing_attach /mnt/sdb/qemu-4.2.0-rc0/block.c:1064
    #7 0x55ea956a99dd in bdrv_replace_child_noperm /mnt/sdb/qemu-4.2.0-rc0/block.c:2283
    #8 0x55ea956b9b53 in bdrv_replace_node /mnt/sdb/qemu-4.2.0-rc0/block.c:4196
    #9 0x55ea956b9e49 in bdrv_append /mnt/sdb/qemu-4.2.0-rc0/block.c:4236
    #10 0x55ea958c3472 in commit_start /mnt/sdb/qemu-4.2.0-rc0/block/commit.c:306
    #11 0x55ea94b68ab0 in qmp_block_commit /mnt/sdb/qemu-4.2.0-rc0/blockdev.c:3459
    #12 0x55ea9556a7a7 in qmp_marshal_block_commit qapi/qapi-commands-block-core.c:407

Fixes: bb808d5f5c
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Message-id: 20200116085600.24056-1-pannengyuan@huawei.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Alberto Garcia e2a7423a11 block: Use a GString in bdrv_perm_names()
This is a bit more efficient than having to allocate and free memory
for each new permission.

The default size (30) is enough for "consistent read, write, resize".

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 20200110171518.22168-1-berto@igalia.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Alberto Garcia 3a75a870ef qcow2: Assert that host cluster offsets fit in L2 table entries
The standard cluster descriptor in L2 table entries has a field to
store the host cluster offset. When we need to get that offset from an
entry we use L2E_OFFSET_MASK to ensure that we only use the bits that
belong to that field.

But while that mask is used every time we read from an L2 entry, it
is never used when we write to it. Due to the QCOW_MAX_CLUSTER_OFFSET
limit set in the cluster allocation code QEMU can never produce
offsets that don't fit in that field so any such offset would indicate
a bug in QEMU.

Compressed cluster descriptors contain two fields (host cluster offset
and size of the compressed data) and the situation with them is
similar. In this case the masks are not constant but are stored in the
csize_mask and cluster_offset_mask fields of BDRVQcow2State.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20200113161146.20099-1-berto@igalia.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-06 13:47:45 +01:00
Peter Maydell 418fa86dd4 Testing updates and build fixes:
- move more cross compilers to buster
   - fix build breakage (hppa Kconfig)
   - disable docs on shippable
   - build docs under bionic with python3
   - travis.yml re-factoring
   - check capabilities of non-docker compilers
   - smarter make -j parallelism
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAl45pvgACgkQ+9DbCVqe
 KkQulAf/W+nrxv+7Q+xwyZOv6d1V2cfJRmgxUrH3fXePBGVGmhoCF9zDRfUeidUH
 Ab9Les0O9E3XTRcobiwOCEG0iTUT3yFiO76V0D+hY9GH41SvrB943LVAsAVnM/eM
 PRFeUM1BqE+hs6b/ByIfqdkrcnSS9xgIdYEF2MryR4azemR0R901rBlS+jsk8yAV
 Nv9SAmNZv3oG/oWVXLk9+5dNjw6OqVvmEFPO1pr5AFyt7k2wvxoYD2iVMLYPvJX9
 jfx1YP2UlqnMQ7VNOVuAtv8ROw2IZoQpoCtXP+1cs9N5n4VtQo7QxCNn6WVT0UpA
 DY4DuDyK75ZgHhhEiJBbZfavona6fQ==
 =P3ap
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-040220-1' into staging

Testing updates and build fixes:

  - move more cross compilers to buster
  - fix build breakage (hppa Kconfig)
  - disable docs on shippable
  - build docs under bionic with python3
  - travis.yml re-factoring
  - check capabilities of non-docker compilers
  - smarter make -j parallelism

# gpg: Signature made Tue 04 Feb 2020 17:16:40 GMT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-testing-040220-1:
  .travis.yml: ensure python3-sphinx installed for docs
  .travis.yml: single thread build-tcg
  .travis.yml: drop cris-linux-user from the plugins test
  .travis.yml: drop the travis_retry from tests
  .travis.yml: introduce TEST_BUILD_CMD and use it for check-tcg
  tests/tcg: gate pauth-% tests on having compiler support
  tests/tcg: add a configure compiler check for ARMv8.1 and SVE
  .travis.yml: probe for number of available processors
  .travis.yml: move cache flushing to early common phase
  .travis.yml: build documents under bionic
  .travis.yml: Add description to each job
  .travis.yml: Drop superfluous use of --python=python3 parameter
  .shippable: --disable-docs for cross-compile tests
  travis.yml: Install genisoimage package
  tests/docker: better handle symlinked libs
  tests/docker: move most cross compilers to buster base

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-04 18:55:06 +00:00
Alex Bennée 68e5b85e41 .travis.yml: ensure python3-sphinx installed for docs
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200204105142.21845-1-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée 73217f3ed4 .travis.yml: single thread build-tcg
I've theorised that a parallel build-tcg is somehow getting confused
when two fedora-30 based cross compilers attempt to build at the same
time. From one data-point so far this may fix the problem although the
plugins job runs quite close to timeout.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200203090932.19147-18-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée 7986f48660 .travis.yml: drop cris-linux-user from the plugins test
While it shouldn't cause problems we will never get useful information
from cris as it has yet to be converted to the common translator loop.
It also causes the Travis CI to fail for weird reasons which I have so
far been unable to replicate on a normal Xenial system.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200203090932.19147-17-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée ec49faacd6 .travis.yml: drop the travis_retry from tests
This was a crutch when we introduced it - however it does have the
disadvantage of causing tests to timeout with large amounts of logs.
Lets drop it and see if the stability has improved since.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203090932.19147-16-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée 4f46afd986 .travis.yml: introduce TEST_BUILD_CMD and use it for check-tcg
At least for check-tcg we can split the build phase from the test
phase and do the former in parallel. While we are at it drop the V=1
for the check-tcg part as it just generates a lot more noise in the
logs.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203090932.19147-15-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée bb516dfc5b tests/tcg: gate pauth-% tests on having compiler support
Otherwise we end up failing to build our tests on CI which may have
older compilers that the user expects. We can get rid of this once we
can fallback to multiarch containers.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200203090932.19147-14-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée ded663a226 tests/tcg: add a configure compiler check for ARMv8.1 and SVE
We will need this for some tests later. The docker images already
support it by default.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200203090932.19147-13-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée 0a7c0ae053 .travis.yml: probe for number of available processors
The arm64 hardware was especially hit by only building on 3 of the 32
available cores. Introduce a JOBS environment variable which we use
for all parallel builds. We still run the main checks single threaded
though so to make it easier to spot hangs.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203090932.19147-12-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée b3165c874e .travis.yml: move cache flushing to early common phase
We shall be adding more common early setup in a future commit.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203090932.19147-11-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée 204b30e2e2 .travis.yml: build documents under bionic
It looks like the xenial tooling doesn't like something in our setup.
We should probably be moving to bionic for everything soon
anyway (libssh aside).

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203090932.19147-10-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Philippe Mathieu-Daudé 097aebd8b6 .travis.yml: Add description to each job
The NAME variable can be used to describe nicely a job (see [*]).
As we currently have 32 jobs, use it. This helps for quickly
finding a particular job.

  before: https://travis-ci.org/qemu/qemu/builds/639887646
  after: https://travis-ci.org/philmd/qemu/builds/641795043

[*] https://docs.travis-ci.com/user/customizing-the-build/#naming-jobs-within-matrices

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200125183135.28317-1-f4bug@amsat.org>
Message-Id: <20200203090932.19147-9-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Philippe Mathieu-Daudé 5311cb12e9 .travis.yml: Drop superfluous use of --python=python3 parameter
As we require Python3 since commit ddf9069963, we don't need to
explicit it with the --python=/usr/bin/python3 configure option.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200125184217.30034-1-f4bug@amsat.org>
Message-Id: <20200203090932.19147-8-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée f2dfb09ceb .shippable: --disable-docs for cross-compile tests
The sphinx support is fairly new and we don't seem to have all the
bugs worked out for cross development environments right now.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203090932.19147-6-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Wainer dos Santos Moschetta 58a1e5b6e2 travis.yml: Install genisoimage package
The genisoimage program is required for tests/cdrom-test
tests, otherwise they are skipped. The current Travis
environments do not provide it by default, so let's
explicitly require the genisoimage package.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200110191254.11303-2-wainersm@redhat.com>
Message-Id: <20200203090932.19147-5-alex.bennee@linaro.org>
2020-02-04 17:13:29 +00:00
Alex Bennée 5e33f7fead tests/docker: better handle symlinked libs
When we are copying we want to ensure we grab the first
resolution (the found in path section). However even that binary might
be a symlink so lets make sure we chase the symlinks to copy the right
binary to where it can be found.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Robert Foley <robert.foley@linaro.org>

Message-Id: <20200203090932.19147-3-alex.bennee@linaro.org>
2020-02-04 17:13:28 +00:00
Alex Bennée 698a71edbe tests/docker: move most cross compilers to buster base
This includes fixing up the dependencies (Which were already wrong for
one of the mips variants).

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200203090932.19147-2-alex.bennee@linaro.org>
2020-02-04 17:13:28 +00:00
Peter Maydell 7bd9d0a9e2 * Current qtests queue
* Some Kconfig updates
 * Some trivial clean-ups here and there
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAl45LrARHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbVpVw//Y+p64gpEvAK++HR9iCjGOEx3rO+2mgo6
 KXeXw+HWHk9aHkWtplk96akchyFeAz8BuU6TU7vtd0Zczui3aBqSY0b2Sv2eVsPA
 /0TzWyRzmrJDSJLL8EM/x3j+F4nIrDm/Vbjwkkmdgk7zorO0YvxlqzRQmy4BXjR0
 t5+qN/JhENh5Xz/i2kzCXBUDhPCC9LzuooVuKjFLg7CZCOFugBbZ8hU+6EmE+asL
 jip1LIfkCjeJZnGsNWFV9oVYi+hTTr3Hyj+CIcKi61nSuF/1e3nDQxNLAF49Qso7
 YNjOFPSaVZXxyoZx5Bb5jv/cRw5HmFtT66ybNr2J2vHMaaZOWMhXbUUjnitf0G4t
 1yUsEJLloqO7/0DQVCemUrG6+zLUNIvg8KPEGQJYmjT8mQ2Rbf1jATN/wFNMlVWR
 aXud6hSAcrwDFb4w6kHdCOcwFvef9xBUBQLzkn5OFSgoWCSI+kbzkSLp3BCNnzwv
 n8ChW2bm/gzhsbD0NsFMIkvLTtFauLVWquoEeSLFkybccMdM+TVNg0dg7So7u5Gx
 PiH4ivsoGtdNM9cEDDacWFcnjTPiNcNJjLleYJYFGYjU+UueN0I6Tlb2QUW4DtXC
 6g3t01Y9GZgSrXZX+83Ec33pss1brC3uZBRRw6EaJtxd+iRg6gLNGtpi3MWo8VRN
 yGBfgzJi9s8=
 =qs+X
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-02-04' into staging

* Current qtests queue
* Some Kconfig updates
* Some trivial clean-ups here and there

# gpg: Signature made Tue 04 Feb 2020 08:43:28 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-02-04:
  configure: Fix typo of the have_afalg variable
  hw/hppa/Kconfig: LASI chipset requires PARALLEL port
  hw/input: Do not enable CONFIG_PCKBD by default
  Makefile: Do not use wildcard hw/*/Kconfig as input for minikconf
  hw/*/Makefile.objs: Move many .o files to common-objs
  trivial: Remove xenfb_enabled from sysemu.h
  include/sysemu/sysemu.h: Remove usused variable no_quit
  gitlab-ci: Refresh the list of iotests
  tests/qtest: update comments about bios-tables-test-allowed-diff.h
  boot-order-test: fix memleaks in boot-order-test
  tests/Makefile: Fix inclusion of the qos dependency files
  docs/devel: Fix qtest paths and info about check-block in testing.rst
  tests/vhost-user-bridge: Fix build
  test-logging: Fix -Werror=maybe-uninitialized warning

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-04 16:12:31 +00:00
Peter Maydell 163b095168 MIPS queue for February 4th, 2020
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJeOSNhAAoJENSXKoln91plJskH/jwH32GeGbo2j26DKwamw5SR
 OrbBeotFAVHj3o4RRPozhYHapM5drQugZoOQNaTFDLoqiMTQDkFsuLrtWqz5CAH6
 C2agRerd3tvtw3kTaVPFf8ne+QYZVa1hDQaBXgursqrZn88rH4635EBaWEKkP/mN
 IcLZQ1zQgcCNwe9kHldMq3QEf4V/wc0CyTbYXU3r2ni9lOpUDL5gXTTh7RR6xLIl
 58joPZ5aDW5xgpaXRfT/JDtg0vgHwe02CNIdfSkXQuyldIybUowbdknbqE+YTHWD
 dCnmAG86HuHaN+vgrdnt61P0nVgWIwYhv5JCQNug0He+sAKCGfRiyKoOV+31CKU=
 =Cwhh
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-feb-04-2020' into staging

MIPS queue for February 4th, 2020

# gpg: Signature made Tue 04 Feb 2020 07:55:13 GMT
# gpg:                using RSA key D4972A8967F75A65
# gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>" [full]
# Primary key fingerprint: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65

* remotes/amarkovic/tags/mips-queue-feb-04-2020:
  target/mips: Separate FPU-related helpers into their own file
  target/mips: Separate CP0-related helpers into their own file
  target/mips: Fix handling of LL/SC instructions after 7dd547e5ab

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-04 10:32:31 +00:00
Thomas Huth 4f67366e3b configure: Fix typo of the have_afalg variable
The variable is called 'have_afalg' and not 'hava_afalg'.

Fixes: f0d92b56d8 ('introduce some common functions for af_alg backend')
Message-Id: <20200203160046.23194-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Longpeng(Mike) <longpeng2@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:01:31 +01:00
Philippe Mathieu-Daudé 9154cf688b hw/hppa/Kconfig: LASI chipset requires PARALLEL port
The PARISC Lasi chipset emulation requires some of the common parallel
support and fails to build on a --without-default-devices:

    LINK    hppa-softmmu/qemu-system-hppa
  /usr/bin/ld: hw/hppa/lasi.o: in function `lasi_init':
  hw/hppa/lasi.c:324: undefined reference to `parallel_mm_init'
  collect2: error: ld returned 1 exit status
  make[1]: *** [Makefile:206: qemu-system-hppa] Error 1

Fixes: 376b851909
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200129192350.27143-1-philmd@redhat.com>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:01:31 +01:00
Thomas Huth 10ebc0a8fd hw/input: Do not enable CONFIG_PCKBD by default
The i8042 PS/2 Controller should not be enabled by default. It has
to be selected by machines or chipsets (e.g. SuperIO chipsets).

Message-Id: <20200115113748.24757-1-thuth@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:01:31 +01:00
Thomas Huth ea763fd233 Makefile: Do not use wildcard hw/*/Kconfig as input for minikconf
The hw/*/Kconfig files should be sourced from hw/Kconfig, so there
is no need to pass them along as input files to minikconfig. We should
use the hw/*/Kconfig wildcard only for build dependencies in the Makefile.

With this change, there are now no duplicate entries in the generated
*-softmmu/config-devices.mak.d files anymore, and there is finally a
chance to get rid of stale Kconfig files like hw/bt/Kconfig, too (once
they do not show up in the config-devices.mak.d files now anymore).

Message-Id: <20200203153905.20544-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Thomas Huth 3ab5a6ece5 hw/*/Makefile.objs: Move many .o files to common-objs
We have many files that apparently do not depend on the target CPU
configuration, i.e. which can be put into common-obj-y instead of
obj-y. This way, the code can be shared for example between
qemu-system-arm and qemu-system-aarch64, or the various big and
little endian variants like qemu-system-sh4 and qemu-system-sh4eb,
so that we do not have to compile the code multiple times anymore.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200130133841.10779-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Thomas Huth d9018fbbd6 trivial: Remove xenfb_enabled from sysemu.h
The define is only used in one other place. Move the code there
instead of keeping this xen-specific define in sysemu.h.

Message-Id: <20200121161747.10569-1-thuth@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Thomas Huth 432b119be4 include/sysemu/sysemu.h: Remove usused variable no_quit
The no_quit variable has been removed in commit 78782712a6 ("vl: drop
no_quit variable"), so let's remove the extern declaration in the header
now, too.

Fixes: 78782712a6 ("vl: drop no_quit variable")
Message-Id: <20200108192402.19672-1-thuth@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Thomas Huth c7cf4ddb80 gitlab-ci: Refresh the list of iotests
iotest 147 and 205 have recently been marked as "NBD-only", so they
are currently simply skipped and thus can be removed.

iotest 129 occasionally fails in the gitlab-CI, and according to Max,
there are some known issues with this test (see for example this URL:
https://lists.nongnu.org/archive/html/qemu-block/2019-06/msg00499.html ),
so for the time being, let's disable it until the problems are fixed.

The iotests 040, 127, 203 and 256 are scheduled to become part of "make
check-block", so we also do not have to test them seperately here anymore.

On the other side, new iotests have been added to the QEMU repository
in the past months, so we can now add some new test > 256 instead.

Message-Id: <20200121131936.8214-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Heyi Guo c66e8ab0e3 tests/qtest: update comments about bios-tables-test-allowed-diff.h
Update comments in tests/qtest/bios-tables-test.c to reflect the
current path of bios-tables-test-allowed-diff.h, which is now under
tests/qtest/ as well.

Signed-off-by: Heyi Guo <guoheyi@huawei.com>
Message-Id: <20200202110009.51479-1-guoheyi@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Pan Nengyuan 77c24259b6 boot-order-test: fix memleaks in boot-order-test
It's not a big deal, but 'check qtest-ppc/ppc64' runs fail if sanitizers is enabled.
The memory leak stack is as follow:

Direct leak of 128 byte(s) in 4 object(s) allocated from:
    #0 0x7f11756f5970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
    #1 0x7f1174f2549d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d)
    #2 0x556af05aa7da in mm_fw_cfg_init /mnt/sdb/qemu/tests/libqos/fw_cfg.c:119
    #3 0x556af059f4f5 in read_boot_order_pmac /mnt/sdb/qemu/tests/boot-order-test.c:137
    #4 0x556af059efe2 in test_a_boot_order /mnt/sdb/qemu/tests/boot-order-test.c:47
    #5 0x556af059f2c0 in test_boot_orders /mnt/sdb/qemu/tests/boot-order-test.c:59
    #6 0x556af059f52d in test_pmac_oldworld_boot_order /mnt/sdb/qemu/tests/boot-order-test.c:152
    #7 0x7f1174f46cb9  (/lib64/libglib-2.0.so.0+0x73cb9)
    #8 0x7f1174f46b73  (/lib64/libglib-2.0.so.0+0x73b73)
    #9 0x7f1174f46b73  (/lib64/libglib-2.0.so.0+0x73b73)
    #10 0x7f1174f46f71 in g_test_run_suite (/lib64/libglib-2.0.so.0+0x73f71)
    #11 0x7f1174f46f94 in g_test_run (/lib64/libglib-2.0.so.0+0x73f94)

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Message-Id: <20200203025935.36228-1-pannengyuan@huawei.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Thomas Huth ab00cf4d73 tests/Makefile: Fix inclusion of the qos dependency files
The qos dependency files can be found under tests/qtest/libqos and
not under tests/qtest/qos.

Fixes: 1cf4323ecd ("Move the libqos files under tests/qtest/")
Message-Id: <20200127140245.20065-1-thuth@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Thomas Huth 316082b119 docs/devel: Fix qtest paths and info about check-block in testing.rst
The qtests have recently been moved to a separate subdirectory, so
the paths that are mentioned in the documentation have to be adjusted
accordingly. And some of the iotests are now always run as part of
"make check", so this information has to be adjusted here, too.

Message-Id: <20200122134511.23806-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Dr. David Alan Gilbert 4eb387267e tests/vhost-user-bridge: Fix build
vhost-user-bridge isn't actually a test, it's just a helper
(that should probably move somewhere else) - but the build was
broken in the qtest move.

Fixes: 833884f37a
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20200117122648.137862-1-dgilbert@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Miroslav Rezanina 24f7eeed9a test-logging: Fix -Werror=maybe-uninitialized warning
Checking for uninitialized variables raises warning for file path
variables in test_logfile_write and test_logfile_lock functions.

To suppress this warning, initialize varibles to NULL. This is safe
change as result of g_build_filename is stored to them before any usage.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Message-Id: <63b0fcedf7dfe799c8210b113e5dccf32414a89d.1579598240.git.mrezanin@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Robert Foley <robert.foley@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2020-02-04 09:00:57 +01:00
Aleksandar Markovic 7b77f048e2 target/mips: Separate FPU-related helpers into their own file
For clarity and easier maintenence, create target/mips/fpu_helper.c, and
move all FPU-related content form target/mips/op_helper.c to that file.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
Message-Id: <1580745443-24650-3-git-send-email-aleksandar.markovic@rt-rk.com>
2020-02-04 08:53:54 +01:00
Aleksandar Markovic 256eb7ee58 target/mips: Separate CP0-related helpers into their own file
For clarity and easier maintenence, create target/mips/cp0_helper.c, and
move all CP0-related content form target/mips/op_helper.c to that file.

Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
Message-Id: <1580745443-24650-2-git-send-email-aleksandar.markovic@rt-rk.com>
2020-02-04 08:53:54 +01:00
Alex Richardson ec860426df target/mips: Fix handling of LL/SC instructions after 7dd547e5ab
After 7dd547e5ab the env->llval value
is loaded as an unsigned value (instead of sign-extended as before).
Therefore, the CMPXCHG in gen_st_cond() in translate.c fails if the
sign bit is set in the loaded value.

Fix this by sign-extending the llval value for the 32-bit case.

I discovered this issue because FreeBSD MIPS64 was looping forever
in an atomic helper function when trying to start /sbin/init.

Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Fixes: 7dd547e5ab ("target/mips: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX")
Buglink: https://bugs.launchpad.net/qemu/+bug/1861605
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Aleksandar Markovic <amarkovic@wavecomp.com>
Cc: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
Cc: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200202153409.28534-1-jrtc27@jrtc27.com>
2020-02-04 08:51:41 +01:00
Peter Maydell f31160c7d1 docs:
* Fix Makefile concurrency bug where we could run Sphinx twice
    in parallel on the same manual (which makes it crash)
  * Support handling hxtool doc fragments for rST manuals
  * Convert qemu-img docs to rST
  * Convert qemu-trace-stap docs to rST
  * Convert virtfs-proxy-helper docs to rST
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAl43//AZHHBldGVyLm1h
 eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3n3lD/45R4UFxlJMPya4cWFw4PMc
 Z6W7W/X5hizUvTQIqf8YMSXL+FNXGD8SixLj8e0mRa7vCqPNtu0II+C9+QRaAm5P
 XA+San6erwG3YxLDl3tPJtfGU7zKnxSmN11650ydQlbUpWtVF6VGs6Lu6kmQXQq+
 f4hJiNw9G2TYSxc24IbvtN0TLdEiiNtoxl1+oSiRiwy30bucg3omIo41AwIFqBD+
 GNE3TVbYX5WN8fLbiXQwV1X9NT2IRktADwbTg3Fu6Bg06cJZIF/uKDPLFUCYAQAy
 FzblaF1K+dBmRLIIQs4iwcjnTSZgzcS9FB+3fh5piP/MhEttPyDmThZAApozqFuA
 qEgtZPDQXwdmehdA1bCSgXInLWftmMSaxO7pGl3jFYvvObNC+xRrsHZ8wpIePQNg
 3g4M7M67tFfc61zPUdiz6b8vWwRmQu2Xxin/VTCLR3nNOh6BOEfxLZiQecO3+sLd
 YrEH9ysn5+LFzeONSwa7RHL5qnSgiapIkRVl3icYr328LD9mOP6bHiaHj+dR0cZu
 7F9rK/ipTmCQ86S5gEpxEfXMGbarIMkbiBO8KM1UUTICy9BeiaCT7v86CthiAkg3
 cC2X87awvq8iJwQapTIZbI9g8hpbxszPknXby9asy7iTtLJWcYZd0nvAzgNf9WAJ
 CprR58LWsbnxORtn4UDPQw==
 =7J6m
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-docs-20200203' into staging

docs:
 * Fix Makefile concurrency bug where we could run Sphinx twice
   in parallel on the same manual (which makes it crash)
 * Support handling hxtool doc fragments for rST manuals
 * Convert qemu-img docs to rST
 * Convert qemu-trace-stap docs to rST
 * Convert virtfs-proxy-helper docs to rST

# gpg: Signature made Mon 03 Feb 2020 11:11:44 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-docs-20200203:
  virtfs-proxy-helper: Convert documentation to rST
  scripts/qemu-trace-stap: Convert documentation to rST
  qemu-img-cmds.hx: Remove texinfo document fragments
  qemu-img: Convert invocation documentation to rST
  qemu-img-cmds.hx: Add rST documentation fragments
  docs/sphinx: Add new hxtool Sphinx extension
  hxtool: Support SRST/ERST directives
  Makefile: Ensure we don't run Sphinx in parallel for manpages

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-02-03 11:14:24 +00:00
Peter Maydell 78813586b0 virtfs-proxy-helper: Convert documentation to rST
The virtfs-proxy-helper documentation is currently in
fsdev/qemu-trace-stap.texi in Texinfo format, which we
present to the user as:
 * a virtfs-proxy-helper manpage
 * but not (unusually for QEMU) part of the HTML docs

Convert the documentation to rST format that lives in
the docs/ subdirectory, and present it to the user as:
 * a virtfs-proxy-helper manpage
 * part of the interop/ Sphinx manual

There are minor formatting changes to suit Sphinx, but no
content changes. In particular I've split the -u and -g
options into each having their own description text.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Greg Kurz <groug@kaod.org>
Message-id: 20200124162606.8787-9-peter.maydell@linaro.org
2020-02-03 11:02:23 +00:00
Peter Maydell 605ffebb2e scripts/qemu-trace-stap: Convert documentation to rST
The qemu-trace-stap documentation is currently in
scripts/qemu-trace-stap.texi in Texinfo format, which we
present to the user as:
 * a qemu-trace-stap manpage
 * but not (unusually for QEMU) part of the HTML docs

Convert the documentation to rST format that lives in
the docs/ subdirectory, and present it to the user as:
 * a qemu-trace-stap manpage
 * part of the interop/ Sphinx manual

There are minor formatting changes to suit Sphinx, but no
content changes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20200124162606.8787-8-peter.maydell@linaro.org
2020-02-03 11:02:23 +00:00