Commit Graph

94792 Commits

Author SHA1 Message Date
Stefano Garzarella ef4ff56cf3 vhost-vdpa: fix typo in a comment
Replace vpda with vdpa.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220328152022.73245-1-sgarzare@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2022-03-31 21:30:56 +02:00
Thomas Huth b49202151c target/sh4: Remove old README.sh4 file
This file didn't have any non-trivial update since it was initially
added in 2006, and looking at the content, it seems incredibly outdated,
saying e.g. "The sh4 target is not ready at all yet for integration in
qemu" or "A sh4 user-mode has also somewhat started but will be worked
on afterwards"... Sounds like nobody is interested in this README file
anymore, so let's simply remove it now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Message-Id: <20220329151955.472306-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2022-03-31 21:29:15 +02:00
Thomas Huth b1f4b9b832 linux-user/sh4/termbits: Silence warning about TIOCSER_TEMT double definition
Seen while compiling on Alpine:

 In file included from ../linux-user/strace.c:17:
 In file included from ../linux-user/qemu.h:11:
 In file included from ../linux-user/syscall_defs.h:1247:
 ../linux-user/sh4/termbits.h:276:10: warning: 'TIOCSER_TEMT' macro redefined
  [-Wmacro-redefined]
 # define TIOCSER_TEMT    0x01   /* Transmitter physically empty */
          ^
 /usr/include/sys/ioctl.h:50:9: note: previous definition is here
 #define TIOCSER_TEMT 1
         ^
 1 warning generated.

Add the TARGET_ prefix here, too, like we do it on the other architectures.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Message-Id: <20220330134302.979686-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2022-03-31 21:27:02 +02:00
Peter Maydell d5341e0913 Fix tcg/aarch64 buglet for Windows on ARM host (#947).
-----BEGIN PGP SIGNATURE-----
 
 iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmJF32odHHJpY2hhcmQu
 aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9LRgf+OBgqWRGXEZeePI9L
 n36xhUUfbwP+btb9qqg5xJUFk0WAsAumcclQd7NQ3PVF+frz7P+ibfXSWgdgAAbS
 4GpOn7kqGy8RC1IjpSJQQGq/QisSd13s/vIY7FuzfiKiJkQvjjKOfb0kLhg30iC1
 7RoEQX3aHQu0zn6B5kmKqf4zhLZFZy/L+Dr5yrKHYhdm1QVn8E7K3yByZwYS4Rn3
 c1keFL2B4lzBCFvJM7tnzU8VmylX4d5C8mL56ZQ/MPai39vbWQwb42LmdRcJEsq3
 9iS27RWYlnGcmi5H5CzTzQAGnjQiy+/QlCUdnKbHo64jsmPjTXhufCRD92iFwQon
 p8o48w==
 =G33o
 -----END PGP SIGNATURE-----

Merge tag 'pull-tcg-20220331' of https://gitlab.com/rth7680/qemu into staging

Fix tcg/aarch64 buglet for Windows on ARM host (#947).

# gpg: Signature made Thu 31 Mar 2022 18:05:46 BST
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* tag 'pull-tcg-20220331' of https://gitlab.com/rth7680/qemu:
  tcg/aarch64: Use 'ull' suffix to force 64-bit constant

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-31 18:36:08 +01:00
Richard Henderson 7ceee3a19b tcg/aarch64: Use 'ull' suffix to force 64-bit constant
Typo used only 'ul' suffix, which is still 32-bits for windows host.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/947
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-03-31 11:03:59 -06:00
Peter Maydell cace6c6f3a QAPI patches patches for 2022-03-31
-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmJFh7YSHGFybWJydUBy
 ZWRoYXQuY29tAAoJEDhwtADrkYZT3ZQP/iq84QK73VCvCELHdjQ5mlL+u5SF1CUr
 6LQN8hTlIl/4sklJFRvnOcUEuBpTXtMK1+Wb4BxKzQTmq35USzLPkzuHM6Klvm3J
 ssAybG0C++5Wduu2qJPbOCqsypkyuaLfmW+e5CLwkJ11ZXsuRxvyDIsegxIddlxe
 m/1KiP8L5+XuqaLwddz3+IDf0PsUmOXRqMa7X4QdWFh4qp3SioImFfdo4VVBW4pL
 mpORrBoSDpOdFhSFNx36oegN2jASR6QOfLwspjnL0JZRf61K48pZmsRpglk5/CEx
 GlQkMTbPdY9TfGZeJgG2uIUG0N04jO9zHJFyWLwRVkfD3qbJSEgCXv21HNcDcuTG
 ilk5G9xt0xD/9uC0QfqwDm3uFijdr2Gna5l6Pri3ABookcQkCepY/K0naRVP7ghs
 9RGoe8vo3o2fnwbrH4IpuPZSJA1hSSidrnODK3EohY7Uph7zWveUB0ByPOsQfkVv
 h2lHpqW+5Hs9eSdvHSvf5ydzOcQSF+ZMvGnrtSbfdovNdNUEPwzEvTbLDbcZa2Gr
 vb95FpMgkE/YhV9Yd5OWYG7C/1YJPzRJCeRQQJBSE+zIMnELQLokP38yJLQYsKi1
 oUnqgDRJN9jsJuOo5KXWRjD0AYX37uuci9ZlyMLTpCSoubOsU3khmd0echm+lTpb
 AdeJ07q/HSkV
 =UtdQ
 -----END PGP SIGNATURE-----

Merge tag 'pull-qapi-2022-03-31' of git://repo.or.cz/qemu/armbru into staging

QAPI patches patches for 2022-03-31

# gpg: Signature made Thu 31 Mar 2022 11:51:34 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* tag 'pull-qapi-2022-03-31' of git://repo.or.cz/qemu/armbru:
  qapi: fix example of dump-guest-memory
  qapi: fix example of ACPI_DEVICE_OST event
  qapi: ui examples: add missing @websocket member
  qapi: fix example of MEMORY_FAILURE
  qapi: run-state examples: add missing @timestamp
  qapi: fix examples: SHUTDOWN and RESET events
  qapi: fix example of FAILOVER_NEGOTIATED event
  qapi: fix example of UNPLUG_PRIMARY event
  qapi: fix example of MEMORY_DEVICE_SIZE_CHANGE event
  qapi: fix example of DUMP_COMPLETED event
  qapi: fix example of BLOCK_JOB_PENDING event
  qapi: fix example of BLOCK_IO_ERROR event
  qapi: fix example of BLOCK_IMAGE_CORRUPTED event
  qapi: BlockExportRemoveMode: move comments to TODO
  schemas: add missing vim modeline

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-31 11:56:52 +01:00
Victor Toso 4375cf9868 qapi: fix example of dump-guest-memory
Example output lacks mandatory member @paging.  Provide it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-15-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:35:59 +02:00
Victor Toso 69bd6cb829 qapi: fix example of ACPI_DEVICE_OST event
Example output lacks mandatory member @timestamp.  Provide it.

Event's @data member is missing @info object. Provide it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-14-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:35:59 +02:00
Victor Toso aecba61786 qapi: ui examples: add missing @websocket member
The examples were missing mandatory member @websocket. Provide it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-13-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:35:59 +02:00
Victor Toso 05df03cfd3 qapi: fix example of MEMORY_FAILURE
Example output lacks mandatory member @timestamp.  Provide it.

Example output lacks mandatory member flags.recursive.  Provide it.

Minor: Change quotes from '' to "" in @action-required member.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-12-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message fixed up]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:35:40 +02:00
Victor Toso 1c4ec79114 qapi: run-state examples: add missing @timestamp
The changed examples were lacking mandatory member @timestamp.
Provide it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-11-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:52 +02:00
Victor Toso d219119fe3 qapi: fix examples: SHUTDOWN and RESET events
Example output lacks mandatory member @reason.  Provide it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-10-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:52 +02:00
Victor Toso 121c25b077 qapi: fix example of FAILOVER_NEGOTIATED event
Example output lacks mandatory member @timestamp.  Provide it.

Event's documentation is not properly formatted. Fix it by:
- Adding @ to "device-id"
- Adding extra line for "Since" section

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-9-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:52 +02:00
Victor Toso 0df5e9a301 qapi: fix example of UNPLUG_PRIMARY event
Example output lacks mandatory member @timestamp.  Provide it.

Example output is not properly formatted. Fixing it by:
- Adding '<-' to signalize it is receiving the data;
- Breaking lines similar to the other examples.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-8-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:52 +02:00
Victor Toso dba673b9ab qapi: fix example of MEMORY_DEVICE_SIZE_CHANGE event
Example output lacks mandatory member @qom-path. Provide it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220328140604.41484-7-victortoso@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:51 +02:00
Victor Toso 077a5b1ec3 qapi: fix example of DUMP_COMPLETED event
Example output lacks mandatory member @timestamp.  Provide it.

Example output is not properly formatted. Fixing it by:
 - Adding '<-' to signalize it is receiving the data;
 - Adding extra spaces around members @result, @total and @completed

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-6-victortoso@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:51 +02:00
Victor Toso 2c29d9b04b qapi: fix example of BLOCK_JOB_PENDING event
Example output has the wrong event's name in it. Fix it.

Example output shows incorrect member @device. Fix it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220328140604.41484-5-victortoso@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:51 +02:00
Victor Toso 39e8bb223e qapi: fix example of BLOCK_IO_ERROR event
Example output lacks mandatory member @reason.  Provide it.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Message-Id: <20220328140604.41484-4-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:51 +02:00
Victor Toso abbf04731f qapi: fix example of BLOCK_IMAGE_CORRUPTED event
Example output lacks mandatory member @fatal.  Provide it.

Example output shows a value of @msg no version of the code
produces.  No big deal, but replace it anyway by one that
today's code does produce.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Message-Id: <20220328140604.41484-3-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:51 +02:00
Victor Toso 97cd74f772 qapi: BlockExportRemoveMode: move comments to TODO
@hide and @soft are potential additions which fits the TODO section
perfectly.

The main motivation is to avoid this whole block of comment entering
the wrong section in the python parser.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-Id: <20220328140604.41484-2-victortoso@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:51 +02:00
Victor Toso bf37d537e6 schemas: add missing vim modeline
This is the last qapi schema that is missing the modeline.
Fixes 7e7237cd2b "schemas: add missing vim modeline"

Signed-off-by: Victor Toso <victortoso@redhat.com>
Message-Id: <20220325221605.53995-1-victortoso@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2022-03-31 12:34:51 +02:00
Peter Maydell aea6e47108 Update version for v7.0.0-rc2 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-29 23:32:18 +01:00
Peter Maydell aad3cc8626 Build bugfixes.
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJDEKcUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroMdoAf9HUF/p8hEwTTRLpi0V10N+3PW5jHP
 VK5jM1if5pPi+BBSY/k4k4j19cbxHZrTQx2NlWYTLArYZjEIZeO3OQ4Q1wsCEe53
 Mci0OUdV6Hs8wbpunEjHidMR9S8WpgmspUt57RU9zT29xagFZW5aDOBZTQgyntSI
 4e0CZqldTPk9VdjdVTw7QBM1HsYE03ZsMv4S+TV5DBE+AmItcyTuzxL5Voq+1kmT
 I4rZFG/Keenekm/+tEJl6kdZBP9PuTmwLfO59nMUf0UfoHJIHvII2i2jDwZMDcy3
 uUDDcFf3ToYIcqm3Xnq8EuwRw9kfTurqFughYra+E4ERbY6m+TYMGAlC0A==
 =ZjUU
 -----END PGP SIGNATURE-----

Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

Build bugfixes.

# gpg: Signature made Tue 29 Mar 2022 14:59:03 BST
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  tests/tcg: really fix path to target configuration
  virtio: fix --enable-vhost-user build on non-Linux

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-29 22:20:20 +01:00
Peter Maydell 68894b5fed Block patches for 7.0-rc2:
- Disable GLOBAL_STATE_CODE() assertion for the 7.0 release: We got
   another bug report for this, and we do not have the time to
   investigate before 7.0, so disable the assertion for the release, to
   re-enable and continue investigation in the 7.1 cycle
 
 - stream job fix (regarding interaction with concurrent block jobs)
 
 - iotests fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEy2LXoO44KeRfAE00ofpA0JgBnN8FAmJDHeUSHGhyZWl0ekBy
 ZWRoYXQuY29tAAoJEKH6QNCYAZzfmnsP/AqkJG6SWl1pxiENzKp3lszAO1oyA1+e
 4xzbSnN2M00LiJpbYPdcw7v8lsRpO+td7CbSSxYEDNMqHmQiszQ8oQ2CL6mi5ZB5
 I3Rg+sO0cgbE3+00yEjCNX8j0cigcExsepUMj4DJs54Ys1L5LCgvideFmnAV3tn3
 wdDPW1n04/GNYks8ItVfJyl0elSkqUUPR7DIgUxRSJK9yU3u5L1HWWxQXs/qRsyv
 S/DCQMdcang4yfnmu3h81C02g9E+Q/6297T4oRd5QXLZNCf11sOV3mEYNFBLOAWo
 GrgMZJme0hlfmTJyLd0/jcUxiS0YEhw0d7YBTZ2AqJcYQE6Tm9CyXPqjheIKAONq
 gLDmLObV7f7wVtqpaU4MmP3HzsqwOu14zArgqtlbW22yzfzCTJmqm59IXl0VHs9o
 +UzQfG4ZWQIhCm+W4373UnNlbu5mS5pSz2PUkEeHXfhwxOXJqWm+p4C8Eub0M/8t
 VmZzAxgpDPQiWKq7xQ0UOj1vuW5UZwS52T3G+B6mRN4I8pkoamiRxWM8YEQPqvGf
 p+YMmGw6rQ3hatIz1gZxcdJ0pUSW8sQuxXCi8KQkbnyi057v8y/vVN0ZiCS6eBQX
 /ePd6Ci8OLUvPY3UJZ9n7GerU1cePwRoU4VVhzMZMd0VIGDAJjlBzUzKNG3XP7Ym
 tfLD3jGUmIDX
 =JjXm
 -----END PGP SIGNATURE-----

Merge tag 'pull-block-2022-03-29' of https://gitlab.com/hreitz/qemu into staging

Block patches for 7.0-rc2:
- Disable GLOBAL_STATE_CODE() assertion for the 7.0 release: We got
  another bug report for this, and we do not have the time to
  investigate before 7.0, so disable the assertion for the release, to
  re-enable and continue investigation in the 7.1 cycle

- stream job fix (regarding interaction with concurrent block jobs)

- iotests fixes

# gpg: Signature made Tue 29 Mar 2022 15:55:33 BST
# gpg:                using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF
# gpg:                issuer "hreitz@redhat.com"
# gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00  4D34 A1FA 40D0 9801 9CDF

* tag 'pull-block-2022-03-29' of https://gitlab.com/hreitz/qemu:
  iotests: Fix status checks
  block/stream: Drain subtree around graph change
  main-loop: Disable GLOBAL_STATE_CODE() assertions
  iotests: update test owner contact information

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-29 20:53:05 +01:00
Laurent Vivier 6ae6a30ca5 tests/qtest: failover: fix infinite loop
If the migration is over before we cancel it, we are
waiting in a loop a state that never comes because the state
is already "completed".

To avoid an infinite loop, skip the test if the migration
is "completed" before we were able to cancel it.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-id: 20220329124259.355995-1-lvivier@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-29 16:40:05 +01:00
Hanna Reitz d5699c0d4b iotests: Fix status checks
An iotest's 'paused' condition is fickle; it will be reported as true
whenever the job is drained, for example, or when it is in the process
of completing.

030 and 041 contain such checks, we should replace them by checking the
job status instead.  (As was done for 129 in commit f9a6256b48
for the 'busy' condition.)

Additionally, when we want to test that a job is paused on error, we
might want to give it some time to actually switch to the paused state.
Do that by waiting on the corresponding JOB_STATUS_CHANGE event.  (But
only if they are not already paused; the loops these places are in fetch
all VM events, so they may have already fetched that event from the
queue.)

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220324180221.24508-1-hreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2022-03-29 16:30:55 +02:00
Hanna Reitz b1e1af394d block/stream: Drain subtree around graph change
When the stream block job cuts out the nodes between top and base in
stream_prepare(), it does not drain the subtree manually; it fetches the
base node, and tries to insert it as the top node's backing node with
bdrv_set_backing_hd().  bdrv_set_backing_hd() however will drain, and so
the actual base node might change (because the base node is actually not
part of the stream job) before the old base node passed to
bdrv_set_backing_hd() is installed.

This has two implications:

First, the stream job does not keep a strong reference to the base node.
Therefore, if it is deleted in bdrv_set_backing_hd()'s drain (e.g.
because some other block job is drained to finish), we will get a
use-after-free.  We should keep a strong reference to that node.

Second, even with such a strong reference, the problem remains that the
base node might change before bdrv_set_backing_hd() actually runs and as
a result the wrong base node is installed.

Both effects can be seen in 030's TestParallelOps.test_overlapping_5()
case, which has five nodes, and simultaneously streams from the middle
node to the top node, and commits the middle node down to the base node.
As it is, this will sometimes crash, namely when we encounter the
above-described use-after-free.

Taking a strong reference to the base node, we no longer get a crash,
but the resuling block graph is less than ideal: The expected result is
obviously that all middle nodes are cut out and the base node is the
immediate backing child of the top node.  However, if stream_prepare()
takes a strong reference to its base node (the middle node), and then
the commit job finishes in bdrv_set_backing_hd(), supposedly dropping
that middle node, the stream job will just reinstall it again.

Therefore, we need to keep the whole subtree drained in
stream_prepare(), so that the graph modification it performs is
effectively atomic, i.e. that the base node it fetches is still the base
node when bdrv_set_backing_hd() sets it as the top node's backing node.

Verify this by asserting in said 030's test case that the base node is
always the top node's immediate backing child when both jobs are done.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220324140907.17192-1-hreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru>
2022-03-29 16:30:55 +02:00
Hanna Reitz b1c0734905 main-loop: Disable GLOBAL_STATE_CODE() assertions
These assertions are very useful for developers to find bugs, and so
they have indeed pointed us towards bugs already.  For users, it is not
so useful to find these bugs.  We should probably not enable them in
releases until we are sufficiently certain that they will not fire
during normal operation, unless something is going seriously wrong.

For example, we have received a bug report that you cannot add an NBD
server on a BDS in an I/O thread with `-incoming defer`.  I am sure this
is a real bug that needs investigation, but we do not really have that
time right now, so close to release, and so I would rather disable the
assertions to get time to investigate such reports.

(I am just putting the link as "buglink" below, not "closes", because
disabling the assertion will not fix the likely underlying bug.)

Buglink: https://gitlab.com/qemu-project/qemu/-/issues/945
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220329093545.52114-1-hreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
2022-03-29 16:30:55 +02:00
John Snow 42a5009d88 iotests: update test owner contact information
Quite a few of these tests have stale contact information. This patch
updates the stale ones that I happen to be aware of at the moment.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20220322174212.1169630-1-jsnow@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
2022-03-29 16:30:55 +02:00
Peter Maydell 44064550d9 Darwin patches
- UI fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmJCOc0ACgkQ4+MsLN6t
 wN7OnBAA1ePpS/XQu238h5OBlZpZjgoxomY8paaunSpCyrz0NMest4sJIXmBgA6B
 ryKLQZJQTWzQ/PuAAveML2mkJJsrWUKfH+7c2CyFWV2BmzSvolQ873Dge2mNApTk
 uxKGQosI4WSv79G1GC885UlC8lN1x+HeGLmb1rzxC5q/3S5a2Umtbowg7g6cGoax
 mCyFyftWJ71uEeTFioNjFGFH+fQkMvMMHViA/t0jy6O+y2PZeVxi0RY3lv25471w
 nJTC7nFzD7b5x6hHp9TByjcFqsfADdIiB5TWiiC6loKSii3KdksKYU5v3Qg7raQ1
 VYfHwJeSLatw6p6BPvT5OzWkvldnjmVu6s9SzEaFSTYrIE2o1cOYuxns/eh5UyL5
 HWgukMfrxy9BXPl92JKQRS9AJ16EDT1PNBut6EtqhaU9CGdz/CLFqcWCHJSkF/bu
 qpB3MxLdX3LjmpIK55Sg3HR2UtcGWonf08/jrMKFwxleVM1ztbVhtNFzvJf2gYW0
 kq0uLsIK0N7IsCl+wHaptG8EvysFrfBZBXp8D6fgsMh+su1Bov63Q/NRK1kySv5P
 pUdESweAlUMhuJ9F/8Qaj84UTl+c/QN0WqJ2BJMR9f8LMABwBOuJWi+fWde5eBaq
 DMXeK4gRQIHXDSyr5r+xuer+RS2AzlkYNosu+8SmG1rWaH1YV2g=
 =edDj
 -----END PGP SIGNATURE-----

Merge tag 'darwin-20220329' of https://github.com/philmd/qemu into staging

Darwin patches

- UI fixes

# gpg: Signature made Mon 28 Mar 2022 23:42:21 BST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown]
# 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: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'darwin-20220329' of https://github.com/philmd/qemu:
  ui/console: Check console before emitting GL event
  ui/cocoa: Respect left-command-key option
  main-loop: Disable block backend global state assertion on Cocoa
  gitattributes: Cover Objective-C source files

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-29 15:17:53 +01:00
Paolo Bonzini 36e38426ff tests/tcg: really fix path to target configuration
This was attempted in commit 533b0a1a41 ("tests/tcg: Fix target-specific
Makefile variables path for user-mode", 2022-01-12) but it also used the
wrong path; default.mak is used for config/devices, not config/targets.

While at it, explain what the inclusion is about.

Cc: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-29 15:58:39 +02:00
Paolo Bonzini 14b61778bc virtio: fix --enable-vhost-user build on non-Linux
The vhost-shadow-virtqueue.c build requires include files from
linux-headers/, so it cannot be built on non-Linux systems.
Fortunately it is only needed by vhost-vdpa, so move it there.

Acked-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-29 15:58:06 +02:00
Peter Maydell bed1fa2fbe MIPS patches queue
- ABI fixes (Xuerui, Andreas)
 - Memory API alias fix (David)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmJC4MIACgkQ4+MsLN6t
 wN56uRAAn3P4PbUrGnTh6xe8bZPvKnWV5EUbwxNlq8FkW9BkV+1c+EXJRt12tvU+
 uEKa0XG+he0Ku8CoeQFb/Em7VFEr9z/ZOUumWhjGcOrzxLzjiTjpwSu7agH23XBG
 hEvywbY2DPyypmGPMXbBxBg1jhfnAc3RKpXfm6v/3E4YCcYoAeGbDH81jZd2rZ0j
 jDNEEDrzdh7PaVts9NB6NW+1oyX2PLg+iOSKeYBoU23yc/khzQ0hcRV0+jxTkN3U
 Zddly7gG2BjVyNMYPdn5dI6qQSV2UlAUneBz/C9/IOaxNz6PJ6SI0zwFgnJDCPUF
 fpH16ugTLQZqxv/DE5z3PslxR3EFfPBzXdhWwZUPTnq6qjpJUNAwp5kqdsJiNx2c
 9GPIv5Mx4VcGPSxxVQMGC2V5sVhMvTNFsf2Q1szZAZXDuB/gSGEl59NUYcW7herX
 gg6fktZOmqhmPZwRSdrWUmbJWagdBBBoVkyCM7fYmGfD2JPR7fLCPBe2ADE/AFir
 ee252JTR+jcG/xcd9MjW74tPWmmv0CqWoBhtd5n428cWe3uQhJwEEYCOP1RG+uSC
 C/+wzOt7moDlbniwHNmdVvfJDCl5XkYjF72DT6M88zpACaXSKXnjeySu++ELIxTN
 aY2uvLd5MBkmzG5n3rOzq7fe9kgmCkkoczppY8S5vCKPwmzkipk=
 =gg/P
 -----END PGP SIGNATURE-----

Merge tag 'mips-20220329' of https://github.com/philmd/qemu into staging

MIPS patches queue

- ABI fixes (Xuerui, Andreas)
- Memory API alias fix (David)

# gpg: Signature made Tue 29 Mar 2022 11:34:42 BST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown]
# 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: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'mips-20220329' of https://github.com/philmd/qemu:
  qemu-binfmt-conf.sh: mips: allow nonzero EI_ABIVERSION, distinguish o32 and n32
  target/mips: Fix address space range declaration on n32
  memory: Make memory_region_readd_subregion() properly handle mapped aliases

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-29 12:53:15 +01:00
Andreas K. Hüttel 77d119dd33 qemu-binfmt-conf.sh: mips: allow nonzero EI_ABIVERSION, distinguish o32 and n32
With the command line flag -mplt and a recent toolchain, ELF binaries
generated by gcc can obtain EI_ABIVERSION=1, which makes, e.g., gcc
three-stage bootstrap in a mips-unknown-linux-gnu qemu-user chroot
fail since the binfmt-misc magic does not match anymore. Also other
values are technically possible. qemu executes these binaries just
fine, so relax the mask for the EI_ABIVERSION byte at offset 0x08.

In addition, extend magic string to distinguish mips o32 and n32 ABI.
This information is given by the EF_MIPS_ABI2 (0x20) bit in the
e_flags field of the ELF header (a 4-byte value at offset 0x24 for
the here applicable ELFCLASS32).

See-also: ace3d65459
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: WANG Xuerui <xen0n@gentoo.org>
Cc: Laurent Vivier <laurent@vivier.eu>
Cc: WANG Xuerui <xen0n@gentoo.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Alex Bennee <alex.bennee@linaro.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Closes: https://gitlab.com/qemu-project/qemu/-/issues/843
Message-Id: <20220328204900.3914990-1-dilfridge@gentoo.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-03-29 00:51:55 +02:00
WANG Xuerui 8cd0e66353 target/mips: Fix address space range declaration on n32
This bug is probably lurking there for so long, I cannot even git-blame
my way to the commit first introducing it.

Anyway, because n32 is also TARGET_MIPS64, the address space range
cannot be determined by looking at TARGET_MIPS64 alone. Fix this by only
declaring 48-bit address spaces for n64, or the n32 user emulation will
happily hand out memory ranges beyond the 31-bit limit and crash.

Confirmed to make the minimal reproducing example in the linked issue
behave.

Closes: https://gitlab.com/qemu-project/qemu/-/issues/939
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
Tested-by: Andreas K. Huettel <dilfridge@gentoo.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220328035942.3299661-1-xen0n@gentoo.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-03-29 00:51:50 +02:00
David Hildenbrand a8749d7cc9 memory: Make memory_region_readd_subregion() properly handle mapped aliases
memory_region_readd_subregion() wants to readd a region by first
removing it and then readding it. For readding, it doesn't use one of
the memory_region_add_*() variants, which is why fail to re-increment the
mr->mapped_via_alias counters, resulting in the
assert(alias->mapped_via_alias >= 0) in memory_region_del_subregion()
triggering the next time we call memory_region_readd_subregion().

Fix it by using memory_region_add_subregion_common() for readding the
region.

Reported-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Fixes: 5ead62185d ("memory: Make memory_region_is_mapped() succeed when mapped via an alias")
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220201100940.47788-1-david@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-03-29 00:44:40 +02:00
Akihiko Odaki 1699d00e5b ui/console: Check console before emitting GL event
Without this change, The GL output of a console overwrites the
other consoles and makes them unusable.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220325161216.74582-1-akihiko.odaki@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-03-29 00:41:50 +02:00
Akihiko Odaki d6b6dea77e ui/cocoa: Respect left-command-key option
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Fixes: 4797adce5f ("ui/cocoa: add option to swap Option and Command")
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220317152949.68666-1-akihiko.odaki@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-03-29 00:41:50 +02:00
Philippe Mathieu-Daudé 47281859f6 main-loop: Disable block backend global state assertion on Cocoa
Since commit 0439c5a462 ("block/block-backend.c: assertions for
block-backend") QEMU crashes when using Cocoa on Darwin hosts.

Example on macOS:

  $ qemu-system-i386
  Assertion failed: (qemu_in_main_thread()), function blk_all_next, file block-backend.c, line 552.
  Abort trap: 6

Looking with lldb:

  Assertion failed: (qemu_in_main_thread()), function blk_all_next, file block-backend.c, line 552.
  Process 76914 stopped
  * thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
     frame #4: 0x000000010057c2d4 qemu-system-i386`blk_all_next.cold.1
  at block-backend.c:552:5 [opt]
      549    */
      550   BlockBackend *blk_all_next(BlockBackend *blk)
      551   {
  --> 552       GLOBAL_STATE_CODE();
      553       return blk ? QTAILQ_NEXT(blk, link)
      554                  : QTAILQ_FIRST(&block_backends);
      555   }
  Target 1: (qemu-system-i386) stopped.

  (lldb) bt
  * thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
     frame #0: 0x00000001908c99b8 libsystem_kernel.dylib`__pthread_kill + 8
     frame #1: 0x00000001908fceb0 libsystem_pthread.dylib`pthread_kill + 288
     frame #2: 0x000000019083a314 libsystem_c.dylib`abort + 164
     frame #3: 0x000000019083972c libsystem_c.dylib`__assert_rtn + 300
   * frame #4: 0x000000010057c2d4 qemu-system-i386`blk_all_next.cold.1 at block-backend.c:552:5 [opt]
     frame #5: 0x00000001003c00b4 qemu-system-i386`blk_all_next(blk=<unavailable>) at block-backend.c:552:5 [opt]
     frame #6: 0x00000001003d8f04 qemu-system-i386`qmp_query_block(errp=0x0000000000000000) at qapi.c:591:16 [opt]
     frame #7: 0x000000010003ab0c qemu-system-i386`main [inlined] addRemovableDevicesMenuItems at cocoa.m:1756:21 [opt]
     frame #8: 0x000000010003ab04 qemu-system-i386`main(argc=<unavailable>, argv=<unavailable>) at cocoa.m:1980:5 [opt]
     frame #9: 0x00000001012690f4 dyld`start + 520

As we are in passed release 7.0 hard freeze, disable the block
backend assertion which, while being valuable during development,
is not helpful to users. We'll restore this assertion immediately
once 7.0 is released and work on a fix.

Suggested-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220325183707.85733-1-philippe.mathieu.daude@gmail.com>
2022-03-29 00:41:46 +02:00
Philippe Mathieu-Daudé bc4ca8efba gitattributes: Cover Objective-C source files
Apple's Git distribution actually carries a similar file which
annotates *.m:
https://github.com/apple-opensource/Git/blob/73/gitattributes

See comments in commit 29cf16db23 ("buildsys: Help git-diff
adding .gitattributes config file") for details.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <20220317130326.39188-1-philippe.mathieu.daude@gmail.com>
2022-03-29 00:15:14 +02:00
Peter Maydell 27fc9f365d ppc-7.0 queue:
* target/ppc: fix helper_xvmadd* argument order
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmI/DdIACgkQUaNDx8/7
 7KF40Q/8DFt4QM5Ck6FsyqB3wYBNmxG8ELDkVDTpt2lGCcs32I/Xd7Bjxxe2pOKN
 9o/Ya2NvYLeT/QV7nmHOrj/LjbQfNTN+i8D6p5b9t5Tn8zoiR13KnIEdUALTCoR3
 nwkdm0GiUMYcMlhJZ/NNIy3aVqMw1A3IUHI+kBzwuKGYA1dNxZ63QvbyFI9uu61V
 FhF5onbFZPYxuJly03KMePTndyVmC1dYsujQbmZax43fklL0Kxz3GrrbRwHQLw4b
 oodkA1KiHq+H5chqdQSbpAfFdWUEnfH2GMCPfGgEXQMni4uJyVLuepZ2KTdMvyUD
 nEQUIONaIQnMRo4O6Eixe4i6YMSeEqp+ds/Tfy7NUtEDR//R40zn4hCv/ohjiGtB
 YLT0EuCyXsMCPCflOEM00JtUP0pQX4rB9dw6kI7jwMZVYYUSRaUzPTvN0yj6yML1
 PiuMliBGhYwMmR227oAnoBQ7aYaT6knvik3Q8R8noCEKL1HZJ+zennA42v0Cuuc4
 hHjMPV76klalWzm3ydCkgWhmhQmcJUWJwnSgct+lXq/vqhirMPizruR1on6NJptM
 DIgeersA+Jv5tukfuMAR0uTVrQ9McOjXE3RQIk/b0CJH65WODecHj+PHoFzcvzWg
 i0VMSFCUrjww891tELdjGMog7DZrmoJURoFIy0NV97/NUdrF12s=
 =IPtV
 -----END PGP SIGNATURE-----

Merge tag 'pull-ppc-20220326' of https://github.com/legoater/qemu into staging

ppc-7.0 queue:

* target/ppc: fix helper_xvmadd* argument order

# gpg: Signature made Sat 26 Mar 2022 12:57:54 GMT
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [undefined]
# 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: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1

* tag 'pull-ppc-20220326' of https://github.com/legoater/qemu:
  target/ppc: fix helper_xvmadd* argument order

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-28 10:16:33 +01:00
Matheus Ferst bc504838ff target/ppc: fix helper_xvmadd* argument order
When the xsmadd* insns were moved to decodetree, the helper arguments
were reordered to better match the PowerISA description. The same macro
is used to declare xvmadd* helpers, but the translation macro of these
insns was not changed accordingly.

Reported-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Fixes: e4318ab2e4 ("target/ppc: move xs[n]madd[am][ds]p/xs[n]msub[am][ds]p to decodetree")
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Tested-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Message-Id: <20220325111851.718966-1-matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-03-26 13:52:37 +01:00
Peter Maydell 3d31fe4d66 target-arm queue:
* hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
  * target/arm: Fix sve_ld1_z and sve_st1_z vs MMIO
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmI92DAZHHBldGVyLm1h
 eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3lSeD/9PDSi2QzYjwR5nMJarNMdk
 EBino607q6QJMzLHGwx8T1rBL2F0J/5hsyZEtIB6jeOMKPSTv2eX0ONT9wDJ4FK4
 fvXBPt0dTbij4zhBV3pSjPNMvnORpZNyeuHC6nz2ClrbY1ZcbWqxLllxm/rNpkcO
 tD8o2kQIUHRBVS9o3od9n8VoL+b6KBn9+zwmV88/Z1CQYrmXLhrDhZPuWtO/2oIR
 N+DprCUoWiY64j2N/eMxIYPok0/Syz7pN8SGkkNE6nKXv9r+cLOW+22xolSHMl12
 t4E8+caI52PjthN1Mf0hOVW6MCyPnjV/5hF1tmN9dOY0D16KTdSQqmWCDerCTxCa
 dB7F5IN7XOv/Llf6qPnaqmYNhrB289VkoFQSoao9zoQUdx9qUkhPxmIgKynGyEpf
 qZCmmPD1MDSADSff7FnoxpF2z9wwenX2hqc8luBGHzLGTDFlyWD6GxqGS21gRvfw
 gfqSIGZOKs1f9S0tMvR6i1ItemHdwRc0mccuoPrEweav6x87yc1AqhJPOACKkdO7
 4d2ULbW8aPUYhn6Wamkl7FX+eD8NslQhOxC++TV65yq5ZTppJiKJUBTYh1UNfNN6
 5icGbbSbCfPZcYaJTBkf75LPNKvmh3o6kJzI0Q1wuzGsVoKJMjV4+RjxUJJUY5Au
 SEsye6u6CWCSbyKXXnMEGw==
 =lCfE
 -----END PGP SIGNATURE-----

Merge tag 'pull-target-arm-20220325' of https://git.linaro.org/people/pmaydell/qemu-arm into staging

target-arm queue:
 * hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
 * target/arm: Fix sve_ld1_z and sve_st1_z vs MMIO

# gpg: Signature made Fri 25 Mar 2022 14:56:48 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

* tag 'pull-target-arm-20220325' of https://git.linaro.org/people/pmaydell/qemu-arm:
  hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
  target/arm: Fix sve_ld1_z and sve_st1_z vs MMIO

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-25 15:02:39 +00:00
Peter Maydell c7ca3ad5e7 hw/intc/arm_gicv3_its: Add missing newlines to process_mapc() logging
In commit 84d43d2e82 we rearranged the logging of errors in
process_mapc(), and inadvertently dropped the trailing newlines
from the log messages. Restore them. The same commit also
attempted to switch the ICID printing to hex (which is how we
print ICIDs elsewhere) but only did half the job, adding the
0x prefix but leaving the format string at %d; correct to %x.

Fixes: 84d43d2e82 ("hw/intc/arm_gicv3_its: In MAPC with V=0, don't check rdbase field")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2022-03-25 14:41:06 +00:00
Richard Henderson 6222c3acc4 target/arm: Fix sve_ld1_z and sve_st1_z vs MMIO
Both of these functions missed handling the TLB_MMIO flag
during the conversion to handle MTE.

Fixes: 10a85e2c8a ("target/arm: Reuse sve_probe_page for gather loads")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/925
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220324010932.190428-1-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-25 14:41:06 +00:00
Peter Maydell f345abe365 Bugfixes.
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmI8rhEUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNg/Af/Tc2nO2ys6kARtQzenHmCQgKzS5V/
 uqi+EzneLQv0t/W6gvSedk3xFbQf+XUU/yDTF2Z9LhjgK/utij9THqzkGpLGBeuF
 +d0dB9/gnNlwqEBVSy3S9YCFmwPAW+0sHeKSYPucr89PhtveB24UVCec0S3Ko4/2
 hL+oTq/07VmCXJf3e06TPpgTBAQsXsKmsghoZjItopkhs4TbAcIgJhrHX9JFKkSY
 hNzsr+s/AHx3IZRlt2rKQljnukZ843xK91YWPsWufOHn3pYab6UiYzsmaJ9sE3tM
 Jf7Igk35RH/qmkl79ctk5RpdKzgrxKIMRPosvRjxKvLedIu+KQ8iScDZEg==
 =pv+6
 -----END PGP SIGNATURE-----

Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

Bugfixes.

# gpg: Signature made Thu 24 Mar 2022 17:44:49 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  build: disable fcf-protection on -march=486 -m16
  target/i386: properly reset TSC on reset
  target/i386: tcg: high bits SSE cmp operation must be ignored
  configure: remove dead int128 test
  KVM: x86: workaround invalid CPUID[0xD,9] info on some AMD processors
  i386: Set MCG_STATUS_RIPV bit for mce SRAR error
  target/i386/kvm: Free xsave_buf when destroying vCPU

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-25 10:14:47 +00:00
Peter Maydell 10c473246b Pull request
Philippe found cases where the 0x%d format string was used, leading to
 misleading output. The patches look harmless and could save people time, so I
 think it's worth including them in 7.0.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmI8pygACgkQnKSrs4Gr
 c8gRYAgAr+5s+Zjd8fMhS4pZqlABkR44eUMSG6rJSKuu10nqjMfu53MORdOp1oMT
 hmgG2cbwcsGl3R4gulrzHuzAGA9NcNwpc39SFZxZA3J6WzzOWU5gWVWbLRqFrDXL
 d9zdf8irhyOiToggIVWvaw74W+aKYzji9U1HanNceaw4H/SltPQXJGRlJO68paUH
 4ZD9G1h4CZ/c0JvrYTp3TL/Th+9ZhKt4LADJaEZBThIT0hQOa/NdZie7P0Ex24Kx
 P6lJPF4FQJxoMhg2zQwpZBxAVQ0P4Fb4qNcgkmwb4IE3rkxFGXV+gMUctLiNPxdl
 e9teojEkgp7AFp7DUsI2MUpmsZvuTA==
 =M3M2
 -----END PGP SIGNATURE-----

Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging

Pull request

Philippe found cases where the 0x%d format string was used, leading to
misleading output. The patches look harmless and could save people time, so I
think it's worth including them in 7.0.

# gpg: Signature made Thu 24 Mar 2022 17:15:20 GMT
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* tag 'block-pull-request' of https://gitlab.com/stefanha/qemu:
  hw: Fix misleading hexadecimal format
  block: Fix misleading hexadecimal format

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-24 20:08:39 +00:00
Christian Ehrhardt 9584d3d00a build: disable fcf-protection on -march=486 -m16
Some of the roms build with -march=i486 -m16 which is incompatible
with -fcf-protection. That in turn is can be set by default, for
example in Ubuntu [1].
That causes:
 cc1: error: ‘-fcf-protection’ is not compatible with this target

This won't work on -march=i486 -m16 and no matter if set or not we can
override it to "none" if the option is known to the compiler to be
able to build reliably.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/889

[1]: https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-fcf-protection

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220323090713.1002588-1-christian.ehrhardt@canonical.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-24 18:44:07 +01:00
Paolo Bonzini 5286c36622 target/i386: properly reset TSC on reset
Some versions of Windows hang on reboot if their TSC value is greater
than 2^54.  The calibration of the Hyper-V reference time overflows
and fails; as a result the processors' clock sources are out of sync.

The issue is that the TSC _should_ be reset to 0 on CPU reset and
QEMU tries to do that.  However, KVM special cases writing 0 to the
TSC and thinks that QEMU is trying to hot-plug a CPU, which is
correct the first time through but not later.  Thwart this valiant
effort and reset the TSC to 1 instead, but only if the CPU has been
run once.

For this to work, env->tsc has to be moved to the part of CPUArchState
that is not zeroed at the beginning of x86_cpu_reset.

Reported-by: Vadim Rozenfeld <vrozenfe@redhat.com>
Supersedes: <20220324082346.72180-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-24 18:30:46 +01:00
Peter Maydell 9c72129150 linux-user pull request 20220324
Fix MIPS n32
 Fix ppoll, epoll_wait, pselect
 Fix error message in elfload.c
 Implement ARM __kernel_memory_barrier/__kernel_cmpxchg/__kernel_cmpxchg64
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmI8Ka0SHGxhdXJlbnRA
 dml2aWVyLmV1AAoJEPMMOL0/L7489LgP/juiqff3VLmkMt5YnlVJKNDONEBh/O3e
 vNtts+I3kJcxRNupLcp59avfYIQEy6HlFX2stTTEt06mw7Ll9pQJPUIjI9mToT6a
 h9KhZoPoIV0nUvteg02Rm94+TlIclsUqp61DwtyyhZE2xAasprirUtojC9zzh7rJ
 wMiWeJEwQb3aAEM4hrxk9aDZoxqlXMcGRMqO7ptFJh1LQ+oLqTnDMgIb/CCKyV2y
 mXzESz04mEGyYumzJOxUzb6sAV5W1cgsFWUbNpiXTitJgPi/jrCcsS39RZp5yOc7
 +V9uUzMkCfVLRJNpMr506j8DBGL+3TLLggkJkJ0kwlwTo9+pGc79Tu5ZAs7BxILZ
 8ptpNtYitKYLJGBSCIqtG9CqBpG2RMsQAPFTe3jg91JE0MpiE8JVqRYMnU0gaEka
 /15w+CQJprinIQxBo4M3Gjp5tfztWKh5ju3cD9dibYoqjiGxaXOtwgpHwjjKPkJu
 B8LYyysehoTCwx/3h2H6h9iW3d9a2qxB6fcHkKdWAs1SxI2v+rkE+i1RJl1wb6rB
 hHwC1zvjkv3FVCcsqYEjGdpnJ6FDyAsIsMjRViALREjl0Y3VzLPPdxbCiBFuv7Ji
 v4FDF60NlO26rWExl8WJoQRHtz1Qkia3tPgPxTV5+iukvIt6UZILgRB5iZ/JpU+C
 6+t3few6PFnI
 =XlA7
 -----END PGP SIGNATURE-----

Merge tag 'linux-user-for-7.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging

linux-user pull request 20220324

Fix MIPS n32
Fix ppoll, epoll_wait, pselect
Fix error message in elfload.c
Implement ARM __kernel_memory_barrier/__kernel_cmpxchg/__kernel_cmpxchg64

# gpg: Signature made Thu 24 Mar 2022 08:19:57 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* tag 'linux-user-for-7.0-pull-request' of https://gitlab.com/laurent_vivier/qemu:
  linux-user/arm: Implement __kernel_cmpxchg64 with host atomics
  linux-user/arm: Implement __kernel_cmpxchg with host atomics
  linux-user/arm: Implement __kernel_memory_barrier
  linux-user: Fix missing space in error message
  linux-user: Properly handle sigset arg to ppoll
  linux-user: Properly handle sigset arg to epoll_pwait
  linux-user: Properly handle sigset arg to pselect
  linux-user: Split out helpers for sigsuspend
  linux-user/alpha: Fix sigsuspend for big-endian hosts
  linux-user: Fix syscall parameter handling for MIPS n32

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-03-24 16:32:22 +00:00