[Qemu-commits] [qemu/qemu] 4985d8: tests/tcg: don't append QEMU_OPTS for armv6m-undef...

2024-05-16 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4985d876ee681368e86163637c1cbd3451d4c514
  
https://github.com/qemu/qemu/commit/4985d876ee681368e86163637c1cbd3451d4c514
  Author: Alex Bennée 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M tests/tcg/arm/Makefile.softmmu-target

  Log Message:
  ---
  tests/tcg: don't append QEMU_OPTS for armv6m-undef test

We don't want to build on the default machine setup here but define a
custom one for the microbit.

Reviewed-by: Pierrick Bouvier 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-2-alex.ben...@linaro.org>


  Commit: b51ddd937f11f76614d4b36d14d8778df242661c
  
https://github.com/qemu/qemu/commit/b51ddd937f11f76614d4b36d14d8778df242661c
  Author: Alex Bennée 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M scripts/update-linux-headers.sh

  Log Message:
  ---
  scripts/update-linux-header.sh: be more src tree friendly

Running "install_headers" in the Linux source tree is fairly
unfriendly as out-of-tree builds will start complaining about the
kernel source being non-pristine. As we have a temporary directory for
the install we should also do the build step here. So now we have:

  $tmpdir/
$blddir/
$hdrdir/

Reviewed-by: Pierrick Bouvier 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-3-alex.ben...@linaro.org>


  Commit: 21032784e56e9687f8c9d4abb75db4b15629c9b1
  
https://github.com/qemu/qemu/commit/21032784e56e9687f8c9d4abb75db4b15629c9b1
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: prepare introduction of new inline ops

Until now, only add_u64 was available, and all functions assumed this or
were named uniquely.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-4-alex.ben...@linaro.org>


  Commit: 299c82b8ae31ef446cad9ef5b04efd49e1d02528
  
https://github.com/qemu/qemu/commit/299c82b8ae31ef446cad9ef5b04efd49e1d02528
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c

  Log Message:
  ---
  plugins: extract generate ptr for qemu_plugin_u64

Plugin operations can access a scoreboard. This function factorizes code
generation for accessing entry associated to a given vcpu.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-3-pierrick.bouv...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-5-alex.ben...@linaro.org>


  Commit: 36a1d8e7102c22e7def1d4146a6b824ec98b3a89
  
https://github.com/qemu/qemu/commit/36a1d8e7102c22e7def1d4146a6b824ec98b3a89
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M include/qemu/qemu-plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: add new inline op STORE_U64

This new operation can store an immediate u64 value to a given
scoreboard.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-4-pierrick.bouv...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-6-alex.ben...@linaro.org>


  Commit: a1c9bf2514d82b757288ee61584e667ddcb19a4f
  
https://github.com/qemu/qemu/commit/a1c9bf2514d82b757288ee61584e667ddcb19a4f
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M tests/plugin/inline.c

  Log Message:
  ---
  tests/plugin/inline: add test for STORE_U64 inline op

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-5-pierrick.bouv...@linaro.org>
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-7-alex.ben...@linaro.org>


  Commit: 7de77d37880d7267a491cb32a1b2232017d1e545
  
https://github.com/qemu/qemu/commit/7de77d37880d7267a491cb32a1b2232017d1e545
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M include/qemu/qemu-plugin.h
M plugins/api.c
M plugins/core.c
M plugins/plugin.h
M plugins/qemu-plugins.symbols

  Log Message:
  ---
  plugins: conditional callbacks

Extend plugins API to support callback called with a given criteria
(evaluated inline).

Added functions:
- qemu_plugin_register_vcpu_tb_exec_cond_cb
- qemu_plugin_register_vcpu_insn_exec_cond_cb

They expect as parameter a 

[Qemu-commits] [qemu/qemu] 4985d8: tests/tcg: don't append QEMU_OPTS for armv6m-undef...

2024-05-16 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 4985d876ee681368e86163637c1cbd3451d4c514
  
https://github.com/qemu/qemu/commit/4985d876ee681368e86163637c1cbd3451d4c514
  Author: Alex Bennée 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M tests/tcg/arm/Makefile.softmmu-target

  Log Message:
  ---
  tests/tcg: don't append QEMU_OPTS for armv6m-undef test

We don't want to build on the default machine setup here but define a
custom one for the microbit.

Reviewed-by: Pierrick Bouvier 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-2-alex.ben...@linaro.org>


  Commit: b51ddd937f11f76614d4b36d14d8778df242661c
  
https://github.com/qemu/qemu/commit/b51ddd937f11f76614d4b36d14d8778df242661c
  Author: Alex Bennée 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M scripts/update-linux-headers.sh

  Log Message:
  ---
  scripts/update-linux-header.sh: be more src tree friendly

Running "install_headers" in the Linux source tree is fairly
unfriendly as out-of-tree builds will start complaining about the
kernel source being non-pristine. As we have a temporary directory for
the install we should also do the build step here. So now we have:

  $tmpdir/
$blddir/
$hdrdir/

Reviewed-by: Pierrick Bouvier 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-3-alex.ben...@linaro.org>


  Commit: 21032784e56e9687f8c9d4abb75db4b15629c9b1
  
https://github.com/qemu/qemu/commit/21032784e56e9687f8c9d4abb75db4b15629c9b1
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: prepare introduction of new inline ops

Until now, only add_u64 was available, and all functions assumed this or
were named uniquely.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-4-alex.ben...@linaro.org>


  Commit: 299c82b8ae31ef446cad9ef5b04efd49e1d02528
  
https://github.com/qemu/qemu/commit/299c82b8ae31ef446cad9ef5b04efd49e1d02528
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c

  Log Message:
  ---
  plugins: extract generate ptr for qemu_plugin_u64

Plugin operations can access a scoreboard. This function factorizes code
generation for accessing entry associated to a given vcpu.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-3-pierrick.bouv...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-5-alex.ben...@linaro.org>


  Commit: 36a1d8e7102c22e7def1d4146a6b824ec98b3a89
  
https://github.com/qemu/qemu/commit/36a1d8e7102c22e7def1d4146a6b824ec98b3a89
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M include/qemu/qemu-plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: add new inline op STORE_U64

This new operation can store an immediate u64 value to a given
scoreboard.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-4-pierrick.bouv...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-6-alex.ben...@linaro.org>


  Commit: a1c9bf2514d82b757288ee61584e667ddcb19a4f
  
https://github.com/qemu/qemu/commit/a1c9bf2514d82b757288ee61584e667ddcb19a4f
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M tests/plugin/inline.c

  Log Message:
  ---
  tests/plugin/inline: add test for STORE_U64 inline op

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-5-pierrick.bouv...@linaro.org>
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-7-alex.ben...@linaro.org>


  Commit: 7de77d37880d7267a491cb32a1b2232017d1e545
  
https://github.com/qemu/qemu/commit/7de77d37880d7267a491cb32a1b2232017d1e545
  Author: Pierrick Bouvier 
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M include/qemu/qemu-plugin.h
M plugins/api.c
M plugins/core.c
M plugins/plugin.h
M plugins/qemu-plugins.symbols

  Log Message:
  ---
  plugins: conditional callbacks

Extend plugins API to support callback called with a given criteria
(evaluated inline).

Added functions:
- qemu_plugin_register_vcpu_tb_exec_cond_cb
- qemu_plugin_register_vcpu_insn_exec_cond_cb

They expect as parameter a 

[Qemu-commits] [qemu/qemu] 1252f0: tests/tcg: don't append QEMU_OPTS for armv6m-undef...

2024-05-16 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 1252f04d664c804b5016566de73fb98ac243bfd9
  
https://github.com/qemu/qemu/commit/1252f04d664c804b5016566de73fb98ac243bfd9
  Author: Alex Bennée 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M tests/tcg/arm/Makefile.softmmu-target

  Log Message:
  ---
  tests/tcg: don't append QEMU_OPTS for armv6m-undef test

We don't want to build on the default machine setup here but define a
custom one for the microbit.

Reviewed-by: Pierrick Bouvier 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-2-alex.ben...@linaro.org>


  Commit: a51429fee1b48dfa25190aa457af26f55df2a607
  
https://github.com/qemu/qemu/commit/a51429fee1b48dfa25190aa457af26f55df2a607
  Author: Alex Bennée 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M scripts/update-linux-headers.sh

  Log Message:
  ---
  scripts/update-linux-header.sh: be more src tree friendly

Running "install_headers" in the Linux source tree is fairly
unfriendly as out-of-tree builds will start complaining about the
kernel source being non-pristine. As we have a temporary directory for
the install we should also do the build step here. So now we have:

  $tmpdir/
$blddir/
$hdrdir/

Reviewed-by: Pierrick Bouvier 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-3-alex.ben...@linaro.org>


  Commit: f9773b201ba4dbc563d95a8fa096bc3d01b44536
  
https://github.com/qemu/qemu/commit/f9773b201ba4dbc563d95a8fa096bc3d01b44536
  Author: Pierrick Bouvier 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: prepare introduction of new inline ops

Until now, only add_u64 was available, and all functions assumed this or
were named uniquely.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-4-alex.ben...@linaro.org>


  Commit: 34791bbb2be1aad78857220fadad453371c1bc7a
  
https://github.com/qemu/qemu/commit/34791bbb2be1aad78857220fadad453371c1bc7a
  Author: Pierrick Bouvier 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c

  Log Message:
  ---
  plugins: extract generate ptr for qemu_plugin_u64

Plugin operations can access a scoreboard. This function factorizes code
generation for accessing entry associated to a given vcpu.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-3-pierrick.bouv...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-5-alex.ben...@linaro.org>


  Commit: 58ae9e07aef0bf87f23abd63f50af6e38d54ae66
  
https://github.com/qemu/qemu/commit/58ae9e07aef0bf87f23abd63f50af6e38d54ae66
  Author: Pierrick Bouvier 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M include/qemu/qemu-plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: add new inline op STORE_U64

This new operation can store an immediate u64 value to a given
scoreboard.

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-4-pierrick.bouv...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-6-alex.ben...@linaro.org>


  Commit: 753145b03f10f802640860093fc3c1ae63bdd53e
  
https://github.com/qemu/qemu/commit/753145b03f10f802640860093fc3c1ae63bdd53e
  Author: Pierrick Bouvier 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M tests/plugin/inline.c

  Log Message:
  ---
  tests/plugin/inline: add test for STORE_U64 inline op

Reviewed-by: Richard Henderson 
Signed-off-by: Pierrick Bouvier 
Message-Id: <20240502211522.346467-5-pierrick.bouv...@linaro.org>
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Alex Bennée 
Message-Id: <20240514174253.694591-7-alex.ben...@linaro.org>


  Commit: f755720aabdb87cc411375b413d530b074f26e93
  
https://github.com/qemu/qemu/commit/f755720aabdb87cc411375b413d530b074f26e93
  Author: Pierrick Bouvier 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M include/qemu/qemu-plugin.h
M plugins/api.c
M plugins/core.c
M plugins/plugin.h
M plugins/qemu-plugins.symbols

  Log Message:
  ---
  plugins: conditional callbacks

Extend plugins API to support callback called with a given criteria
(evaluated inline).

Added functions:
- qemu_plugin_register_vcpu_tb_exec_cond_cb
- qemu_plugin_register_vcpu_insn_exec_cond_cb

They expect as parameter a 

[Qemu-commits] [qemu/qemu] 801894: accel/tcg: Use vaddr in translator_ld*

2024-05-15 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 80189472303e0209deb1c483915df87c0a8310bf
  
https://github.com/qemu/qemu/commit/80189472303e0209deb1c483915df87c0a8310bf
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c
M include/exec/translator.h
M target/hexagon/translate.c
M target/microblaze/translate.c

  Log Message:
  ---
  accel/tcg: Use vaddr in translator_ld*

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 66f3b79e85149f42465a580c2530638e27c4a4bb
  
https://github.com/qemu/qemu/commit/66f3b79e85149f42465a580c2530638e27c4a4bb
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M include/exec/translator.h

  Log Message:
  ---
  accel/tcg: Hide in_same_page outside of a target-specific context

While there are other methods that could be used to replace
TARGET_PAGE_MASK, the function is not really required outside
the context of target-specific translation.

This makes the header usable by target independent code.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 99977aefd07d85da791e0d851ba2d10d9d5c3094
  
https://github.com/qemu/qemu/commit/99977aefd07d85da791e0d851ba2d10d9d5c3094
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c
M include/exec/translator.h
M target/s390x/tcg/translate.c

  Log Message:
  ---
  accel/tcg: Pass DisasContextBase to translator_fake_ldb

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 04f8ed114545f01a2fee1121e862e270cdd46741
  
https://github.com/qemu/qemu/commit/04f8ed114545f01a2fee1121e862e270cdd46741
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c

  Log Message:
  ---
  accel/tcg: Reorg translator_ld*

Reorg translator_access into translator_ld, with a more
memcpy-ish interface.  If both pages are in ram, do not
go through the caller's slow path.

Assert that the access is within the two pages that we are
prepared to protect, per TranslationBlock.  Allow access
prior to pc_first, so long as it is within the first page.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: ddfa9f11766c532209d4ce848c12761d28730338
  
https://github.com/qemu/qemu/commit/ddfa9f11766c532209d4ce848c12761d28730338
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c

  Log Message:
  ---
  accel/tcg: Cap the translation block when we encounter mmio

Do not allow translation to proceed beyond one insn with mmio,
as we will not be caching the TranslationBlock.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: ba3fb2a735963cf3988ef9476d134a8418baa436
  
https://github.com/qemu/qemu/commit/ba3fb2a735963cf3988ef9476d134a8418baa436
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c
M include/exec/translator.h

  Log Message:
  ---
  accel/tcg: Record mmio bytes during translation

This will be able to replace plugin_insn_append, and will
be usable for disassembly.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: b3f05b8ce24a2dae2e37bd6e7910f19652848656
  
https://github.com/qemu/qemu/commit/b3f05b8ce24a2dae2e37bd6e7910f19652848656
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c
M include/exec/translator.h

  Log Message:
  ---
  accel/tcg: Record when translator_fake_ldb is used

Remove left-over comment from commit dcd092a063
("accel/tcg: Improve can_do_io management").

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: bf4bb074b72a7dc6c9ee5379a1d6b693dcd0a5a6
  
https://github.com/qemu/qemu/commit/bf4bb074b72a7dc6c9ee5379a1d6b693dcd0a5a6
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/tcg/tcg.h

  Log Message:
  ---
  accel/tcg: Record DisasContextBase in tcg_ctx for plugins

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 4abc892362f8282450f18c4e45c5b0534461d01e
  
https://github.com/qemu/qemu/commit/4abc892362f8282450f18c4e45c5b0534461d01e
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M contrib/plugins/execlog.c
M contrib/plugins/howvec.c
M include/qemu/qemu-plugin.h
M plugins/api.c

  Log Message:
  ---
  plugins: Copy memory in qemu_plugin_insn_data

Instead of returning a host pointer, copy the data into
storage provided by the caller.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard 

[Qemu-commits] [qemu/qemu] 801894: accel/tcg: Use vaddr in translator_ld*

2024-05-15 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 80189472303e0209deb1c483915df87c0a8310bf
  
https://github.com/qemu/qemu/commit/80189472303e0209deb1c483915df87c0a8310bf
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c
M include/exec/translator.h
M target/hexagon/translate.c
M target/microblaze/translate.c

  Log Message:
  ---
  accel/tcg: Use vaddr in translator_ld*

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 66f3b79e85149f42465a580c2530638e27c4a4bb
  
https://github.com/qemu/qemu/commit/66f3b79e85149f42465a580c2530638e27c4a4bb
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M include/exec/translator.h

  Log Message:
  ---
  accel/tcg: Hide in_same_page outside of a target-specific context

While there are other methods that could be used to replace
TARGET_PAGE_MASK, the function is not really required outside
the context of target-specific translation.

This makes the header usable by target independent code.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 99977aefd07d85da791e0d851ba2d10d9d5c3094
  
https://github.com/qemu/qemu/commit/99977aefd07d85da791e0d851ba2d10d9d5c3094
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c
M include/exec/translator.h
M target/s390x/tcg/translate.c

  Log Message:
  ---
  accel/tcg: Pass DisasContextBase to translator_fake_ldb

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 04f8ed114545f01a2fee1121e862e270cdd46741
  
https://github.com/qemu/qemu/commit/04f8ed114545f01a2fee1121e862e270cdd46741
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c

  Log Message:
  ---
  accel/tcg: Reorg translator_ld*

Reorg translator_access into translator_ld, with a more
memcpy-ish interface.  If both pages are in ram, do not
go through the caller's slow path.

Assert that the access is within the two pages that we are
prepared to protect, per TranslationBlock.  Allow access
prior to pc_first, so long as it is within the first page.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: ddfa9f11766c532209d4ce848c12761d28730338
  
https://github.com/qemu/qemu/commit/ddfa9f11766c532209d4ce848c12761d28730338
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c

  Log Message:
  ---
  accel/tcg: Cap the translation block when we encounter mmio

Do not allow translation to proceed beyond one insn with mmio,
as we will not be caching the TranslationBlock.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: ba3fb2a735963cf3988ef9476d134a8418baa436
  
https://github.com/qemu/qemu/commit/ba3fb2a735963cf3988ef9476d134a8418baa436
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c
M include/exec/translator.h

  Log Message:
  ---
  accel/tcg: Record mmio bytes during translation

This will be able to replace plugin_insn_append, and will
be usable for disassembly.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: b3f05b8ce24a2dae2e37bd6e7910f19652848656
  
https://github.com/qemu/qemu/commit/b3f05b8ce24a2dae2e37bd6e7910f19652848656
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/translator.c
M include/exec/translator.h

  Log Message:
  ---
  accel/tcg: Record when translator_fake_ldb is used

Remove left-over comment from commit dcd092a063
("accel/tcg: Improve can_do_io management").

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: bf4bb074b72a7dc6c9ee5379a1d6b693dcd0a5a6
  
https://github.com/qemu/qemu/commit/bf4bb074b72a7dc6c9ee5379a1d6b693dcd0a5a6
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/tcg/tcg.h

  Log Message:
  ---
  accel/tcg: Record DisasContextBase in tcg_ctx for plugins

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 4abc892362f8282450f18c4e45c5b0534461d01e
  
https://github.com/qemu/qemu/commit/4abc892362f8282450f18c4e45c5b0534461d01e
  Author: Richard Henderson 
  Date:   2024-05-15 (Wed, 15 May 2024)

  Changed paths:
M contrib/plugins/execlog.c
M contrib/plugins/howvec.c
M include/qemu/qemu-plugin.h
M plugins/api.c

  Log Message:
  ---
  plugins: Copy memory in qemu_plugin_insn_data

Instead of returning a host pointer, copy the data into
storage provided by the caller.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: 

[Qemu-commits] [qemu/qemu] 415826: Allow UNIX socket option for VNC websocket

2024-05-15 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 41582637b1577c261f19634bdd1bb5e7ed6e258d
  
https://github.com/qemu/qemu/commit/41582637b1577c261f19634bdd1bb5e7ed6e258d
  Author: Sergii Zasenko 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M qemu-options.hx
M ui/vnc.c

  Log Message:
  ---
  Allow UNIX socket option for VNC websocket

- Remove unix socket option limitation for VNC websocket
- Reflect websocket option changes in documentation

Signed-off-by: Sergii Zasenko 
Reviewed-by: Marc-André Lureau 
Message-Id: <20230724100353.16628-1-ser...@zasenko.name>


  Commit: 77bf310084dad38b3a2badf01766c659056f1cf2
  
https://github.com/qemu/qemu/commit/77bf310084dad38b3a2badf01766c659056f1cf2
  Author: Dongwon Kim 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M ui/gtk-egl.c
M ui/gtk-gl-area.c

  Log Message:
  ---
  ui/gtk: Draw guest frame at refresh cycle

Draw routine needs to be manually invoked in the next refresh
if there is a scanout blob from the guest. This is to prevent
a situation where there is a scheduled draw event but it won't
happen bacause the window is currently in inactive state
(minimized or tabified). If draw is not done for a long time,
gl_block timeout and/or fence timeout (on the guest) will happen
eventually.

v2: Use gd_gl_area_draw(vc) in gtk-gl-area.c

Suggested-by: Vivek Kasireddy 
Cc: Gerd Hoffmann 
Cc: Marc-André Lureau 
Cc: Daniel P. Berrangé 
Signed-off-by: Dongwon Kim 
Acked-by: Marc-André Lureau 
Message-Id: <20240426225059.3871283-1-dongwon@intel.com>


  Commit: e4e62514e3cc2fc9dbae44af8b80f61c730beab4
  
https://github.com/qemu/qemu/commit/e4e62514e3cc2fc9dbae44af8b80f61c730beab4
  Author: Dongwon Kim 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M ui/gtk-egl.c
M ui/gtk-gl-area.c
M ui/gtk.c

  Log Message:
  ---
  ui/gtk: Check if fence_fd is equal to or greater than 0

'fence_fd' needs to be validated always before being referenced
And the passing condition should include '== 0' as 0 is a valid
value for the file descriptor.

Suggested-by: Marc-André Lureau 
Reviewed-by: Daniel P. Berrangé 
Cc: Philippe Mathieu-Daudé 
Cc: Daniel P. Berrangé 
Cc: Vivek Kasireddy 
Signed-off-by: Dongwon Kim 
Message-Id: <20240508175403.3399895-2-dongwon@intel.com>


  Commit: 6e6ae491dad9a7ba813c7f1e70ce972c35c2d4ab
  
https://github.com/qemu/qemu/commit/6e6ae491dad9a7ba813c7f1e70ce972c35c2d4ab
  Author: Dongwon Kim 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M include/ui/console.h
A include/ui/dmabuf.h
A ui/dmabuf.c
M ui/meson.build

  Log Message:
  ---
  ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

New header and source files are added for containing QemuDmaBuf struct
definition and newly introduced helpers for creating/freeing the struct
and accessing its data.

v10: Change the license type for both dmabuf.h and dmabuf.c from MIT to
 GPL to be in line with QEMU's default license

v11: -- Added new helpers, qemu_dmabuf_close for closing dmabuf->fd,
qemu_dmabuf_dup_fd for duplicating dmabuf->fd
(Daniel P. Berrangé )

 -- Let qemu_dmabuf_fee to call qemu_dmabuf_close before freeing
the struct to make sure fd is closed.
(Daniel P. Berrangé )

v12: Not closing fd in qemu_dmabuf_free because there are cases fd
 should still be available even after the struct is destroyed
 (e.g. virtio-gpu: res->dmabuf_fd).

Suggested-by: Marc-André Lureau 
Reviewed-by: Marc-André Lureau 
Cc: Philippe Mathieu-Daudé 
Cc: Daniel P. Berrangé 
Cc: Vivek Kasireddy 
Signed-off-by: Dongwon Kim 
Message-Id: <20240508175403.3399895-3-dongwon@intel.com>


  Commit: 6779a3076f295fafe52d43049fa954426c1d594a
  
https://github.com/qemu/qemu/commit/6779a3076f295fafe52d43049fa954426c1d594a
  Author: Dongwon Kim 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M hw/display/vhost-user-gpu.c
M hw/display/virtio-gpu-udmabuf.c
M hw/vfio/display.c
M ui/console.c
M ui/dbus-console.c
M ui/dbus-listener.c
M ui/egl-headless.c
M ui/egl-helpers.c
M ui/gtk-egl.c
M ui/gtk-gl-area.c
M ui/gtk.c
M ui/spice-display.c

  Log Message:
  ---
  ui/console: Use qemu_dmabuf_get_..() helpers instead

This commit updates all instances where fields within the QemuDmaBuf
struct are directly accessed, replacing them with calls to these new
helper functions.

v6: fix typos in helper names in ui/spice-display.c

v7: removed prefix, "dpy_gl_" from all helpers

v8: Introduction of helpers was removed as those were already added
by the previous commit

v11: -- Use new qemu_dmabuf_close() instead of close(qemu_dmabuf_get_fd()).
(Daniel P. Berrangé )
 -- Use new qemu_dmabuf_dup_fd() instead of dup(qemu_dmabuf_get_fd()).
(Daniel P. Berrangé )

Suggested-by: Marc-André Lureau 
Reviewed-by: Marc-André Lureau 

[Qemu-commits] [qemu/qemu] 415826: Allow UNIX socket option for VNC websocket

2024-05-15 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 41582637b1577c261f19634bdd1bb5e7ed6e258d
  
https://github.com/qemu/qemu/commit/41582637b1577c261f19634bdd1bb5e7ed6e258d
  Author: Sergii Zasenko 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M qemu-options.hx
M ui/vnc.c

  Log Message:
  ---
  Allow UNIX socket option for VNC websocket

- Remove unix socket option limitation for VNC websocket
- Reflect websocket option changes in documentation

Signed-off-by: Sergii Zasenko 
Reviewed-by: Marc-André Lureau 
Message-Id: <20230724100353.16628-1-ser...@zasenko.name>


  Commit: 77bf310084dad38b3a2badf01766c659056f1cf2
  
https://github.com/qemu/qemu/commit/77bf310084dad38b3a2badf01766c659056f1cf2
  Author: Dongwon Kim 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M ui/gtk-egl.c
M ui/gtk-gl-area.c

  Log Message:
  ---
  ui/gtk: Draw guest frame at refresh cycle

Draw routine needs to be manually invoked in the next refresh
if there is a scanout blob from the guest. This is to prevent
a situation where there is a scheduled draw event but it won't
happen bacause the window is currently in inactive state
(minimized or tabified). If draw is not done for a long time,
gl_block timeout and/or fence timeout (on the guest) will happen
eventually.

v2: Use gd_gl_area_draw(vc) in gtk-gl-area.c

Suggested-by: Vivek Kasireddy 
Cc: Gerd Hoffmann 
Cc: Marc-André Lureau 
Cc: Daniel P. Berrangé 
Signed-off-by: Dongwon Kim 
Acked-by: Marc-André Lureau 
Message-Id: <20240426225059.3871283-1-dongwon@intel.com>


  Commit: e4e62514e3cc2fc9dbae44af8b80f61c730beab4
  
https://github.com/qemu/qemu/commit/e4e62514e3cc2fc9dbae44af8b80f61c730beab4
  Author: Dongwon Kim 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M ui/gtk-egl.c
M ui/gtk-gl-area.c
M ui/gtk.c

  Log Message:
  ---
  ui/gtk: Check if fence_fd is equal to or greater than 0

'fence_fd' needs to be validated always before being referenced
And the passing condition should include '== 0' as 0 is a valid
value for the file descriptor.

Suggested-by: Marc-André Lureau 
Reviewed-by: Daniel P. Berrangé 
Cc: Philippe Mathieu-Daudé 
Cc: Daniel P. Berrangé 
Cc: Vivek Kasireddy 
Signed-off-by: Dongwon Kim 
Message-Id: <20240508175403.3399895-2-dongwon@intel.com>


  Commit: 6e6ae491dad9a7ba813c7f1e70ce972c35c2d4ab
  
https://github.com/qemu/qemu/commit/6e6ae491dad9a7ba813c7f1e70ce972c35c2d4ab
  Author: Dongwon Kim 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M include/ui/console.h
A include/ui/dmabuf.h
A ui/dmabuf.c
M ui/meson.build

  Log Message:
  ---
  ui/console: new dmabuf.h and dmabuf.c for QemuDmaBuf struct and helpers

New header and source files are added for containing QemuDmaBuf struct
definition and newly introduced helpers for creating/freeing the struct
and accessing its data.

v10: Change the license type for both dmabuf.h and dmabuf.c from MIT to
 GPL to be in line with QEMU's default license

v11: -- Added new helpers, qemu_dmabuf_close for closing dmabuf->fd,
qemu_dmabuf_dup_fd for duplicating dmabuf->fd
(Daniel P. Berrangé )

 -- Let qemu_dmabuf_fee to call qemu_dmabuf_close before freeing
the struct to make sure fd is closed.
(Daniel P. Berrangé )

v12: Not closing fd in qemu_dmabuf_free because there are cases fd
 should still be available even after the struct is destroyed
 (e.g. virtio-gpu: res->dmabuf_fd).

Suggested-by: Marc-André Lureau 
Reviewed-by: Marc-André Lureau 
Cc: Philippe Mathieu-Daudé 
Cc: Daniel P. Berrangé 
Cc: Vivek Kasireddy 
Signed-off-by: Dongwon Kim 
Message-Id: <20240508175403.3399895-3-dongwon@intel.com>


  Commit: 6779a3076f295fafe52d43049fa954426c1d594a
  
https://github.com/qemu/qemu/commit/6779a3076f295fafe52d43049fa954426c1d594a
  Author: Dongwon Kim 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M hw/display/vhost-user-gpu.c
M hw/display/virtio-gpu-udmabuf.c
M hw/vfio/display.c
M ui/console.c
M ui/dbus-console.c
M ui/dbus-listener.c
M ui/egl-headless.c
M ui/egl-helpers.c
M ui/gtk-egl.c
M ui/gtk-gl-area.c
M ui/gtk.c
M ui/spice-display.c

  Log Message:
  ---
  ui/console: Use qemu_dmabuf_get_..() helpers instead

This commit updates all instances where fields within the QemuDmaBuf
struct are directly accessed, replacing them with calls to these new
helper functions.

v6: fix typos in helper names in ui/spice-display.c

v7: removed prefix, "dpy_gl_" from all helpers

v8: Introduction of helpers was removed as those were already added
by the previous commit

v11: -- Use new qemu_dmabuf_close() instead of close(qemu_dmabuf_get_fd()).
(Daniel P. Berrangé )
 -- Use new qemu_dmabuf_dup_fd() instead of dup(qemu_dmabuf_get_fd()).
(Daniel P. Berrangé )

Suggested-by: Marc-André Lureau 
Reviewed-by: Marc-André Lureau 

[Qemu-commits] [qemu/qemu] 371d60: configure: Fix error message when C compiler is no...

2024-05-15 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 371d60dfdb47dd18d163a7759968ba138089371e
  
https://github.com/qemu/qemu/commit/371d60dfdb47dd18d163a7759968ba138089371e
  Author: Thomas Huth 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M configure

  Log Message:
  ---
  configure: Fix error message when C compiler is not working

If you try to run the configure script on a system without a working
C compiler, you get a very misleading error message:

 ERROR: Unrecognized host OS (uname -s reports 'Linux')

Some people already opened bug tickets because of this problem:

 https://gitlab.com/qemu-project/qemu/-/issues/2057
 https://gitlab.com/qemu-project/qemu/-/issues/2288

We should rather tell the user that we were not able to use the C
compiler instead, otherwise they will have a hard time to figure
out what was going wrong.

While we're at it, let's also suppress the "unrecognized host CPU"
message in this case since it is rather misleading than helpful.

Fixes: 264b803721 ("configure: remove compiler sanity check")
Message-ID: <20240513114010.51608-1-th...@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Thomas Huth 


  Commit: bad7a2759c69417a5558f0f19d4ede58c08705e8
  
https://github.com/qemu/qemu/commit/bad7a2759c69417a5558f0f19d4ede58c08705e8
  Author: Daniel P. Berrangé 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M tests/docker/dockerfiles/debian-all-test-cross.docker
M tests/docker/dockerfiles/debian-hexagon-cross.docker
M tests/docker/dockerfiles/debian-legacy-test-cross.docker
M tests/docker/dockerfiles/debian-loongarch-cross.docker
M tests/docker/dockerfiles/debian-tricore-cross.docker
M tests/docker/dockerfiles/debian-xtensa-cross.docker
M tests/docker/dockerfiles/fedora-cris-cross.docker

  Log Message:
  ---
  dockerfiles: add 'MAKE' env variable to remaining containers

All the lcitool generated containers define a "MAKE" env. It will be
convenient for later patches if all containers do this.

Signed-off-by: Daniel P. Berrangé 
Reviewed-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Message-ID: <20240513111551.488088-2-berra...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: c53f7a107879a2b7e719b07692a05289bf603fde
  
https://github.com/qemu/qemu/commit/c53f7a107879a2b7e719b07692a05289bf603fde
  Author: Daniel P. Berrangé 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M .gitlab-ci.d/buildtest-template.yml

  Log Message:
  ---
  gitlab: use $MAKE instead of 'make'

The lcitool generated containers have '$MAKE' set to the path
of the right 'make' binary. Using the env variable makes it
possible to override the choice per job.

Signed-off-by: Daniel P. Berrangé 
Reviewed-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Message-ID: <20240513111551.488088-3-berra...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: b563959b906db53fb4bcaef1351f11a51c4b9582
  
https://github.com/qemu/qemu/commit/b563959b906db53fb4bcaef1351f11a51c4b9582
  Author: Daniel P. Berrangé 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M .gitlab-ci.d/buildtest.yml

  Log Message:
  ---
  gitlab: use 'setarch -R' to workaround tsan bug

The TSAN job started failing when gitlab rolled out their latest
release. The root cause is a change in the Google COS version used
on shared runners. This brings a kernel running with

 vm.mmap_rnd_bits = 31

which is incompatible with TSAN in LLVM < 18, which only supports
upto '28'. LLVM 18 can support upto '30', and failing that will
re-exec itself to turn off VA randomization.

Our LLVM is too old for now, but we can run with 'setarch -R make ..'
to turn off VA randomization ourselves.

Signed-off-by: Daniel P. Berrangé 
Reviewed-by: Thomas Huth 
Message-ID: <20240513111551.488088-4-berra...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: 0d8caac9042667edd4198144035cff770b3691cf
  
https://github.com/qemu/qemu/commit/0d8caac9042667edd4198144035cff770b3691cf
  Author: Thomas Huth 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M include/glib-compat.h
M meson.build
M qga/commands-posix-ssh.c

  Log Message:
  ---
  Bump minimum glib version to v2.66

Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can
look into bumping the glib version to a new minimum for further
clean-ups. According to repology.org, available versions are:

 CentOS Stream 9:   2.66.7
 Debian 11: 2.66.8
 Fedora 38: 2.74.1
 Freebsd:   2.78.4
 Homebrew:  2.80.0
 Openbsd:   2.78.4
 OpenSuse leap 15.5:2.70.5
 pkgsrc_current:2.78.4
 Ubuntu 22.04:  2.72.1

Thus it should be safe to bump the minimum glib version to 2.66 now.
Version 2.66 comes with new functions for URI parsing which will
allow further clean-ups in the following patches.

Reviewed-by: Daniel P. Berrangé 
Message-ID: 

[Qemu-commits] [qemu/qemu] 371d60: configure: Fix error message when C compiler is no...

2024-05-14 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 371d60dfdb47dd18d163a7759968ba138089371e
  
https://github.com/qemu/qemu/commit/371d60dfdb47dd18d163a7759968ba138089371e
  Author: Thomas Huth 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M configure

  Log Message:
  ---
  configure: Fix error message when C compiler is not working

If you try to run the configure script on a system without a working
C compiler, you get a very misleading error message:

 ERROR: Unrecognized host OS (uname -s reports 'Linux')

Some people already opened bug tickets because of this problem:

 https://gitlab.com/qemu-project/qemu/-/issues/2057
 https://gitlab.com/qemu-project/qemu/-/issues/2288

We should rather tell the user that we were not able to use the C
compiler instead, otherwise they will have a hard time to figure
out what was going wrong.

While we're at it, let's also suppress the "unrecognized host CPU"
message in this case since it is rather misleading than helpful.

Fixes: 264b803721 ("configure: remove compiler sanity check")
Message-ID: <20240513114010.51608-1-th...@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Thomas Huth 


  Commit: bad7a2759c69417a5558f0f19d4ede58c08705e8
  
https://github.com/qemu/qemu/commit/bad7a2759c69417a5558f0f19d4ede58c08705e8
  Author: Daniel P. Berrangé 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M tests/docker/dockerfiles/debian-all-test-cross.docker
M tests/docker/dockerfiles/debian-hexagon-cross.docker
M tests/docker/dockerfiles/debian-legacy-test-cross.docker
M tests/docker/dockerfiles/debian-loongarch-cross.docker
M tests/docker/dockerfiles/debian-tricore-cross.docker
M tests/docker/dockerfiles/debian-xtensa-cross.docker
M tests/docker/dockerfiles/fedora-cris-cross.docker

  Log Message:
  ---
  dockerfiles: add 'MAKE' env variable to remaining containers

All the lcitool generated containers define a "MAKE" env. It will be
convenient for later patches if all containers do this.

Signed-off-by: Daniel P. Berrangé 
Reviewed-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Message-ID: <20240513111551.488088-2-berra...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: c53f7a107879a2b7e719b07692a05289bf603fde
  
https://github.com/qemu/qemu/commit/c53f7a107879a2b7e719b07692a05289bf603fde
  Author: Daniel P. Berrangé 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M .gitlab-ci.d/buildtest-template.yml

  Log Message:
  ---
  gitlab: use $MAKE instead of 'make'

The lcitool generated containers have '$MAKE' set to the path
of the right 'make' binary. Using the env variable makes it
possible to override the choice per job.

Signed-off-by: Daniel P. Berrangé 
Reviewed-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Message-ID: <20240513111551.488088-3-berra...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: b563959b906db53fb4bcaef1351f11a51c4b9582
  
https://github.com/qemu/qemu/commit/b563959b906db53fb4bcaef1351f11a51c4b9582
  Author: Daniel P. Berrangé 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M .gitlab-ci.d/buildtest.yml

  Log Message:
  ---
  gitlab: use 'setarch -R' to workaround tsan bug

The TSAN job started failing when gitlab rolled out their latest
release. The root cause is a change in the Google COS version used
on shared runners. This brings a kernel running with

 vm.mmap_rnd_bits = 31

which is incompatible with TSAN in LLVM < 18, which only supports
upto '28'. LLVM 18 can support upto '30', and failing that will
re-exec itself to turn off VA randomization.

Our LLVM is too old for now, but we can run with 'setarch -R make ..'
to turn off VA randomization ourselves.

Signed-off-by: Daniel P. Berrangé 
Reviewed-by: Thomas Huth 
Message-ID: <20240513111551.488088-4-berra...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: 0d8caac9042667edd4198144035cff770b3691cf
  
https://github.com/qemu/qemu/commit/0d8caac9042667edd4198144035cff770b3691cf
  Author: Thomas Huth 
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
M include/glib-compat.h
M meson.build
M qga/commands-posix-ssh.c

  Log Message:
  ---
  Bump minimum glib version to v2.66

Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can
look into bumping the glib version to a new minimum for further
clean-ups. According to repology.org, available versions are:

 CentOS Stream 9:   2.66.7
 Debian 11: 2.66.8
 Fedora 38: 2.74.1
 Freebsd:   2.78.4
 Homebrew:  2.80.0
 Openbsd:   2.78.4
 OpenSuse leap 15.5:2.70.5
 pkgsrc_current:2.78.4
 Ubuntu 22.04:  2.72.1

Thus it should be safe to bump the minimum glib version to 2.66 now.
Version 2.66 comes with new functions for URI parsing which will
allow further clean-ups in the following patches.

Reviewed-by: Daniel P. Berrangé 
Message-ID: 

[Qemu-commits] [qemu/qemu] 9f07e4: target/i386: remove PCOMMIT from TCG, deprecate pr...

2024-05-14 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9f07e47a5e96c88c1d2892fbdcbc8ff0437b7ac3
  
https://github.com/qemu/qemu/commit/9f07e47a5e96c88c1d2892fbdcbc8ff0437b7ac3
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M docs/about/deprecated.rst
M target/i386/cpu.c
M target/i386/cpu.h
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: remove PCOMMIT from TCG, deprecate property

The PCOMMIT instruction was never included in any physical processor.
TCG implements it as a no-op instruction, but its utility is debatable
to say the least.  Drop it from the decoder since it is only available
with "-cpu max", which does not guarantee migration compatibility
across versions, and deprecate the property just in case someone is
using it as "pcommit=off".

Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 41c685dc59bb611096f3bb6a663cfa82e4cba97b
  
https://github.com/qemu/qemu/commit/41c685dc59bb611096f3bb6a663cfa82e4cba97b
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: fix operand size for DATA16 REX.W POPCNT

According to the manual, 32-bit vs 64-bit is governed by REX.W
and REX ignores the 0x66 prefix.  This can be confirmed with this
program:

#include 
int main()
{
   int x = 0x1234;
   int y;
   asm("popcntl %1, %0" : "=r" (y) : "r" (x)); printf("%x\n", y);
   asm("mov $-1, %0; .byte 0x66; popcntl %1, %0" : "+r" (y) : "r" (x)); 
printf("%x\n", y);
   asm("mov $-1, %0; .byte 0x66; popcntq %q1, %q0" : "+r" (y) : "r" (x)); 
printf("%x\n", y);
}

which prints 5//5 on real hardware and 5//
on QEMU.

Cc: qemu-sta...@nongnu.org
Reviewed-by: Zhao Liu 
Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 40a3ec7b5ffde500789d016660a171057d6b467c
  
https://github.com/qemu/qemu/commit/40a3ec7b5ffde500789d016660a171057d6b467c
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: rdpkru/wrpkru are no-prefix instructions

Reject 0x66/0xf3/0xf2 in front of them.

Cc: qemu-sta...@nongnu.org
Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 3fabbe0b7d458d6380f4b3246b8b32400f6bd1d9
  
https://github.com/qemu/qemu/commit/3fabbe0b7d458d6380f4b3246b8b32400f6bd1d9
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/i386/tcg/decode-new.c.inc
M target/i386/tcg/decode-new.h
M target/i386/tcg/emit.c.inc
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: move prefetch and multi-byte UD/NOP to new decoder

These are trivial to add, and moving them to the new decoder fixes some
corner cases: raising #UD instead of an instruction fetch page fault for
the undefined opcodes, and incorrectly rejecting 0F 18 prefetches with
register operands (which are treated as reserved NOPs).

Reviewed-by: Richard Henderson 
Reviewed-by: Zhao Liu 
Signed-off-by: Paolo Bonzini 


  Commit: fe01af5d47d4cf7fdf90c54d43f784e5068c8d72
  
https://github.com/qemu/qemu/commit/fe01af5d47d4cf7fdf90c54d43f784e5068c8d72
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/i386/cpu.c

  Log Message:
  ---
  target/i386: fix feature dependency for WAITPKG

The VMX feature bit depends on general availability of WAITPKG,
not the other way round.

Fixes: 33cc88261c3 ("target/i386: add support for 
VMX_SECONDARY_EXEC_ENABLE_USER_WAIT_PAUSE", 2023-08-28)
Cc: qemu-sta...@nongnu.org
Reviewed-by: Zhao Liu 
Signed-off-by: Paolo Bonzini 


  Commit: ff5b5739f97d08d9ca984ec8016b54487a76401b
  
https://github.com/qemu/qemu/commit/ff5b5739f97d08d9ca984ec8016b54487a76401b
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M tests/tcg/i386/test-i386.c

  Log Message:
  ---
  tests/tcg: cover lzcnt/tzcnt/popcnt

Reviewed-by: Zhao Liu 
Signed-off-by: Paolo Bonzini 


  Commit: 23b1f53c2c8990ed745acede171e49645af3d6d0
  
https://github.com/qemu/qemu/commit/23b1f53c2c8990ed745acede171e49645af3d6d0
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M configure

  Log Message:
  ---
  configure: quote -D options that are passed through to meson

Ensure that they go through unmodified, instead of removing one layer
of quoting.

-D is a pretty specialized option and most options that can have spaces
do not need it (for example, c_args is covered by --extra-cflags).
Therefore it's unlikely that this causes actual trouble.  However,
a somewhat realistic failure case would be with -Dpkg_config_path
and a pkg-config directory that contains spaces.

Cc: qemu-sta...@nongnu.org
Reviewed-by: Thomas Huth 

[Qemu-commits] [qemu/qemu] 9f07e4: target/i386: remove PCOMMIT from TCG, deprecate pr...

2024-05-12 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 9f07e47a5e96c88c1d2892fbdcbc8ff0437b7ac3
  
https://github.com/qemu/qemu/commit/9f07e47a5e96c88c1d2892fbdcbc8ff0437b7ac3
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M docs/about/deprecated.rst
M target/i386/cpu.c
M target/i386/cpu.h
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: remove PCOMMIT from TCG, deprecate property

The PCOMMIT instruction was never included in any physical processor.
TCG implements it as a no-op instruction, but its utility is debatable
to say the least.  Drop it from the decoder since it is only available
with "-cpu max", which does not guarantee migration compatibility
across versions, and deprecate the property just in case someone is
using it as "pcommit=off".

Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 41c685dc59bb611096f3bb6a663cfa82e4cba97b
  
https://github.com/qemu/qemu/commit/41c685dc59bb611096f3bb6a663cfa82e4cba97b
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: fix operand size for DATA16 REX.W POPCNT

According to the manual, 32-bit vs 64-bit is governed by REX.W
and REX ignores the 0x66 prefix.  This can be confirmed with this
program:

#include 
int main()
{
   int x = 0x1234;
   int y;
   asm("popcntl %1, %0" : "=r" (y) : "r" (x)); printf("%x\n", y);
   asm("mov $-1, %0; .byte 0x66; popcntl %1, %0" : "+r" (y) : "r" (x)); 
printf("%x\n", y);
   asm("mov $-1, %0; .byte 0x66; popcntq %q1, %q0" : "+r" (y) : "r" (x)); 
printf("%x\n", y);
}

which prints 5//5 on real hardware and 5//
on QEMU.

Cc: qemu-sta...@nongnu.org
Reviewed-by: Zhao Liu 
Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 40a3ec7b5ffde500789d016660a171057d6b467c
  
https://github.com/qemu/qemu/commit/40a3ec7b5ffde500789d016660a171057d6b467c
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: rdpkru/wrpkru are no-prefix instructions

Reject 0x66/0xf3/0xf2 in front of them.

Cc: qemu-sta...@nongnu.org
Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 3fabbe0b7d458d6380f4b3246b8b32400f6bd1d9
  
https://github.com/qemu/qemu/commit/3fabbe0b7d458d6380f4b3246b8b32400f6bd1d9
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/i386/tcg/decode-new.c.inc
M target/i386/tcg/decode-new.h
M target/i386/tcg/emit.c.inc
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: move prefetch and multi-byte UD/NOP to new decoder

These are trivial to add, and moving them to the new decoder fixes some
corner cases: raising #UD instead of an instruction fetch page fault for
the undefined opcodes, and incorrectly rejecting 0F 18 prefetches with
register operands (which are treated as reserved NOPs).

Reviewed-by: Richard Henderson 
Reviewed-by: Zhao Liu 
Signed-off-by: Paolo Bonzini 


  Commit: fe01af5d47d4cf7fdf90c54d43f784e5068c8d72
  
https://github.com/qemu/qemu/commit/fe01af5d47d4cf7fdf90c54d43f784e5068c8d72
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/i386/cpu.c

  Log Message:
  ---
  target/i386: fix feature dependency for WAITPKG

The VMX feature bit depends on general availability of WAITPKG,
not the other way round.

Fixes: 33cc88261c3 ("target/i386: add support for 
VMX_SECONDARY_EXEC_ENABLE_USER_WAIT_PAUSE", 2023-08-28)
Cc: qemu-sta...@nongnu.org
Reviewed-by: Zhao Liu 
Signed-off-by: Paolo Bonzini 


  Commit: ff5b5739f97d08d9ca984ec8016b54487a76401b
  
https://github.com/qemu/qemu/commit/ff5b5739f97d08d9ca984ec8016b54487a76401b
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M tests/tcg/i386/test-i386.c

  Log Message:
  ---
  tests/tcg: cover lzcnt/tzcnt/popcnt

Reviewed-by: Zhao Liu 
Signed-off-by: Paolo Bonzini 


  Commit: 23b1f53c2c8990ed745acede171e49645af3d6d0
  
https://github.com/qemu/qemu/commit/23b1f53c2c8990ed745acede171e49645af3d6d0
  Author: Paolo Bonzini 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M configure

  Log Message:
  ---
  configure: quote -D options that are passed through to meson

Ensure that they go through unmodified, instead of removing one layer
of quoting.

-D is a pretty specialized option and most options that can have spaces
do not need it (for example, c_args is covered by --extra-cflags).
Therefore it's unlikely that this causes actual trouble.  However,
a somewhat realistic failure case would be with -Dpkg_config_path
and a pkg-config directory that contains spaces.

Cc: qemu-sta...@nongnu.org
Reviewed-by: Thomas Huth 

[Qemu-commits] [qemu/qemu] c990c1: hw/s390x: Attach the sclpconsole to /machine/sclp/...

2024-05-10 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c990c1f35b80de53570f11433d71624aca185763
  
https://github.com/qemu/qemu/commit/c990c1f35b80de53570f11433d71624aca185763
  Author: Thomas Huth 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M hw/s390x/s390-virtio-ccw.c

  Log Message:
  ---
  hw/s390x: Attach the sclpconsole to /machine/sclp/s390-sclp-event-facility

The sclpconsole currently does not have a proper parent in the QOM
tree, so it shows up under /machine/unattached - which is somewhat
ugly. We should rather attach it to /machine/sclp/s390-sclp-event-facility
where the other devices of type TYPE_SCLP_EVENT already reside.

Message-ID: <20240430190843.453903-1-th...@redhat.com>
Reviewed-by: Eric Farman 
Reviewed-by: Cédric Le Goater 
Reviewed-by: David Hildenbrand 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Thomas Huth 


  Commit: b350f6c8ed4fd796454d0f26482f3e9d9285fda1
  
https://github.com/qemu/qemu/commit/b350f6c8ed4fd796454d0f26482f3e9d9285fda1
  Author: Cédric Le Goater 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M hw/s390x/s390-virtio-ccw.c
M hw/s390x/sclp.c
M include/hw/s390x/s390-virtio-ccw.h
M include/hw/s390x/sclp.h

  Log Message:
  ---
  s390x: Introduce a SCLPDevice pointer under the machine

Initialize directly SCLPDevice from the machine init handler and
remove s390_sclp_init(). We will use the SCLPDevice pointer later to
create the consoles.

Signed-off-by: Cédric Le Goater 
Message-ID: <20240502131533.377719-2-...@redhat.com>
Reviewed-by: Thomas Huth 
Signed-off-by: Thomas Huth 


  Commit: af4a3e32f3e1284662ebc1fd50a8c5e1776ebece
  
https://github.com/qemu/qemu/commit/af4a3e32f3e1284662ebc1fd50a8c5e1776ebece
  Author: Cédric Le Goater 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M hw/s390x/event-facility.c
M hw/s390x/s390-virtio-ccw.c
M include/hw/s390x/event-facility.h

  Log Message:
  ---
  s390x/event-facility: Simplify sclp_get_event_facility_bus()

sclp_get_event_facility_bus() scans the whole machine to find a
TYPE_SCLP_EVENTS_BUS object. The SCLPDevice instance is now available
under the machine state, use it to simplify the lookup and adjust the
creation of the consoles.

Signed-off-by: Cédric Le Goater 
Message-ID: <20240502131533.377719-3-...@redhat.com>
Reviewed-by: Thomas Huth 
Signed-off-by: Thomas Huth 


  Commit: 3d9836e46dbe1e46c39fe76a62d3085a71ddbf7a
  
https://github.com/qemu/qemu/commit/3d9836e46dbe1e46c39fe76a62d3085a71ddbf7a
  Author: Cédric Le Goater 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M hw/s390x/sclp.c

  Log Message:
  ---
  s390x/sclp: Simplify get_sclp_device()

get_sclp_device() scans the whole machine to find a TYPE_SCLP object.
Now that the SCLPDevice instance is available under the machine state,
use it to simplify the lookup. While at it, remove the inline to let
the compiler decide on how to optimize.

Signed-off-by: Cédric Le Goater 
Message-ID: <20240502131533.377719-4-...@redhat.com>
Reviewed-by: Thomas Huth 
Signed-off-by: Thomas Huth 


  Commit: 8aa2211e855df79ddd363e5f0d8c4d7d4c376e16
  
https://github.com/qemu/qemu/commit/8aa2211e855df79ddd363e5f0d8c4d7d4c376e16
  Author: Collin Walling 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M qapi/machine-target.json
M target/s390x/cpu_features.c
M target/s390x/cpu_features.h
M target/s390x/cpu_models_sysemu.c

  Log Message:
  ---
  target/s390x: report deprecated-props in cpu-model-expansion reply

Retain a list of deprecated features disjoint from any particular
CPU model. A query-cpu-model-expansion reply will now provide a list of
properties (i.e. features) that are flagged as deprecated. Example:

{
  "return": {
"model": {
  "name": "z14.2-base",
  "deprecated-props": [
"bpb",
"csske"
  ],
  "props": {
"pfmfi": false,
"exrl": true,
...a lot more props...
"skey": false,
"vxpdeh2": false
  }
}
  }
}

It is recommended that s390 guests operate with these features
explicitly disabled to ensure compatibility with future hardware.

Signed-off-by: Collin Walling 
Acked-by: Markus Armbruster 
Reviewed-by: David Hildenbrand 
Message-ID: <20240429191059.11806-2-wall...@linux.ibm.com>
Signed-off-by: Thomas Huth 


  Commit: 6e55b32d45976a8e78cbd3bbdf6ed1148cb2662a
  
https://github.com/qemu/qemu/commit/6e55b32d45976a8e78cbd3bbdf6ed1148cb2662a
  Author: Collin Walling 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/s390x/cpu_features.c

  Log Message:
  ---
  target/s390x: flag te and cte as deprecated

Add the CONSTRAINT_TRANSACTIONAL_EXE (cte) and TRANSACTIONAL_EXE (te)
to the list of deprecated features.

Signed-off-by: Collin Walling 
Reviewed-by: David Hildenbrand 
Message-ID: 

[Qemu-commits] [qemu/qemu] c990c1: hw/s390x: Attach the sclpconsole to /machine/sclp/...

2024-05-10 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: c990c1f35b80de53570f11433d71624aca185763
  
https://github.com/qemu/qemu/commit/c990c1f35b80de53570f11433d71624aca185763
  Author: Thomas Huth 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M hw/s390x/s390-virtio-ccw.c

  Log Message:
  ---
  hw/s390x: Attach the sclpconsole to /machine/sclp/s390-sclp-event-facility

The sclpconsole currently does not have a proper parent in the QOM
tree, so it shows up under /machine/unattached - which is somewhat
ugly. We should rather attach it to /machine/sclp/s390-sclp-event-facility
where the other devices of type TYPE_SCLP_EVENT already reside.

Message-ID: <20240430190843.453903-1-th...@redhat.com>
Reviewed-by: Eric Farman 
Reviewed-by: Cédric Le Goater 
Reviewed-by: David Hildenbrand 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Thomas Huth 


  Commit: b350f6c8ed4fd796454d0f26482f3e9d9285fda1
  
https://github.com/qemu/qemu/commit/b350f6c8ed4fd796454d0f26482f3e9d9285fda1
  Author: Cédric Le Goater 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M hw/s390x/s390-virtio-ccw.c
M hw/s390x/sclp.c
M include/hw/s390x/s390-virtio-ccw.h
M include/hw/s390x/sclp.h

  Log Message:
  ---
  s390x: Introduce a SCLPDevice pointer under the machine

Initialize directly SCLPDevice from the machine init handler and
remove s390_sclp_init(). We will use the SCLPDevice pointer later to
create the consoles.

Signed-off-by: Cédric Le Goater 
Message-ID: <20240502131533.377719-2-...@redhat.com>
Reviewed-by: Thomas Huth 
Signed-off-by: Thomas Huth 


  Commit: af4a3e32f3e1284662ebc1fd50a8c5e1776ebece
  
https://github.com/qemu/qemu/commit/af4a3e32f3e1284662ebc1fd50a8c5e1776ebece
  Author: Cédric Le Goater 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M hw/s390x/event-facility.c
M hw/s390x/s390-virtio-ccw.c
M include/hw/s390x/event-facility.h

  Log Message:
  ---
  s390x/event-facility: Simplify sclp_get_event_facility_bus()

sclp_get_event_facility_bus() scans the whole machine to find a
TYPE_SCLP_EVENTS_BUS object. The SCLPDevice instance is now available
under the machine state, use it to simplify the lookup and adjust the
creation of the consoles.

Signed-off-by: Cédric Le Goater 
Message-ID: <20240502131533.377719-3-...@redhat.com>
Reviewed-by: Thomas Huth 
Signed-off-by: Thomas Huth 


  Commit: 3d9836e46dbe1e46c39fe76a62d3085a71ddbf7a
  
https://github.com/qemu/qemu/commit/3d9836e46dbe1e46c39fe76a62d3085a71ddbf7a
  Author: Cédric Le Goater 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M hw/s390x/sclp.c

  Log Message:
  ---
  s390x/sclp: Simplify get_sclp_device()

get_sclp_device() scans the whole machine to find a TYPE_SCLP object.
Now that the SCLPDevice instance is available under the machine state,
use it to simplify the lookup. While at it, remove the inline to let
the compiler decide on how to optimize.

Signed-off-by: Cédric Le Goater 
Message-ID: <20240502131533.377719-4-...@redhat.com>
Reviewed-by: Thomas Huth 
Signed-off-by: Thomas Huth 


  Commit: 8aa2211e855df79ddd363e5f0d8c4d7d4c376e16
  
https://github.com/qemu/qemu/commit/8aa2211e855df79ddd363e5f0d8c4d7d4c376e16
  Author: Collin Walling 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M qapi/machine-target.json
M target/s390x/cpu_features.c
M target/s390x/cpu_features.h
M target/s390x/cpu_models_sysemu.c

  Log Message:
  ---
  target/s390x: report deprecated-props in cpu-model-expansion reply

Retain a list of deprecated features disjoint from any particular
CPU model. A query-cpu-model-expansion reply will now provide a list of
properties (i.e. features) that are flagged as deprecated. Example:

{
  "return": {
"model": {
  "name": "z14.2-base",
  "deprecated-props": [
"bpb",
"csske"
  ],
  "props": {
"pfmfi": false,
"exrl": true,
...a lot more props...
"skey": false,
"vxpdeh2": false
  }
}
  }
}

It is recommended that s390 guests operate with these features
explicitly disabled to ensure compatibility with future hardware.

Signed-off-by: Collin Walling 
Acked-by: Markus Armbruster 
Reviewed-by: David Hildenbrand 
Message-ID: <20240429191059.11806-2-wall...@linux.ibm.com>
Signed-off-by: Thomas Huth 


  Commit: 6e55b32d45976a8e78cbd3bbdf6ed1148cb2662a
  
https://github.com/qemu/qemu/commit/6e55b32d45976a8e78cbd3bbdf6ed1148cb2662a
  Author: Collin Walling 
  Date:   2024-05-10 (Fri, 10 May 2024)

  Changed paths:
M target/s390x/cpu_features.c

  Log Message:
  ---
  target/s390x: flag te and cte as deprecated

Add the CONSTRAINT_TRANSACTIONAL_EXE (cte) and TRANSACTIONAL_EXE (te)
to the list of deprecated features.

Signed-off-by: Collin Walling 
Reviewed-by: David Hildenbrand 
Message-ID: 

[Qemu-commits] [qemu/qemu] 62663f: migration/ram.c: API Conversion qemu_mutex_lock(), ...

2024-05-09 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 62663f08a75dbbddb745c80a00b09e298ede641a
  
https://github.com/qemu/qemu/commit/62663f08a75dbbddb745c80a00b09e298ede641a
  Author: Will Gyda 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/ram.c

  Log Message:
  ---
  migration/ram.c: API Conversion qemu_mutex_lock(), and qemu_mutex_unlock() to 
WITH_QEMU_LOCK_GUARD macro

migration/ram.c: API Conversion qemu_mutex_lock(),
and qemu_mutex_unlock() to WITH_QEMU_LOCK_GUARD macro

Signed-off-by: Will Gyda 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: d4a17b8f1da567b274f7c7e4846496c564c860c4
  
https://github.com/qemu/qemu/commit/d4a17b8f1da567b274f7c7e4846496c564c860c4
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration.c
M migration/trace-events

  Log Message:
  ---
  migration: move trace-point from migrate_fd_error to migrate_set_error

Cover more cases by trace-point.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Fabiano Rosas 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: 246f54e0ccc288239fae78ec9e401ba070667b0b
  
https://github.com/qemu/qemu/commit/246f54e0ccc288239fae78ec9e401ba070667b0b
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration.c

  Log Message:
  ---
  migration: process_incoming_migration_co(): complete cleanup on failure

Make call to migration_incoming_state_destroy(), instead of doing only
partial of it.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Fabiano Rosas 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: 30116e9079e3f395ef186960d986c7d073d7eb8a
  
https://github.com/qemu/qemu/commit/30116e9079e3f395ef186960d986c7d073d7eb8a
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration.c

  Log Message:
  ---
  migration: process_incoming_migration_co(): fix reporting s->error

It's bad idea to leave critical section with error object freed, but
s->error still set, this theoretically may lead to use-after-free
crash. Let's avoid it.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Fabiano Rosas 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: f84eaa9ffdcf00a81922fc1380870775a60792bf
  
https://github.com/qemu/qemu/commit/f84eaa9ffdcf00a81922fc1380870775a60792bf
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration.c

  Log Message:
  ---
  migration: process_incoming_migration_co(): rework error reporting

Unify error reporting in the function. This simplifies the following
commit, which will not-exit-on-error behavior variant to the function.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: dbea1c89dad37a6ab96befd017d33edaa50ded0a
  
https://github.com/qemu/qemu/commit/dbea1c89dad37a6ab96befd017d33edaa50ded0a
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration-hmp-cmds.c
M migration/migration.c
M migration/migration.h
M qapi/migration.json
M system/vl.c

  Log Message:
  ---
  qapi: introduce exit-on-error parameter for migrate-incoming

Now we do set MIGRATION_FAILED state, but don't give a chance to
orchestrator to query migration state and get the error.

Let's provide a possibility for QMP-based orchestrators to get an error
like with outgoing migration.

For hmp_migrate_incoming(), let's enable the new behavior: HMP is not
and ABI, it's mostly intended to use by developer and it makes sense
not to stop the process.

For x-exit-preconfig, let's keep the old behavior:
 - it's called from init(), so here we want to keep current behavior by
   default
 - it does exit on error by itself as well
So, if we want to change the behavior of x-exit-preconfig, it should be
another patch.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Acked-by: Markus Armbruster 
Reviewed-by: Fabiano Rosas 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: f7b1cd3c2ebbc102b8edfacd5c5cd10c04dc887d
  
https://github.com/qemu/qemu/commit/f7b1cd3c2ebbc102b8edfacd5c5cd10c04dc887d
  Author: Fabiano Rosas 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M docs/about/deprecated.rst
M docs/about/removed-features.rst
M migration/migration-hmp-cmds.c
M migration/migration.c
M qapi/migration.json

  Log Message:
  ---
  migration: Remove 'skipped' field from MigrationStats

The 'skipped' field of the MigrationStats struct has been deprecated
in 8.1. Time to remove it.

Deprecation commit 7b24d32634 ("migration: skipped field is really
obsolete.").

Reviewed-by: Markus 

[Qemu-commits] [qemu/qemu] 62663f: migration/ram.c: API Conversion qemu_mutex_lock(), ...

2024-05-09 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 62663f08a75dbbddb745c80a00b09e298ede641a
  
https://github.com/qemu/qemu/commit/62663f08a75dbbddb745c80a00b09e298ede641a
  Author: Will Gyda 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/ram.c

  Log Message:
  ---
  migration/ram.c: API Conversion qemu_mutex_lock(), and qemu_mutex_unlock() to 
WITH_QEMU_LOCK_GUARD macro

migration/ram.c: API Conversion qemu_mutex_lock(),
and qemu_mutex_unlock() to WITH_QEMU_LOCK_GUARD macro

Signed-off-by: Will Gyda 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: d4a17b8f1da567b274f7c7e4846496c564c860c4
  
https://github.com/qemu/qemu/commit/d4a17b8f1da567b274f7c7e4846496c564c860c4
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration.c
M migration/trace-events

  Log Message:
  ---
  migration: move trace-point from migrate_fd_error to migrate_set_error

Cover more cases by trace-point.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Fabiano Rosas 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: 246f54e0ccc288239fae78ec9e401ba070667b0b
  
https://github.com/qemu/qemu/commit/246f54e0ccc288239fae78ec9e401ba070667b0b
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration.c

  Log Message:
  ---
  migration: process_incoming_migration_co(): complete cleanup on failure

Make call to migration_incoming_state_destroy(), instead of doing only
partial of it.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Fabiano Rosas 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: 30116e9079e3f395ef186960d986c7d073d7eb8a
  
https://github.com/qemu/qemu/commit/30116e9079e3f395ef186960d986c7d073d7eb8a
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration.c

  Log Message:
  ---
  migration: process_incoming_migration_co(): fix reporting s->error

It's bad idea to leave critical section with error object freed, but
s->error still set, this theoretically may lead to use-after-free
crash. Let's avoid it.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Fabiano Rosas 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: f84eaa9ffdcf00a81922fc1380870775a60792bf
  
https://github.com/qemu/qemu/commit/f84eaa9ffdcf00a81922fc1380870775a60792bf
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration.c

  Log Message:
  ---
  migration: process_incoming_migration_co(): rework error reporting

Unify error reporting in the function. This simplifies the following
commit, which will not-exit-on-error behavior variant to the function.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: dbea1c89dad37a6ab96befd017d33edaa50ded0a
  
https://github.com/qemu/qemu/commit/dbea1c89dad37a6ab96befd017d33edaa50ded0a
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M migration/migration-hmp-cmds.c
M migration/migration.c
M migration/migration.h
M qapi/migration.json
M system/vl.c

  Log Message:
  ---
  qapi: introduce exit-on-error parameter for migrate-incoming

Now we do set MIGRATION_FAILED state, but don't give a chance to
orchestrator to query migration state and get the error.

Let's provide a possibility for QMP-based orchestrators to get an error
like with outgoing migration.

For hmp_migrate_incoming(), let's enable the new behavior: HMP is not
and ABI, it's mostly intended to use by developer and it makes sense
not to stop the process.

For x-exit-preconfig, let's keep the old behavior:
 - it's called from init(), so here we want to keep current behavior by
   default
 - it does exit on error by itself as well
So, if we want to change the behavior of x-exit-preconfig, it should be
another patch.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Acked-by: Markus Armbruster 
Reviewed-by: Fabiano Rosas 
Reviewed-by: Peter Xu 
Signed-off-by: Fabiano Rosas 


  Commit: f7b1cd3c2ebbc102b8edfacd5c5cd10c04dc887d
  
https://github.com/qemu/qemu/commit/f7b1cd3c2ebbc102b8edfacd5c5cd10c04dc887d
  Author: Fabiano Rosas 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M docs/about/deprecated.rst
M docs/about/removed-features.rst
M migration/migration-hmp-cmds.c
M migration/migration.c
M qapi/migration.json

  Log Message:
  ---
  migration: Remove 'skipped' field from MigrationStats

The 'skipped' field of the MigrationStats struct has been deprecated
in 8.1. Time to remove it.

Deprecation commit 7b24d32634 ("migration: skipped field is really
obsolete.").

Reviewed-by: Markus 

[Qemu-commits] [qemu/qemu] f9cc8c: block/qcow2-bitmap: Replace g_memdup() by g_memdup2()

2024-05-09 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f9cc8cfdf346cadc92db8fce32c8b5d7f1095163
  
https://github.com/qemu/qemu/commit/f9cc8cfdf346cadc92db8fce32c8b5d7f1095163
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M block/qcow2-bitmap.c

  Log Message:
  ---
  block/qcow2-bitmap: Replace g_memdup() by g_memdup2()

Per 
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Eric Blake 
Message-Id: <20210903174510.751630-6-phi...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 40fed8c1d3a2bcef81c8de3f55d7e1abe1397347
  
https://github.com/qemu/qemu/commit/40fed8c1d3a2bcef81c8de3f55d7e1abe1397347
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M target/ppc/mmu-hash64.c

  Log Message:
  ---
  target/ppc: Replace g_memdup() by g_memdup2()

Per 
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé 
Acked-by: David Gibson 
Message-Id: <20210903174510.751630-27-phi...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 0572f01117c897bef5ece0b367bc6700d4fbd161
  
https://github.com/qemu/qemu/commit/0572f01117c897bef5ece0b367bc6700d4fbd161
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M hw/hppa/machine.c

  Log Message:
  ---
  hw/hppa/machine: Replace g_memdup() by g_memdup2()

Per 
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20210903174510.751630-12-phi...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 09d98a241caf12e0de5ab738cfa5c911af97fbd6
  
https://github.com/qemu/qemu/commit/09d98a241caf12e0de5ab738cfa5c911af97fbd6
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M hw/ppc/spapr_pci.c

  Log Message:
  ---
  hw/ppc/spapr_pci: Replace g_memdup() by g_memdup2()

Per 
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé 
Acked-by: David Gibson 
Message-Id: <20210903174510.751630-17-phi...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: e6578f1f68a0e90789a841ada532c3e494c9a04c
  
https://github.com/qemu/qemu/commit/e6578f1f68a0e90789a841ada532c3e494c9a04c
  Author: Mattias Nissler 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M 

[Qemu-commits] [qemu/qemu] f9cc8c: block/qcow2-bitmap: Replace g_memdup() by g_memdup2()

2024-05-08 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f9cc8cfdf346cadc92db8fce32c8b5d7f1095163
  
https://github.com/qemu/qemu/commit/f9cc8cfdf346cadc92db8fce32c8b5d7f1095163
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M block/qcow2-bitmap.c

  Log Message:
  ---
  block/qcow2-bitmap: Replace g_memdup() by g_memdup2()

Per 
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Eric Blake 
Message-Id: <20210903174510.751630-6-phi...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 40fed8c1d3a2bcef81c8de3f55d7e1abe1397347
  
https://github.com/qemu/qemu/commit/40fed8c1d3a2bcef81c8de3f55d7e1abe1397347
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M target/ppc/mmu-hash64.c

  Log Message:
  ---
  target/ppc: Replace g_memdup() by g_memdup2()

Per 
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé 
Acked-by: David Gibson 
Message-Id: <20210903174510.751630-27-phi...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 0572f01117c897bef5ece0b367bc6700d4fbd161
  
https://github.com/qemu/qemu/commit/0572f01117c897bef5ece0b367bc6700d4fbd161
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M hw/hppa/machine.c

  Log Message:
  ---
  hw/hppa/machine: Replace g_memdup() by g_memdup2()

Per 
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20210903174510.751630-12-phi...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 09d98a241caf12e0de5ab738cfa5c911af97fbd6
  
https://github.com/qemu/qemu/commit/09d98a241caf12e0de5ab738cfa5c911af97fbd6
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M hw/ppc/spapr_pci.c

  Log Message:
  ---
  hw/ppc/spapr_pci: Replace g_memdup() by g_memdup2()

Per 
https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538

  The old API took the size of the memory to duplicate as a guint,
  whereas most memory functions take memory sizes as a gsize. This
  made it easy to accidentally pass a gsize to g_memdup(). For large
  values, that would lead to a silent truncation of the size from 64
  to 32 bits, and result in a heap area being returned which is
  significantly smaller than what the caller expects. This can likely
  be exploited in various modules to cause a heap buffer overflow.

Replace g_memdup() by the safer g_memdup2() wrapper.

Trivially safe because the argument was directly from sizeof.

Signed-off-by: Philippe Mathieu-Daudé 
Acked-by: David Gibson 
Message-Id: <20210903174510.751630-17-phi...@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: e6578f1f68a0e90789a841ada532c3e494c9a04c
  
https://github.com/qemu/qemu/commit/e6578f1f68a0e90789a841ada532c3e494c9a04c
  Author: Mattias Nissler 
  Date:   2024-05-08 (Wed, 08 May 2024)

  Changed paths:
M 

[Qemu-commits] [qemu/qemu] b77656: target/i386: Fix CPUID encoding of Fn8000001E_ECX

2024-05-07 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b776569a53f70ab4661ed627756385b05dcaf75e
  
https://github.com/qemu/qemu/commit/b776569a53f70ab4661ed627756385b05dcaf75e
  Author: Babu Moger 
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
M hw/i386/pc.c
M target/i386/cpu.c
M target/i386/cpu.h

  Log Message:
  ---
  target/i386: Fix CPUID encoding of Fn801E_ECX

Observed the following failure while booting the SEV-SNP guest and the
guest fails to boot with the smp parameters:
"-smp 192,sockets=1,dies=12,cores=8,threads=2".

qemu-system-x86_64: sev_snp_launch_update: SNP_LAUNCH_UPDATE ret=-5 fw_error=22 
'Invalid parameter'
qemu-system-x86_64: SEV-SNP: CPUID validation failed for function 0x801e, 
index: 0x0.
provided: eax:0x, ebx: 0x0100, ecx: 0x0b00, edx: 0x
expected: eax:0x, ebx: 0x0100, ecx: 0x0300, edx: 0x
qemu-system-x86_64: SEV-SNP: failed update CPUID page

Reason for the failure is due to overflowing of bits used for "Node per
processor" in CPUID Fn801E_ECX. This field's width is 3 bits wide and
can hold maximum value 0x7. With dies=12 (0xB), it overflows and spills
over into the reserved bits. In the case of SEV-SNP, this causes CPUID
enforcement failure and guest fails to boot.

The PPR documentation for CPUID_Fn801E_ECX [Node Identifiers]
=
BitsDescription
31:11   Reserved.

10:8NodesPerProcessor: Node per processor. Read-only.
ValidValues:
Value   Description
0h  1 node per processor.
7h-1h   Reserved.

7:0 NodeId: Node ID. Read-only. Reset: Fixed,XXh.
=

As in the spec, the valid value for "node per processor" is 0 and rest
are reserved.

Looking back at the history of decoding of CPUID_Fn801E_ECX, noticed
that there were cases where "node per processor" can be more than 1. It
is valid only for pre-F17h (pre-EPYC) architectures. For EPYC or later
CPUs, the linux kernel does not use this information to build the L3
topology.

Also noted that the CPUID Function 0x801E_ECX is available only when
TOPOEXT feature is enabled. This feature is enabled only for EPYC(F17h)
or later processors. So, previous generation of processors do not not
enumerate 0x801E_ECX leaf.

There could be some corner cases where the older guests could enable the
TOPOEXT feature by running with -cpu host, in which case legacy guests
might notice the topology change. To address those cases introduced a
new CPU property "legacy-multi-node". It will be true for older machine
types to maintain compatibility. By default, it will be false, so new
decoding will be used going forward.

The documentation is taken from Preliminary Processor Programming
Reference (PPR) for AMD Family 19h Model 11h, Revision B1 Processors 55901
Rev 0.25 - Oct 6, 2022.

Cc: qemu-sta...@nongnu.org
Fixes: 31ada106d891 ("Simplify CPUID_8000_001E for AMD")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537
Reviewed-by: Zhao Liu 
Signed-off-by: Babu Moger 
Message-ID: 
<0ee4b0a8293188a53970a2b0e4f4ef713425055e.1714757834.git.babu.mo...@amd.com>
Signed-off-by: Paolo Bonzini 


  Commit: 15957eb9efe2da67c796612cead95cba28ba9bda
  
https://github.com/qemu/qemu/commit/15957eb9efe2da67c796612cead95cba28ba9bda
  Author: Paolo Bonzini 
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
M target/i386/tcg/emit.c.inc
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: use TSTEQ/TSTNE to test low bits

When testing the sign bit or equality to zero of a partial register, it
is useful to use a single TSTEQ or TSTNE operation.  It can also be used
to test the parity flag, using bit 0 of the population count.

Do not do this for target_ulong-sized values however; the optimizer would
produce a comparison against zero anyway, and it avoids shifts by 64
which are undefined behavior.

Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 9309b53e835f5d1d7795d81399cda7ecf99321e1
  
https://github.com/qemu/qemu/commit/9309b53e835f5d1d7795d81399cda7ecf99321e1
  Author: Paolo Bonzini 
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: use TSTEQ/TSTNE to check flags

The new conditions obviously come in handy when testing individual bits
of EFLAGS, and they make it possible to remove the .mask field of
CCPrepare.

Lowering to shift+and is done by the optimizer if necessary.

Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: e995f3f9442ce0cb869737ce100c3ebbba651809
  
https://github.com/qemu/qemu/commit/e995f3f9442ce0cb869737ce100c3ebbba651809
  Author: Paolo Bonzini 
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  

[Qemu-commits] [qemu/qemu] b77656: target/i386: Fix CPUID encoding of Fn8000001E_ECX

2024-05-07 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: b776569a53f70ab4661ed627756385b05dcaf75e
  
https://github.com/qemu/qemu/commit/b776569a53f70ab4661ed627756385b05dcaf75e
  Author: Babu Moger 
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
M hw/i386/pc.c
M target/i386/cpu.c
M target/i386/cpu.h

  Log Message:
  ---
  target/i386: Fix CPUID encoding of Fn801E_ECX

Observed the following failure while booting the SEV-SNP guest and the
guest fails to boot with the smp parameters:
"-smp 192,sockets=1,dies=12,cores=8,threads=2".

qemu-system-x86_64: sev_snp_launch_update: SNP_LAUNCH_UPDATE ret=-5 fw_error=22 
'Invalid parameter'
qemu-system-x86_64: SEV-SNP: CPUID validation failed for function 0x801e, 
index: 0x0.
provided: eax:0x, ebx: 0x0100, ecx: 0x0b00, edx: 0x
expected: eax:0x, ebx: 0x0100, ecx: 0x0300, edx: 0x
qemu-system-x86_64: SEV-SNP: failed update CPUID page

Reason for the failure is due to overflowing of bits used for "Node per
processor" in CPUID Fn801E_ECX. This field's width is 3 bits wide and
can hold maximum value 0x7. With dies=12 (0xB), it overflows and spills
over into the reserved bits. In the case of SEV-SNP, this causes CPUID
enforcement failure and guest fails to boot.

The PPR documentation for CPUID_Fn801E_ECX [Node Identifiers]
=
BitsDescription
31:11   Reserved.

10:8NodesPerProcessor: Node per processor. Read-only.
ValidValues:
Value   Description
0h  1 node per processor.
7h-1h   Reserved.

7:0 NodeId: Node ID. Read-only. Reset: Fixed,XXh.
=

As in the spec, the valid value for "node per processor" is 0 and rest
are reserved.

Looking back at the history of decoding of CPUID_Fn801E_ECX, noticed
that there were cases where "node per processor" can be more than 1. It
is valid only for pre-F17h (pre-EPYC) architectures. For EPYC or later
CPUs, the linux kernel does not use this information to build the L3
topology.

Also noted that the CPUID Function 0x801E_ECX is available only when
TOPOEXT feature is enabled. This feature is enabled only for EPYC(F17h)
or later processors. So, previous generation of processors do not not
enumerate 0x801E_ECX leaf.

There could be some corner cases where the older guests could enable the
TOPOEXT feature by running with -cpu host, in which case legacy guests
might notice the topology change. To address those cases introduced a
new CPU property "legacy-multi-node". It will be true for older machine
types to maintain compatibility. By default, it will be false, so new
decoding will be used going forward.

The documentation is taken from Preliminary Processor Programming
Reference (PPR) for AMD Family 19h Model 11h, Revision B1 Processors 55901
Rev 0.25 - Oct 6, 2022.

Cc: qemu-sta...@nongnu.org
Fixes: 31ada106d891 ("Simplify CPUID_8000_001E for AMD")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537
Reviewed-by: Zhao Liu 
Signed-off-by: Babu Moger 
Message-ID: 
<0ee4b0a8293188a53970a2b0e4f4ef713425055e.1714757834.git.babu.mo...@amd.com>
Signed-off-by: Paolo Bonzini 


  Commit: 15957eb9efe2da67c796612cead95cba28ba9bda
  
https://github.com/qemu/qemu/commit/15957eb9efe2da67c796612cead95cba28ba9bda
  Author: Paolo Bonzini 
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
M target/i386/tcg/emit.c.inc
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: use TSTEQ/TSTNE to test low bits

When testing the sign bit or equality to zero of a partial register, it
is useful to use a single TSTEQ or TSTNE operation.  It can also be used
to test the parity flag, using bit 0 of the population count.

Do not do this for target_ulong-sized values however; the optimizer would
produce a comparison against zero anyway, and it avoids shifts by 64
which are undefined behavior.

Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 9309b53e835f5d1d7795d81399cda7ecf99321e1
  
https://github.com/qemu/qemu/commit/9309b53e835f5d1d7795d81399cda7ecf99321e1
  Author: Paolo Bonzini 
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: use TSTEQ/TSTNE to check flags

The new conditions obviously come in handy when testing individual bits
of EFLAGS, and they make it possible to remove the .mask field of
CCPrepare.

Lowering to shift+and is done by the optimizer if necessary.

Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: e995f3f9442ce0cb869737ce100c3ebbba651809
  
https://github.com/qemu/qemu/commit/e995f3f9442ce0cb869737ce100c3ebbba651809
  Author: Paolo Bonzini 
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  

[Qemu-commits] [qemu/qemu] b3ee71: tcg: Add write_aofs to GVecGen3i

2024-05-07 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b3ee719e6499987a635332d012f08dc80cd277e0
  
https://github.com/qemu/qemu/commit/b3ee719e6499987a635332d012f08dc80cd277e0
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M include/tcg/tcg-op-gvec-common.h
M tcg/tcg-op-gvec.c

  Log Message:
  ---
  tcg: Add write_aofs to GVecGen3i

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 2623ca6ac11dd1c15ec1c2e87aa2e7f22f0adec8
  
https://github.com/qemu/qemu/commit/2623ca6ac11dd1c15ec1c2e87aa2e7f22f0adec8
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M tcg/i386/tcg-target.c.inc

  Log Message:
  ---
  tcg/i386: Simplify immediate 8-bit logical vector shifts

The x86 isa does not have this operation, so we need an expansion.
Use the same algorithm that we use for expanding this vector
operation with integers: perform the shift with a wider type
and then mask the bits that must be zero.

This reduces the instruction count from 5 to 2.

Signed-off-by: Richard Henderson 


  Commit: 19517b8397940955c2638700f9cad3dbdb90c4c0
  
https://github.com/qemu/qemu/commit/19517b8397940955c2638700f9cad3dbdb90c4c0
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M tcg/i386/tcg-target.c.inc

  Log Message:
  ---
  tcg/i386: Optimize setcond of TST{EQ,NE} with 0x

This may be treated as a 32-bit EQ/NE comparison against 0,
which is in turn treated as a LTU/GEU comparison against 1.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 8d65cda7284edf31998778f92813bc6ef1e6ab77
  
https://github.com/qemu/qemu/commit/8d65cda7284edf31998778f92813bc6ef1e6ab77
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M tcg/optimize.c

  Log Message:
  ---
  tcg/optimize: Optimize setcond with zmask

If we can show that high bits of an input are zero,
then we may optimize away some comparisons.

Signed-off-by: Richard Henderson 


  Commit: d828b92b8a61204d8a7aaa87a24e48ac7ab69143
  
https://github.com/qemu/qemu/commit/d828b92b8a61204d8a7aaa87a24e48ac7ab69143
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M accel/tcg/cpu-exec.c
M include/exec/translation-block.h

  Log Message:
  ---
  accel/tcg: Introduce CF_BP_PAGE

Record the fact that we've found a breakpoint on the page
in which a TranslationBlock is running.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: ca51921158e3cc07520a0ef5eb33739e5852ac6e
  
https://github.com/qemu/qemu/commit/ca51921158e3cc07520a0ef5eb33739e5852ac6e
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M target/sh4/translate.c

  Log Message:
  ---
  target/sh4: Update DisasContextBase.insn_start

Match the extra inserts of INDEX_op_insn_start, fixing
the db->num_insns != 1 assert in translator_loop.

Fixes: dcd092a0636 ("accel/tcg: Improve can_do_io management")
Signed-off-by: Richard Henderson 


  Commit: a55a1f77b6c4270f6c19a74e9aa4c83c3bb04e09
  
https://github.com/qemu/qemu/commit/a55a1f77b6c4270f6c19a74e9aa4c83c3bb04e09
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M .gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml

  Log Message:
  ---
  gitlab: Drop --disable-libssh from ubuntu-22.04-s390x.yml

This was a workaround for ubuntu 20.04.

Suggested-by: Thomas Huth 
Signed-off-by: Richard Henderson 


  Commit: 22e8db9deb96d2cd88492adf4047087c9d9d575d
  
https://github.com/qemu/qemu/commit/22e8db9deb96d2cd88492adf4047087c9d9d575d
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M .gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml

  Log Message:
  ---
  gitlab: Drop --static from s390x linux-user build

The host does not have the correct libraries installed for static pie,
which causes host/guest address space interference for some tests.
There's no real gain from linking statically, so drop it.

Reviewed-by: Thomas Huth 
Signed-off-by: Richard Henderson 


  Commit: f578b66e8c70ddea71d44db6e2c7abbcd757d684
  
https://github.com/qemu/qemu/commit/f578b66e8c70ddea71d44db6e2c7abbcd757d684
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M .gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml

  Log Message:
  ---
  gitlab: Streamline ubuntu-22.04-s390x

We have one job to build user binaries and one job for system.
Disable tools and docs in the user job, and disable building
the user binaries in the system job.

Reviewed-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 571882c668a0861bf4fcc0411347eab2379200e5
  

[Qemu-commits] [qemu/qemu] b3ee71: tcg: Add write_aofs to GVecGen3i

2024-05-07 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: b3ee719e6499987a635332d012f08dc80cd277e0
  
https://github.com/qemu/qemu/commit/b3ee719e6499987a635332d012f08dc80cd277e0
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M include/tcg/tcg-op-gvec-common.h
M tcg/tcg-op-gvec.c

  Log Message:
  ---
  tcg: Add write_aofs to GVecGen3i

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 2623ca6ac11dd1c15ec1c2e87aa2e7f22f0adec8
  
https://github.com/qemu/qemu/commit/2623ca6ac11dd1c15ec1c2e87aa2e7f22f0adec8
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M tcg/i386/tcg-target.c.inc

  Log Message:
  ---
  tcg/i386: Simplify immediate 8-bit logical vector shifts

The x86 isa does not have this operation, so we need an expansion.
Use the same algorithm that we use for expanding this vector
operation with integers: perform the shift with a wider type
and then mask the bits that must be zero.

This reduces the instruction count from 5 to 2.

Signed-off-by: Richard Henderson 


  Commit: 19517b8397940955c2638700f9cad3dbdb90c4c0
  
https://github.com/qemu/qemu/commit/19517b8397940955c2638700f9cad3dbdb90c4c0
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M tcg/i386/tcg-target.c.inc

  Log Message:
  ---
  tcg/i386: Optimize setcond of TST{EQ,NE} with 0x

This may be treated as a 32-bit EQ/NE comparison against 0,
which is in turn treated as a LTU/GEU comparison against 1.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 8d65cda7284edf31998778f92813bc6ef1e6ab77
  
https://github.com/qemu/qemu/commit/8d65cda7284edf31998778f92813bc6ef1e6ab77
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M tcg/optimize.c

  Log Message:
  ---
  tcg/optimize: Optimize setcond with zmask

If we can show that high bits of an input are zero,
then we may optimize away some comparisons.

Signed-off-by: Richard Henderson 


  Commit: d828b92b8a61204d8a7aaa87a24e48ac7ab69143
  
https://github.com/qemu/qemu/commit/d828b92b8a61204d8a7aaa87a24e48ac7ab69143
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M accel/tcg/cpu-exec.c
M include/exec/translation-block.h

  Log Message:
  ---
  accel/tcg: Introduce CF_BP_PAGE

Record the fact that we've found a breakpoint on the page
in which a TranslationBlock is running.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: ca51921158e3cc07520a0ef5eb33739e5852ac6e
  
https://github.com/qemu/qemu/commit/ca51921158e3cc07520a0ef5eb33739e5852ac6e
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M target/sh4/translate.c

  Log Message:
  ---
  target/sh4: Update DisasContextBase.insn_start

Match the extra inserts of INDEX_op_insn_start, fixing
the db->num_insns != 1 assert in translator_loop.

Fixes: dcd092a0636 ("accel/tcg: Improve can_do_io management")
Signed-off-by: Richard Henderson 


  Commit: a55a1f77b6c4270f6c19a74e9aa4c83c3bb04e09
  
https://github.com/qemu/qemu/commit/a55a1f77b6c4270f6c19a74e9aa4c83c3bb04e09
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M .gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml

  Log Message:
  ---
  gitlab: Drop --disable-libssh from ubuntu-22.04-s390x.yml

This was a workaround for ubuntu 20.04.

Suggested-by: Thomas Huth 
Signed-off-by: Richard Henderson 


  Commit: 22e8db9deb96d2cd88492adf4047087c9d9d575d
  
https://github.com/qemu/qemu/commit/22e8db9deb96d2cd88492adf4047087c9d9d575d
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M .gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml

  Log Message:
  ---
  gitlab: Drop --static from s390x linux-user build

The host does not have the correct libraries installed for static pie,
which causes host/guest address space interference for some tests.
There's no real gain from linking statically, so drop it.

Reviewed-by: Thomas Huth 
Signed-off-by: Richard Henderson 


  Commit: f578b66e8c70ddea71d44db6e2c7abbcd757d684
  
https://github.com/qemu/qemu/commit/f578b66e8c70ddea71d44db6e2c7abbcd757d684
  Author: Richard Henderson 
  Date:   2024-05-06 (Mon, 06 May 2024)

  Changed paths:
M .gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml

  Log Message:
  ---
  gitlab: Streamline ubuntu-22.04-s390x

We have one job to build user binaries and one job for system.
Disable tools and docs in the user job, and disable building
the user binaries in the system job.

Reviewed-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 571882c668a0861bf4fcc0411347eab2379200e5
  

[Qemu-commits] [qemu/qemu] 6b568e: target/sparc/cpu: Rename the CPU models with a "+"...

2024-05-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 6b568e3f1dc22e839cd56b47e22c2aa5ece21367
  
https://github.com/qemu/qemu/commit/6b568e3f1dc22e839cd56b47e22c2aa5ece21367
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M qom/object.c
M target/sparc/cpu.c

  Log Message:
  ---
  target/sparc/cpu: Rename the CPU models with a "+" in their names

Commit b447378e12 ("qom/object: Limit type names to alphanumerical ...")
cut down the amount of allowed characters for QOM types to a saner set.
The "+" character was meant to be included in this set, so we had to
add a hack there to still allow the legacy names of POWER and Sparc64
CPUs. However, instead of putting such a hack in the common QOM code,
there is a much better place to do this: The sparc_cpu_class_by_name()
function which is used to look up the names of all Sparc CPUs.
Thus let's finally get rid of the "+" in the Sparc CPU names, and provide
backward compatibility for the old names via some simple checks in the
sparc_cpu_class_by_name() function.

Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-2-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 4a7bdec3a6f3f6d9f75715e420a4c826135a1065
  
https://github.com/qemu/qemu/commit/4a7bdec3a6f3f6d9f75715e420a4c826135a1065
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M target/sparc/cpu.c

  Log Message:
  ---
  target/sparc/cpu: Avoid spaces by default in the CPU names

The output of "-cpu help" is currently rather confusing to the users:
It might not be fully clear which part of the output defines the CPU
names since the CPU names contain white spaces (which we later have to
convert into dashes internally). At best it's at least a nuisance since
the users might need to specify the CPU names with quoting on the command
line if they are not aware of the fact that the CPU names could be written
with dashes instead. So let's finally clean up this mess by using dashes
instead of white spaces for the CPU names, like we're doing it internally
later (and like we're doing it in most other targets of QEMU).
Note that it is still possible to pass the CPU names with spaces to the
"-cpu" option, since sparc_cpu_type_name() still translates those to "-".

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2141
Reviewed-by: Richard Henderson 
Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Message-Id: <20240419084812.504779-3-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 49ce37e3d024260072bdfa4c5569859d1f338cb2
  
https://github.com/qemu/qemu/commit/49ce37e3d024260072bdfa4c5569859d1f338cb2
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M docs/system/target-sparc.rst

  Log Message:
  ---
  docs/system/target-sparc: Improve the Sparc documentation

Add some words about how to enable or disable boolean features,
and remove the note about a Linux kernel being available on the
QEMU website (they have been removed long ago already), and the
note about NetBSD and OpenBSD still having issues (they should
work fine nowadays).

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2141
Signed-off-by: Thomas Huth 
Reviewed-by: Mark Cave-Ayland 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-4-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 029171b5d62fe11a0dce52f64efb356f7fea144d
  
https://github.com/qemu/qemu/commit/029171b5d62fe11a0dce52f64efb356f7fea144d
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M docs/about/deprecated.rst

  Log Message:
  ---
  docs/about: Deprecate the old "UltraSparc" CPU names that contain a "+"

For consistency we should drop the names with a "+" in it in the
long run.

Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-5-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 7c420a4d7c080002018af20aed56ceb0bf81ad43
  
https://github.com/qemu/qemu/commit/7c420a4d7c080002018af20aed56ceb0bf81ad43
  Author: Mark Cave-Ayland 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M hw/sparc64/sun4u.c

  Log Message:
  ---
  hw/sparc64: set iommu_platform=on for virtio devices attached to the sun4u 
machine

The sun4u machine has an IOMMU and therefore it is possible to program it such
that the virtio-device IOVA does not map directly to the CPU physical address.

This is not a problem with Linux which always maps the IOVA directly to the CPU
physical address, however it is required for the NetBSD virtio driver where this
is not the case.

Set the sun4u machine defaults for all virtio devices so that disable-legacy=on
and iommu_platform=on to ensure a default configuration will allow virtio

[Qemu-commits] [qemu/qemu] 6b568e: target/sparc/cpu: Rename the CPU models with a "+"...

2024-05-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 6b568e3f1dc22e839cd56b47e22c2aa5ece21367
  
https://github.com/qemu/qemu/commit/6b568e3f1dc22e839cd56b47e22c2aa5ece21367
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M qom/object.c
M target/sparc/cpu.c

  Log Message:
  ---
  target/sparc/cpu: Rename the CPU models with a "+" in their names

Commit b447378e12 ("qom/object: Limit type names to alphanumerical ...")
cut down the amount of allowed characters for QOM types to a saner set.
The "+" character was meant to be included in this set, so we had to
add a hack there to still allow the legacy names of POWER and Sparc64
CPUs. However, instead of putting such a hack in the common QOM code,
there is a much better place to do this: The sparc_cpu_class_by_name()
function which is used to look up the names of all Sparc CPUs.
Thus let's finally get rid of the "+" in the Sparc CPU names, and provide
backward compatibility for the old names via some simple checks in the
sparc_cpu_class_by_name() function.

Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-2-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 4a7bdec3a6f3f6d9f75715e420a4c826135a1065
  
https://github.com/qemu/qemu/commit/4a7bdec3a6f3f6d9f75715e420a4c826135a1065
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M target/sparc/cpu.c

  Log Message:
  ---
  target/sparc/cpu: Avoid spaces by default in the CPU names

The output of "-cpu help" is currently rather confusing to the users:
It might not be fully clear which part of the output defines the CPU
names since the CPU names contain white spaces (which we later have to
convert into dashes internally). At best it's at least a nuisance since
the users might need to specify the CPU names with quoting on the command
line if they are not aware of the fact that the CPU names could be written
with dashes instead. So let's finally clean up this mess by using dashes
instead of white spaces for the CPU names, like we're doing it internally
later (and like we're doing it in most other targets of QEMU).
Note that it is still possible to pass the CPU names with spaces to the
"-cpu" option, since sparc_cpu_type_name() still translates those to "-".

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2141
Reviewed-by: Richard Henderson 
Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Message-Id: <20240419084812.504779-3-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 49ce37e3d024260072bdfa4c5569859d1f338cb2
  
https://github.com/qemu/qemu/commit/49ce37e3d024260072bdfa4c5569859d1f338cb2
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M docs/system/target-sparc.rst

  Log Message:
  ---
  docs/system/target-sparc: Improve the Sparc documentation

Add some words about how to enable or disable boolean features,
and remove the note about a Linux kernel being available on the
QEMU website (they have been removed long ago already), and the
note about NetBSD and OpenBSD still having issues (they should
work fine nowadays).

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2141
Signed-off-by: Thomas Huth 
Reviewed-by: Mark Cave-Ayland 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-4-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 029171b5d62fe11a0dce52f64efb356f7fea144d
  
https://github.com/qemu/qemu/commit/029171b5d62fe11a0dce52f64efb356f7fea144d
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M docs/about/deprecated.rst

  Log Message:
  ---
  docs/about: Deprecate the old "UltraSparc" CPU names that contain a "+"

For consistency we should drop the names with a "+" in it in the
long run.

Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-5-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 7c420a4d7c080002018af20aed56ceb0bf81ad43
  
https://github.com/qemu/qemu/commit/7c420a4d7c080002018af20aed56ceb0bf81ad43
  Author: Mark Cave-Ayland 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M hw/sparc64/sun4u.c

  Log Message:
  ---
  hw/sparc64: set iommu_platform=on for virtio devices attached to the sun4u 
machine

The sun4u machine has an IOMMU and therefore it is possible to program it such
that the virtio-device IOVA does not map directly to the CPU physical address.

This is not a problem with Linux which always maps the IOVA directly to the CPU
physical address, however it is required for the NetBSD virtio driver where this
is not the case.

Set the sun4u machine defaults for all virtio devices so that disable-legacy=on
and iommu_platform=on to ensure a default configuration will allow virtio

[Qemu-commits] [qemu/qemu] 6a5a63: target/i386: Give IRQs a chance when resetting HF_...

2024-05-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 6a5a63f74ba5c5355b7a8468d3d814bfffe928fb
  
https://github.com/qemu/qemu/commit/6a5a63f74ba5c5355b7a8468d3d814bfffe928fb
  Author: Ruihan Li 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: Give IRQs a chance when resetting HF_INHIBIT_IRQ_MASK

When emulated with QEMU, interrupts will never come in the following
loop. However, if the NOP instruction is uncommented, interrupts will
fire as normal.

loop:
cli
call do_sti
jmp loop

do_sti:
sti
# nop
ret

This behavior is different from that of a real processor. For example,
if KVM is enabled, interrupts will always fire regardless of whether the
NOP instruction is commented or not. Also, the Intel Software Developer
Manual states that after the STI instruction is executed, the interrupt
inhibit should end as soon as the next instruction (e.g., the RET
instruction if the NOP instruction is commented) is executed.

This problem is caused because the previous code may choose not to end
the TB even if the HF_INHIBIT_IRQ_MASK has just been reset (e.g., in the
case where the STI instruction is immediately followed by the RET
instruction), so that IRQs may not have a change to trigger. This commit
fixes the problem by always terminating the current TB to give IRQs a
chance to trigger when HF_INHIBIT_IRQ_MASK is reset.

Reviewed-by: Richard Henderson 
Signed-off-by: Ruihan Li 
Message-ID: <20240415064518.4951-4-lrh2...@pku.edu.cn>
Signed-off-by: Paolo Bonzini 


  Commit: 5ce77fcb1b8480f35a1008d5500197d4b73f9ef6
  
https://github.com/qemu/qemu/commit/5ce77fcb1b8480f35a1008d5500197d4b73f9ef6
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/arm/Kconfig
M target/i386/Kconfig

  Log Message:
  ---
  Kconfig: kvm: allow building without any board

KVM code might have to call functions on the PCIDevice that is
passed to kvm_arch_fixup_msi_route().  This fails in the case
where --without-default-devices is used and no board is
configured.  While this is not really a useful configuration,
and therefore setting up stubs for CONFIG_PCI is overkill,
failing the build is impolite.  Just include the PCI
subsystem if kvm_arch_fixup_msi_route() requires it, as
is the case for ARM and x86.

Reported-by: Philippe Mathieu-Daudé 
Tested-by: Fabiano Rosas 
Signed-off-by: Paolo Bonzini 


  Commit: 969ce22123681694a9c241aed3f649185a9e067b
  
https://github.com/qemu/qemu/commit/969ce22123681694a9c241aed3f649185a9e067b
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M tests/qtest/m48t59-test.c

  Log Message:
  ---
  tests/qtest: skip m48t59-test if the machine is absent

Together with the series at 
https://patchew.org/QEMU/20240423131612.28362-1-pbonz...@redhat.com/,
this allows adding sparc-softmmu to the target list of the
build-without-defaults CI job.

Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 957f583b7cb4d317fb694ca45350de6d9d2bd1b8
  
https://github.com/qemu/qemu/commit/957f583b7cb4d317fb694ca45350de6d9d2bd1b8
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M .gitlab-ci.d/windows.yml

  Log Message:
  ---
  gitlab-ci: adjust msys2-64bit to be able to run qtest

sparc-softmmu is able to run a subset of qtests when compiled 
--without-default-devices,
so use it instead of x86_64-softmmu for the msys2 run.

Signed-off-by: Paolo Bonzini 


  Commit: 566abdb4d90d73728f37cd5dcced0fbef84a63db
  
https://github.com/qemu/qemu/commit/566abdb4d90d73728f37cd5dcced0fbef84a63db
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/ppc/kvm.c

  Log Message:
  ---
  kvm: ppc: disable sPAPR code if CONFIG_PSERIES is disabled

target/ppc/kvm.c calls out to code in hw/ppc/spapr*.c; that code is
not present and fails to link if CONFIG_PSERIES is not enabled.
Adjust kvm.c to depend on CONFIG_PSERIES instead of TARGET_PPC64,
and compile out anything that requires cap_papr, because only
the pseries machine will call kvmppc_set_papr().

Signed-off-by: Paolo Bonzini 


  Commit: 7e10ce2706e2dbed6a59825dc0286b3810395afa
  
https://github.com/qemu/qemu/commit/7e10ce2706e2dbed6a59825dc0286b3810395afa
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M configs/devices/arm-softmmu/default.mak
M configs/devices/loongarch64-softmmu/default.mak
M configs/devices/or1k-softmmu/default.mak
M configs/devices/ppc-softmmu/default.mak
M configs/devices/riscv32-softmmu/default.mak
M configs/devices/riscv64-softmmu/default.mak
M configs/devices/xtensa-softmmu/default.mak

  Log Message:
  ---
  configs: list "implied" device 

[Qemu-commits] [qemu/qemu] 6a5a63: target/i386: Give IRQs a chance when resetting HF_...

2024-05-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 6a5a63f74ba5c5355b7a8468d3d814bfffe928fb
  
https://github.com/qemu/qemu/commit/6a5a63f74ba5c5355b7a8468d3d814bfffe928fb
  Author: Ruihan Li 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/i386/tcg/translate.c

  Log Message:
  ---
  target/i386: Give IRQs a chance when resetting HF_INHIBIT_IRQ_MASK

When emulated with QEMU, interrupts will never come in the following
loop. However, if the NOP instruction is uncommented, interrupts will
fire as normal.

loop:
cli
call do_sti
jmp loop

do_sti:
sti
# nop
ret

This behavior is different from that of a real processor. For example,
if KVM is enabled, interrupts will always fire regardless of whether the
NOP instruction is commented or not. Also, the Intel Software Developer
Manual states that after the STI instruction is executed, the interrupt
inhibit should end as soon as the next instruction (e.g., the RET
instruction if the NOP instruction is commented) is executed.

This problem is caused because the previous code may choose not to end
the TB even if the HF_INHIBIT_IRQ_MASK has just been reset (e.g., in the
case where the STI instruction is immediately followed by the RET
instruction), so that IRQs may not have a change to trigger. This commit
fixes the problem by always terminating the current TB to give IRQs a
chance to trigger when HF_INHIBIT_IRQ_MASK is reset.

Reviewed-by: Richard Henderson 
Signed-off-by: Ruihan Li 
Message-ID: <20240415064518.4951-4-lrh2...@pku.edu.cn>
Signed-off-by: Paolo Bonzini 


  Commit: 5ce77fcb1b8480f35a1008d5500197d4b73f9ef6
  
https://github.com/qemu/qemu/commit/5ce77fcb1b8480f35a1008d5500197d4b73f9ef6
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/arm/Kconfig
M target/i386/Kconfig

  Log Message:
  ---
  Kconfig: kvm: allow building without any board

KVM code might have to call functions on the PCIDevice that is
passed to kvm_arch_fixup_msi_route().  This fails in the case
where --without-default-devices is used and no board is
configured.  While this is not really a useful configuration,
and therefore setting up stubs for CONFIG_PCI is overkill,
failing the build is impolite.  Just include the PCI
subsystem if kvm_arch_fixup_msi_route() requires it, as
is the case for ARM and x86.

Reported-by: Philippe Mathieu-Daudé 
Tested-by: Fabiano Rosas 
Signed-off-by: Paolo Bonzini 


  Commit: 969ce22123681694a9c241aed3f649185a9e067b
  
https://github.com/qemu/qemu/commit/969ce22123681694a9c241aed3f649185a9e067b
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M tests/qtest/m48t59-test.c

  Log Message:
  ---
  tests/qtest: skip m48t59-test if the machine is absent

Together with the series at 
https://patchew.org/QEMU/20240423131612.28362-1-pbonz...@redhat.com/,
this allows adding sparc-softmmu to the target list of the
build-without-defaults CI job.

Reviewed-by: Richard Henderson 
Signed-off-by: Paolo Bonzini 


  Commit: 957f583b7cb4d317fb694ca45350de6d9d2bd1b8
  
https://github.com/qemu/qemu/commit/957f583b7cb4d317fb694ca45350de6d9d2bd1b8
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M .gitlab-ci.d/windows.yml

  Log Message:
  ---
  gitlab-ci: adjust msys2-64bit to be able to run qtest

sparc-softmmu is able to run a subset of qtests when compiled 
--without-default-devices,
so use it instead of x86_64-softmmu for the msys2 run.

Signed-off-by: Paolo Bonzini 


  Commit: 566abdb4d90d73728f37cd5dcced0fbef84a63db
  
https://github.com/qemu/qemu/commit/566abdb4d90d73728f37cd5dcced0fbef84a63db
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/ppc/kvm.c

  Log Message:
  ---
  kvm: ppc: disable sPAPR code if CONFIG_PSERIES is disabled

target/ppc/kvm.c calls out to code in hw/ppc/spapr*.c; that code is
not present and fails to link if CONFIG_PSERIES is not enabled.
Adjust kvm.c to depend on CONFIG_PSERIES instead of TARGET_PPC64,
and compile out anything that requires cap_papr, because only
the pseries machine will call kvmppc_set_papr().

Signed-off-by: Paolo Bonzini 


  Commit: 7e10ce2706e2dbed6a59825dc0286b3810395afa
  
https://github.com/qemu/qemu/commit/7e10ce2706e2dbed6a59825dc0286b3810395afa
  Author: Paolo Bonzini 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M configs/devices/arm-softmmu/default.mak
M configs/devices/loongarch64-softmmu/default.mak
M configs/devices/or1k-softmmu/default.mak
M configs/devices/ppc-softmmu/default.mak
M configs/devices/riscv32-softmmu/default.mak
M configs/devices/riscv64-softmmu/default.mak
M configs/devices/xtensa-softmmu/default.mak

  Log Message:
  ---
  configs: list "implied" device 

[Qemu-commits] [qemu/qemu] ab709f: target/alpha: Use cpu_env in preference to ALPHA_CPU

2024-05-04 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ab709f13b8d44466787f4f53e6333b747d813afb
  
https://github.com/qemu/qemu/commit/ab709f13b8d44466787f4f53e6333b747d813afb
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/cpu.c
M target/alpha/helper.c

  Log Message:
  ---
  target/alpha: Use cpu_env in preference to ALPHA_CPU

ALPHA_CPU has a dynamic object type assert, which is
unnecessary considering that these are all class hooks.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-2-phi...@linaro.org>


  Commit: 1bcae46aac60ae0efbeb3957f7679da9e7e50f30
  
https://github.com/qemu/qemu/commit/1bcae46aac60ae0efbeb3957f7679da9e7e50f30
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Hoist branch shift to initial decode

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-3-phi...@linaro.org>


  Commit: 0cda93c9b55b1f865f92a2a2e189dcbaab485bb2
  
https://github.com/qemu/qemu/commit/0cda93c9b55b1f865f92a2a2e189dcbaab485bb2
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Use DISAS_NEXT definition instead of magic '0' value

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 1/5]
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-4-phi...@linaro.org>


  Commit: c0fcd5612e84810fbc62b17fb99a0a4dd847b251
  
https://github.com/qemu/qemu/commit/c0fcd5612e84810fbc62b17fb99a0a4dd847b251
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Inline DISAS_PC_UPDATED and return DISAS_NORETURN

Inline DISAS_PC_UPDATED switch case from alpha_tr_tb_stop():

switch (ctx->base.is_jmp) {
...
case DISAS_PC_UPDATED:
tcg_gen_lookup_and_goto_ptr();
break;

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 2/5]
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-5-phi...@linaro.org>


  Commit: 9804ab26d0f25cb9c97e34f96bb0fb2be0a9f677
  
https://github.com/qemu/qemu/commit/9804ab26d0f25cb9c97e34f96bb0fb2be0a9f677
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Return DISAS_NORETURN once

Trivial change to make next commits easier to understand.

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 3/5]
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-6-phi...@linaro.org>


  Commit: 39482c2edcc9864cf694b8ea525b49693443f90a
  
https://github.com/qemu/qemu/commit/39482c2edcc9864cf694b8ea525b49693443f90a
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Simplify gen_bcond_internal()

Richard Henderson explained on IRC:

  bcond_internal() used to insist that both branch
  destination and branch fallthrough are use_goto_tb;
  if not, we'd use movcond to compute an indirect jump.
  But it's perfectly fine for e.g. the branch fallthrough
  to use_goto_tb, and the branch destination to use
  an indirect branch.

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 4/5]
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-7-phi...@linaro.org>


  Commit: 82b60d2509ddb9123c48ea773c58886b7dad22d7
  
https://github.com/qemu/qemu/commit/82b60d2509ddb9123c48ea773c58886b7dad22d7
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Split out gen_goto_tb

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 5/5]
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-8-phi...@linaro.org>


  Commit: b1a3eacf314ba829506f65c227b57676db4ddbac
  
https://github.com/qemu/qemu/commit/b1a3eacf314ba829506f65c227b57676db4ddbac
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Split out gen_pc_disp


[Qemu-commits] [qemu/qemu] ab709f: target/alpha: Use cpu_env in preference to ALPHA_CPU

2024-05-04 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: ab709f13b8d44466787f4f53e6333b747d813afb
  
https://github.com/qemu/qemu/commit/ab709f13b8d44466787f4f53e6333b747d813afb
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/cpu.c
M target/alpha/helper.c

  Log Message:
  ---
  target/alpha: Use cpu_env in preference to ALPHA_CPU

ALPHA_CPU has a dynamic object type assert, which is
unnecessary considering that these are all class hooks.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-2-phi...@linaro.org>


  Commit: 1bcae46aac60ae0efbeb3957f7679da9e7e50f30
  
https://github.com/qemu/qemu/commit/1bcae46aac60ae0efbeb3957f7679da9e7e50f30
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Hoist branch shift to initial decode

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-3-phi...@linaro.org>


  Commit: 0cda93c9b55b1f865f92a2a2e189dcbaab485bb2
  
https://github.com/qemu/qemu/commit/0cda93c9b55b1f865f92a2a2e189dcbaab485bb2
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Use DISAS_NEXT definition instead of magic '0' value

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 1/5]
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-4-phi...@linaro.org>


  Commit: c0fcd5612e84810fbc62b17fb99a0a4dd847b251
  
https://github.com/qemu/qemu/commit/c0fcd5612e84810fbc62b17fb99a0a4dd847b251
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Inline DISAS_PC_UPDATED and return DISAS_NORETURN

Inline DISAS_PC_UPDATED switch case from alpha_tr_tb_stop():

switch (ctx->base.is_jmp) {
...
case DISAS_PC_UPDATED:
tcg_gen_lookup_and_goto_ptr();
break;

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 2/5]
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-5-phi...@linaro.org>


  Commit: 9804ab26d0f25cb9c97e34f96bb0fb2be0a9f677
  
https://github.com/qemu/qemu/commit/9804ab26d0f25cb9c97e34f96bb0fb2be0a9f677
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Return DISAS_NORETURN once

Trivial change to make next commits easier to understand.

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 3/5]
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-6-phi...@linaro.org>


  Commit: 39482c2edcc9864cf694b8ea525b49693443f90a
  
https://github.com/qemu/qemu/commit/39482c2edcc9864cf694b8ea525b49693443f90a
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Simplify gen_bcond_internal()

Richard Henderson explained on IRC:

  bcond_internal() used to insist that both branch
  destination and branch fallthrough are use_goto_tb;
  if not, we'd use movcond to compute an indirect jump.
  But it's perfectly fine for e.g. the branch fallthrough
  to use_goto_tb, and the branch destination to use
  an indirect branch.

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 4/5]
Signed-off-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-7-phi...@linaro.org>


  Commit: 82b60d2509ddb9123c48ea773c58886b7dad22d7
  
https://github.com/qemu/qemu/commit/82b60d2509ddb9123c48ea773c58886b7dad22d7
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Split out gen_goto_tb

Signed-off-by: Richard Henderson 
Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org>
[PMD: Split bigger patch, part 5/5]
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20240503072014.24751-8-phi...@linaro.org>


  Commit: b1a3eacf314ba829506f65c227b57676db4ddbac
  
https://github.com/qemu/qemu/commit/b1a3eacf314ba829506f65c227b57676db4ddbac
  Author: Richard Henderson 
  Date:   2024-05-04 (Sat, 04 May 2024)

  Changed paths:
M target/alpha/translate.c

  Log Message:
  ---
  target/alpha: Split out gen_pc_disp


[Qemu-commits] [qemu/qemu] 61653b: accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()

2024-05-03 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 61653b4a97b1c08b0f1d090da1ed981362a3961a
  
https://github.com/qemu/qemu/commit/61653b4a97b1c08b0f1d090da1ed981362a3961a
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/i386/nvmm/nvmm-all.c

  Log Message:
  ---
  accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()

When mechanically moving the @dirty field to AccelCPUState
in commit 79f1926b2d, we neglected cpu->accel is still NULL
when we want to dereference it.

Reported-by: Volker Rümelin 
Suggested-by: Volker Rümelin 
Fixes: 79f1926b2d ("accel/nvmm: Use accel-specific per-vcpu @dirty field")
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240429091918.27429-3-phi...@linaro.org>


  Commit: 083367dbbf6e5ac086c32e64db6701f493928e47
  
https://github.com/qemu/qemu/commit/083367dbbf6e5ac086c32e64db6701f493928e47
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/i386/whpx/whpx-all.c

  Log Message:
  ---
  accel/whpx: Fix NULL dereference in whpx_init_vcpu()

When mechanically moving the @dirty field to AccelCPUState
in commit 9ad49538c7, we neglected cpu->accel is still NULL
when we want to dereference it.

Fixes: 9ad49538c7 ("accel/whpx: Use accel-specific per-vcpu @dirty field")
Reported-by: Volker Rümelin 
Suggested-by: Volker Rümelin 
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240429091918.27429-2-phi...@linaro.org>


  Commit: f184f3856e82a6f4e96df6a77118d6a2e1a9059b
  
https://github.com/qemu/qemu/commit/f184f3856e82a6f4e96df6a77118d6a2e1a9059b
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M include/exec/cpu-common.h

  Log Message:
  ---
  exec: Include missing license in 'exec/cpu-common.h'

Commit 1ad2134f91 ("Hardware convenience library") extracted
"cpu-common.h" from "cpu-all.h", which uses the LGPL-2.1+ license.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240427155714.53669-5-phi...@linaro.org>


  Commit: 22879b66800d4f84ff48f151867369e76e33f9a4
  
https://github.com/qemu/qemu/commit/22879b66800d4f84ff48f151867369e76e33f9a4
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M bsd-user/qemu.h
M include/exec/cpu-all.h
R include/exec/user/abitypes.h
M include/exec/user/thunk.h
A include/user/abitypes.h
M include/user/syscall-trace.h
M linux-user/qemu.h

  Log Message:
  ---
  user: Move 'abitypes.h' from 'exec/user' to 'user'

Keep all user emulation headers under the same user/ directory.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240503125202.35667-1-phi...@linaro.org>


  Commit: 4e111653168acc058044885c679015d50fcaf474
  
https://github.com/qemu/qemu/commit/4e111653168acc058044885c679015d50fcaf474
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M MAINTAINERS
M bsd-user/qemu.h
R include/exec/user/thunk.h
A include/user/thunk.h
M linux-user/thunk.c
M linux-user/user-internals.h

  Log Message:
  ---
  user: Move 'thunk.h' from 'exec/user' to 'user'

Keep all user emulation headers under the same user/ directory.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240428221450.26460-2-phi...@linaro.org>


  Commit: bf0bcac890cc7b4c9e52c9e94817897ce73b69a8
  
https://github.com/qemu/qemu/commit/bf0bcac890cc7b4c9e52c9e94817897ce73b69a8
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M scripts/coverity-scan/COMPONENTS.md

  Log Message:
  ---
  coverity: Update user emulation regexp

All user emulation headers are now under include/user/.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240428221450.26460-3-phi...@linaro.org>


  Commit: 155fb465b1a6c87d8fc002a670b6517a6790fad8
  
https://github.com/qemu/qemu/commit/155fb465b1a6c87d8fc002a670b6517a6790fad8
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M plugins/api.c

  Log Message:
  ---
  plugins/api: Only include 'exec/ram_addr.h' with system emulation

"exec/ram_addr.h" shouldn't be used with user emulation.

Signed-off-by: Philippe Mathieu-Daudé 
Acked-by: Richard Henderson 
Message-Id: <20240427155714.53669-4-phi...@linaro.org>


  Commit: e096d370ad877f8573e20266f7e843084f9611d8
  
https://github.com/qemu/qemu/commit/e096d370ad877f8573e20266f7e843084f9611d8
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M plugins/core.c

  Log Message:
  ---
  plugins: Update stale comment

"plugin_mask" was renamed as "event_mask" in commit c006147122

[Qemu-commits] [qemu/qemu] 61653b: accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()

2024-05-03 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 61653b4a97b1c08b0f1d090da1ed981362a3961a
  
https://github.com/qemu/qemu/commit/61653b4a97b1c08b0f1d090da1ed981362a3961a
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/i386/nvmm/nvmm-all.c

  Log Message:
  ---
  accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()

When mechanically moving the @dirty field to AccelCPUState
in commit 79f1926b2d, we neglected cpu->accel is still NULL
when we want to dereference it.

Reported-by: Volker Rümelin 
Suggested-by: Volker Rümelin 
Fixes: 79f1926b2d ("accel/nvmm: Use accel-specific per-vcpu @dirty field")
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240429091918.27429-3-phi...@linaro.org>


  Commit: 083367dbbf6e5ac086c32e64db6701f493928e47
  
https://github.com/qemu/qemu/commit/083367dbbf6e5ac086c32e64db6701f493928e47
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M target/i386/whpx/whpx-all.c

  Log Message:
  ---
  accel/whpx: Fix NULL dereference in whpx_init_vcpu()

When mechanically moving the @dirty field to AccelCPUState
in commit 9ad49538c7, we neglected cpu->accel is still NULL
when we want to dereference it.

Fixes: 9ad49538c7 ("accel/whpx: Use accel-specific per-vcpu @dirty field")
Reported-by: Volker Rümelin 
Suggested-by: Volker Rümelin 
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240429091918.27429-2-phi...@linaro.org>


  Commit: f184f3856e82a6f4e96df6a77118d6a2e1a9059b
  
https://github.com/qemu/qemu/commit/f184f3856e82a6f4e96df6a77118d6a2e1a9059b
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M include/exec/cpu-common.h

  Log Message:
  ---
  exec: Include missing license in 'exec/cpu-common.h'

Commit 1ad2134f91 ("Hardware convenience library") extracted
"cpu-common.h" from "cpu-all.h", which uses the LGPL-2.1+ license.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240427155714.53669-5-phi...@linaro.org>


  Commit: 22879b66800d4f84ff48f151867369e76e33f9a4
  
https://github.com/qemu/qemu/commit/22879b66800d4f84ff48f151867369e76e33f9a4
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M bsd-user/qemu.h
M include/exec/cpu-all.h
R include/exec/user/abitypes.h
M include/exec/user/thunk.h
A include/user/abitypes.h
M include/user/syscall-trace.h
M linux-user/qemu.h

  Log Message:
  ---
  user: Move 'abitypes.h' from 'exec/user' to 'user'

Keep all user emulation headers under the same user/ directory.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240503125202.35667-1-phi...@linaro.org>


  Commit: 4e111653168acc058044885c679015d50fcaf474
  
https://github.com/qemu/qemu/commit/4e111653168acc058044885c679015d50fcaf474
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M MAINTAINERS
M bsd-user/qemu.h
R include/exec/user/thunk.h
A include/user/thunk.h
M linux-user/thunk.c
M linux-user/user-internals.h

  Log Message:
  ---
  user: Move 'thunk.h' from 'exec/user' to 'user'

Keep all user emulation headers under the same user/ directory.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240428221450.26460-2-phi...@linaro.org>


  Commit: bf0bcac890cc7b4c9e52c9e94817897ce73b69a8
  
https://github.com/qemu/qemu/commit/bf0bcac890cc7b4c9e52c9e94817897ce73b69a8
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M scripts/coverity-scan/COMPONENTS.md

  Log Message:
  ---
  coverity: Update user emulation regexp

All user emulation headers are now under include/user/.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240428221450.26460-3-phi...@linaro.org>


  Commit: 155fb465b1a6c87d8fc002a670b6517a6790fad8
  
https://github.com/qemu/qemu/commit/155fb465b1a6c87d8fc002a670b6517a6790fad8
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M plugins/api.c

  Log Message:
  ---
  plugins/api: Only include 'exec/ram_addr.h' with system emulation

"exec/ram_addr.h" shouldn't be used with user emulation.

Signed-off-by: Philippe Mathieu-Daudé 
Acked-by: Richard Henderson 
Message-Id: <20240427155714.53669-4-phi...@linaro.org>


  Commit: e096d370ad877f8573e20266f7e843084f9611d8
  
https://github.com/qemu/qemu/commit/e096d370ad877f8573e20266f7e843084f9611d8
  Author: Philippe Mathieu-Daudé 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M plugins/core.c

  Log Message:
  ---
  plugins: Update stale comment

"plugin_mask" was renamed as "event_mask" in commit c006147122

[Qemu-commits] [qemu/qemu] 8a917b: util/bufferiszero: Remove SSE4.1 variant

2024-05-03 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 8a917b99d5394d34ffcd851c8b287ced6eb48133
  
https://github.com/qemu/qemu/commit/8a917b99d5394d34ffcd851c8b287ced6eb48133
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Remove SSE4.1 variant

The SSE4.1 variant is virtually identical to the SSE2 variant, except
for using 'PTEST+JNZ' in place of 'PCMPEQB+PMOVMSKB+CMP+JNE' for testing
if an SSE register is all zeroes. The PTEST instruction decodes to two
uops, so it can be handled only by the complex decoder, and since
CMP+JNE are macro-fused, both sequences decode to three uops. The uops
comprising the PTEST instruction dispatch to p0 and p5 on Intel CPUs, so
PCMPEQB+PMOVMSKB is comparatively more flexible from dispatch
standpoint.

Hence, the use of PTEST brings no benefit from throughput standpoint.
Its latency is not important, since it feeds only a conditional jump,
which terminates the dependency chain.

I never observed PTEST variants to be faster on real hardware.

Signed-off-by: Alexander Monakov 
Signed-off-by: Mikhail Romanov 
Reviewed-by: Richard Henderson 
Message-Id: <20240206204809.9859-2-amona...@ispras.ru>


  Commit: d018425c324704949c7f65230def9586e71f07f5
  
https://github.com/qemu/qemu/commit/d018425c324704949c7f65230def9586e71f07f5
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Remove AVX512 variant

Thanks to early checks in the inline buffer_is_zero wrapper, the SIMD
routines are invoked much more rarely in normal use when most buffers
are non-zero. This makes use of AVX512 unprofitable, as it incurs extra
frequency and voltage transition periods during which the CPU operates
at reduced performance, as described in
https://travisdowns.github.io/blog/2020/01/17/avxfreq1.html

Signed-off-by: Mikhail Romanov 
Signed-off-by: Alexander Monakov 
Reviewed-by: Richard Henderson 
Message-Id: <20240206204809.9859-4-amona...@ispras.ru>
Signed-off-by: Richard Henderson 


  Commit: cbe3d5264631aa193fd2705820cbde6c5a602abb
  
https://github.com/qemu/qemu/commit/cbe3d5264631aa193fd2705820cbde6c5a602abb
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M include/qemu/cutils.h
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Reorganize for early test for acceleration

Test for length >= 256 inline, where is is often a constant.
Before calling into the accelerated routine, sample three bytes
from the buffer, which handles most non-zero buffers.

Signed-off-by: Alexander Monakov 
Signed-off-by: Mikhail Romanov 
Message-Id: <20240206204809.9859-3-amona...@ispras.ru>
[rth: Use __builtin_constant_p; move the indirect call out of line.]
Signed-off-by: Richard Henderson 


  Commit: 93a6085618f16fb2cd316d1e84f1a638b7e2d8ff
  
https://github.com/qemu/qemu/commit/93a6085618f16fb2cd316d1e84f1a638b7e2d8ff
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Remove useless prefetches

Use of prefetching in bufferiszero.c is quite questionable:

- prefetches are issued just a few CPU cycles before the corresponding
  line would be hit by demand loads;

- they are done for simple access patterns, i.e. where hardware
  prefetchers can perform better;

- they compete for load ports in loops that should be limited by load
  port throughput rather than ALU throughput.

Signed-off-by: Alexander Monakov 
Signed-off-by: Mikhail Romanov 
Reviewed-by: Richard Henderson 
Message-Id: <20240206204809.9859-5-amona...@ispras.ru>


  Commit: f28e0bbefa41fe643cce2f107e868abff312ced9
  
https://github.com/qemu/qemu/commit/f28e0bbefa41fe643cce2f107e868abff312ced9
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Optimize SSE2 and AVX2 variants

Increase unroll factor in SIMD loops from 4x to 8x in order to move
their bottlenecks from ALU port contention to load issue rate (two loads
per cycle on popular x86 implementations).

Avoid using out-of-bounds pointers in loop boundary conditions.

Follow SSE2 implementation strategy in the AVX2 variant. Avoid use of
PTEST, which is not profitable there (like in the removed SSE4 variant).

Signed-off-by: Alexander Monakov 
Signed-off-by: Mikhail Romanov 
Reviewed-by: Richard Henderson 
Message-Id: <20240206204809.9859-6-amona...@ispras.ru>


  Commit: 7ae6399a85f6a0818a532d9f3c6e200691f6ef68
  
https://github.com/qemu/qemu/commit/7ae6399a85f6a0818a532d9f3c6e200691f6ef68
  Author: Richard Henderson 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  

[Qemu-commits] [qemu/qemu] 8a917b: util/bufferiszero: Remove SSE4.1 variant

2024-05-03 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 8a917b99d5394d34ffcd851c8b287ced6eb48133
  
https://github.com/qemu/qemu/commit/8a917b99d5394d34ffcd851c8b287ced6eb48133
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Remove SSE4.1 variant

The SSE4.1 variant is virtually identical to the SSE2 variant, except
for using 'PTEST+JNZ' in place of 'PCMPEQB+PMOVMSKB+CMP+JNE' for testing
if an SSE register is all zeroes. The PTEST instruction decodes to two
uops, so it can be handled only by the complex decoder, and since
CMP+JNE are macro-fused, both sequences decode to three uops. The uops
comprising the PTEST instruction dispatch to p0 and p5 on Intel CPUs, so
PCMPEQB+PMOVMSKB is comparatively more flexible from dispatch
standpoint.

Hence, the use of PTEST brings no benefit from throughput standpoint.
Its latency is not important, since it feeds only a conditional jump,
which terminates the dependency chain.

I never observed PTEST variants to be faster on real hardware.

Signed-off-by: Alexander Monakov 
Signed-off-by: Mikhail Romanov 
Reviewed-by: Richard Henderson 
Message-Id: <20240206204809.9859-2-amona...@ispras.ru>


  Commit: d018425c324704949c7f65230def9586e71f07f5
  
https://github.com/qemu/qemu/commit/d018425c324704949c7f65230def9586e71f07f5
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Remove AVX512 variant

Thanks to early checks in the inline buffer_is_zero wrapper, the SIMD
routines are invoked much more rarely in normal use when most buffers
are non-zero. This makes use of AVX512 unprofitable, as it incurs extra
frequency and voltage transition periods during which the CPU operates
at reduced performance, as described in
https://travisdowns.github.io/blog/2020/01/17/avxfreq1.html

Signed-off-by: Mikhail Romanov 
Signed-off-by: Alexander Monakov 
Reviewed-by: Richard Henderson 
Message-Id: <20240206204809.9859-4-amona...@ispras.ru>
Signed-off-by: Richard Henderson 


  Commit: cbe3d5264631aa193fd2705820cbde6c5a602abb
  
https://github.com/qemu/qemu/commit/cbe3d5264631aa193fd2705820cbde6c5a602abb
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M include/qemu/cutils.h
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Reorganize for early test for acceleration

Test for length >= 256 inline, where is is often a constant.
Before calling into the accelerated routine, sample three bytes
from the buffer, which handles most non-zero buffers.

Signed-off-by: Alexander Monakov 
Signed-off-by: Mikhail Romanov 
Message-Id: <20240206204809.9859-3-amona...@ispras.ru>
[rth: Use __builtin_constant_p; move the indirect call out of line.]
Signed-off-by: Richard Henderson 


  Commit: 93a6085618f16fb2cd316d1e84f1a638b7e2d8ff
  
https://github.com/qemu/qemu/commit/93a6085618f16fb2cd316d1e84f1a638b7e2d8ff
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Remove useless prefetches

Use of prefetching in bufferiszero.c is quite questionable:

- prefetches are issued just a few CPU cycles before the corresponding
  line would be hit by demand loads;

- they are done for simple access patterns, i.e. where hardware
  prefetchers can perform better;

- they compete for load ports in loops that should be limited by load
  port throughput rather than ALU throughput.

Signed-off-by: Alexander Monakov 
Signed-off-by: Mikhail Romanov 
Reviewed-by: Richard Henderson 
Message-Id: <20240206204809.9859-5-amona...@ispras.ru>


  Commit: f28e0bbefa41fe643cce2f107e868abff312ced9
  
https://github.com/qemu/qemu/commit/f28e0bbefa41fe643cce2f107e868abff312ced9
  Author: Alexander Monakov 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  util/bufferiszero: Optimize SSE2 and AVX2 variants

Increase unroll factor in SIMD loops from 4x to 8x in order to move
their bottlenecks from ALU port contention to load issue rate (two loads
per cycle on popular x86 implementations).

Avoid using out-of-bounds pointers in loop boundary conditions.

Follow SSE2 implementation strategy in the AVX2 variant. Avoid use of
PTEST, which is not profitable there (like in the removed SSE4 variant).

Signed-off-by: Alexander Monakov 
Signed-off-by: Mikhail Romanov 
Reviewed-by: Richard Henderson 
Message-Id: <20240206204809.9859-6-amona...@ispras.ru>


  Commit: 7ae6399a85f6a0818a532d9f3c6e200691f6ef68
  
https://github.com/qemu/qemu/commit/7ae6399a85f6a0818a532d9f3c6e200691f6ef68
  Author: Richard Henderson 
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
M util/bufferiszero.c

  Log Message:
  ---
  

[Qemu-commits] [qemu/qemu] ed30e7: tcg: Make tcg/helper-info.h self-contained

2024-05-01 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ed30e7b1d9f5639d346fc2f0285568516e324398
  
https://github.com/qemu/qemu/commit/ed30e7b1d9f5639d346fc2f0285568516e324398
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M include/tcg/helper-info.h
M include/tcg/tcg.h
M tcg/tci.c

  Log Message:
  ---
  tcg: Make tcg/helper-info.h self-contained

Move MAX_CALL_IARGS from tcg.h and include for
the define of TCG_TARGET_REG_BITS.

Reviewed-by: Alex Bennée 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 83a0ad26737b9bca3b09fc8d27163ef6a0f28bd9
  
https://github.com/qemu/qemu/commit/83a0ad26737b9bca3b09fc8d27163ef6a0f28bd9
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M include/exec/helper-gen.h.inc
M include/tcg/tcg.h
M tcg/tcg.c

  Log Message:
  ---
  tcg: Pass function pointer to tcg_gen_call*

For normal helpers, read the function pointer from the
structure earlier.  For plugins, this will allow the
function pointer to come from elsewhere.

Reviewed-by: Alex Bennée 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 25875fe92eb55e905655dcdf5f06f89ef2c1f404
  
https://github.com/qemu/qemu/commit/25875fe92eb55e905655dcdf5f06f89ef2c1f404
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M plugins/core.c

  Log Message:
  ---
  plugins: Zero new qemu_plugin_dyn_cb entries

Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 


  Commit: aff56de576c949880d674d37b82bdc97841107fb
  
https://github.com/qemu/qemu/commit/aff56de576c949880d674d37b82bdc97841107fb
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: Move function pointer in qemu_plugin_dyn_cb

The out-of-line function pointer is mutually exclusive
with inline expansion, so move it into the union.
Wrap the pointer in a structure named 'regular' to match
PLUGIN_CB_REGULAR.

Reviewed-by: Alex Bennée 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: c7ba94836aa0665a931250e8f03f4aabce3c31f6
  
https://github.com/qemu/qemu/commit/c7ba94836aa0665a931250e8f03f4aabce3c31f6
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M include/qemu/plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: Create TCGHelperInfo for all out-of-line callbacks

TCGHelperInfo includes the ABI for every function call.

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: a0948bb78c9bd883d965aac3853e5d61f03e224b
  
https://github.com/qemu/qemu/commit/a0948bb78c9bd883d965aac3853e5d61f03e224b
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/tcg/tcg-op-common.h
M include/tcg/tcg-opc.h
M tcg/tcg-op.c

  Log Message:
  ---
  plugins: Use emit_before_op for PLUGIN_GEN_AFTER_INSN

Introduce a new plugin_cb op and migrate one operation.
By using emit_before_op, we do not need to emit opcodes
early and modify them later -- we can simply emit the
final set of opcodes once.

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: 21a3f62ff2b40a7a2abbd614b44fe5da461c3fd7
  
https://github.com/qemu/qemu/commit/21a3f62ff2b40a7a2abbd614b44fe5da461c3fd7
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M plugins/api.c

  Log Message:
  ---
  plugins: Use emit_before_op for PLUGIN_GEN_FROM_TB

By having the qemu_plugin_cb_flags be recorded in the TCGHelperInfo,
we no longer need to distinguish PLUGIN_CB_REGULAR from
PLUGIN_CB_REGULAR_R, so place all TB callbacks in the same queue.

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: 74bb8acc6a0c465eaf3a5a7d8b9fa5250a9243c7
  
https://github.com/qemu/qemu/commit/74bb8acc6a0c465eaf3a5a7d8b9fa5250a9243c7
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c

  Log Message:
  ---
  plugins: Add PLUGIN_GEN_AFTER_TB

Delay test of plugin_tb->mem_helper until the inject pass.

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: ac977170bf1e89fce25197ad54f04d9ec1f6a2b6
  
https://github.com/qemu/qemu/commit/ac977170bf1e89fce25197ad54f04d9ec1f6a2b6
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M plugins/api.c

  Log Message:
  ---
  plugins: Use emit_before_op for PLUGIN_GEN_FROM_INSN

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: 

[Qemu-commits] [qemu/qemu] ed30e7: tcg: Make tcg/helper-info.h self-contained

2024-05-01 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: ed30e7b1d9f5639d346fc2f0285568516e324398
  
https://github.com/qemu/qemu/commit/ed30e7b1d9f5639d346fc2f0285568516e324398
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M include/tcg/helper-info.h
M include/tcg/tcg.h
M tcg/tci.c

  Log Message:
  ---
  tcg: Make tcg/helper-info.h self-contained

Move MAX_CALL_IARGS from tcg.h and include for
the define of TCG_TARGET_REG_BITS.

Reviewed-by: Alex Bennée 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 83a0ad26737b9bca3b09fc8d27163ef6a0f28bd9
  
https://github.com/qemu/qemu/commit/83a0ad26737b9bca3b09fc8d27163ef6a0f28bd9
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M include/exec/helper-gen.h.inc
M include/tcg/tcg.h
M tcg/tcg.c

  Log Message:
  ---
  tcg: Pass function pointer to tcg_gen_call*

For normal helpers, read the function pointer from the
structure earlier.  For plugins, this will allow the
function pointer to come from elsewhere.

Reviewed-by: Alex Bennée 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 25875fe92eb55e905655dcdf5f06f89ef2c1f404
  
https://github.com/qemu/qemu/commit/25875fe92eb55e905655dcdf5f06f89ef2c1f404
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M plugins/core.c

  Log Message:
  ---
  plugins: Zero new qemu_plugin_dyn_cb entries

Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 


  Commit: aff56de576c949880d674d37b82bdc97841107fb
  
https://github.com/qemu/qemu/commit/aff56de576c949880d674d37b82bdc97841107fb
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: Move function pointer in qemu_plugin_dyn_cb

The out-of-line function pointer is mutually exclusive
with inline expansion, so move it into the union.
Wrap the pointer in a structure named 'regular' to match
PLUGIN_CB_REGULAR.

Reviewed-by: Alex Bennée 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: c7ba94836aa0665a931250e8f03f4aabce3c31f6
  
https://github.com/qemu/qemu/commit/c7ba94836aa0665a931250e8f03f4aabce3c31f6
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M include/qemu/plugin.h
M plugins/core.c

  Log Message:
  ---
  plugins: Create TCGHelperInfo for all out-of-line callbacks

TCGHelperInfo includes the ABI for every function call.

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: a0948bb78c9bd883d965aac3853e5d61f03e224b
  
https://github.com/qemu/qemu/commit/a0948bb78c9bd883d965aac3853e5d61f03e224b
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/tcg/tcg-op-common.h
M include/tcg/tcg-opc.h
M tcg/tcg-op.c

  Log Message:
  ---
  plugins: Use emit_before_op for PLUGIN_GEN_AFTER_INSN

Introduce a new plugin_cb op and migrate one operation.
By using emit_before_op, we do not need to emit opcodes
early and modify them later -- we can simply emit the
final set of opcodes once.

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: 21a3f62ff2b40a7a2abbd614b44fe5da461c3fd7
  
https://github.com/qemu/qemu/commit/21a3f62ff2b40a7a2abbd614b44fe5da461c3fd7
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M plugins/api.c

  Log Message:
  ---
  plugins: Use emit_before_op for PLUGIN_GEN_FROM_TB

By having the qemu_plugin_cb_flags be recorded in the TCGHelperInfo,
we no longer need to distinguish PLUGIN_CB_REGULAR from
PLUGIN_CB_REGULAR_R, so place all TB callbacks in the same queue.

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: 74bb8acc6a0c465eaf3a5a7d8b9fa5250a9243c7
  
https://github.com/qemu/qemu/commit/74bb8acc6a0c465eaf3a5a7d8b9fa5250a9243c7
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c

  Log Message:
  ---
  plugins: Add PLUGIN_GEN_AFTER_TB

Delay test of plugin_tb->mem_helper until the inject pass.

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: ac977170bf1e89fce25197ad54f04d9ec1f6a2b6
  
https://github.com/qemu/qemu/commit/ac977170bf1e89fce25197ad54f04d9ec1f6a2b6
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M accel/tcg/plugin-gen.c
M include/qemu/plugin.h
M plugins/api.c

  Log Message:
  ---
  plugins: Use emit_before_op for PLUGIN_GEN_FROM_INSN

Reviewed-by: Pierrick Bouvier 
Signed-off-by: Richard Henderson 


  Commit: 

[Qemu-commits] [qemu/qemu] f2c8ae: hw/ufs: Fix buffer overflow bug

2024-05-01 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f2c8aeb1afefcda92054c448b21fc59cdd99db30
  
https://github.com/qemu/qemu/commit/f2c8aeb1afefcda92054c448b21fc59cdd99db30
  Author: Jeuk Kim 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/ufs/ufs.c

  Log Message:
  ---
  hw/ufs: Fix buffer overflow bug

It fixes the buffer overflow vulnerability in the ufs device.
The bug was detected by sanitizers.

You can reproduce it by:

cat << EOF |\
qemu-system-x86_64 \
-display none -machine accel=qtest -m 512M -M q35 -nodefaults -drive \
file=null-co://,if=none,id=disk0 -device ufs,id=ufs_bus -device \
ufs-lu,drive=disk0,bus=ufs_bus -qtest stdio
outl 0xcf8 0x8810
outl 0xcfc 0xe000
outl 0xcf8 0x8804
outw 0xcfc 0x06
write 0xe058 0x1 0xa7
write 0xa 0x1 0x50
EOF

Resolves: #2299
Fixes: 329f16624499 ("hw/ufs: Support for Query Transfer Requests")
Reported-by: Zheyu Ma 
Signed-off-by: Jeuk Kim 


  Commit: 50761a5a9aeaed928807229a86d619b5251598ff
  
https://github.com/qemu/qemu/commit/50761a5a9aeaed928807229a86d619b5251598ff
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c
M qga/commands-win32.c
M qga/qapi-schema.json

  Log Message:
  ---
  qga: guest-get-fsinfo: add optional 'total-bytes-privileged' field

Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to
GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo:
used = (f_blocks - f_bfree), total = (f_blocks - f_bfree + f_bavail) as
returned by statvfs(3).  While on Windows guests that's all we can get
with GetDiskFreeSpaceExA(), on POSIX guests we might also be interested in
total file system size, as it's visible for root user.  Let's add an
optional field 'total-bytes-privileged' to GuestFilesystemInfo struct,
which'd only be reported on POSIX and represent f_blocks value as returned
by statvfs(3).

While here, also tweak the docs to reflect better where those values
come from.

Signed-off-by: Andrey Drobyshev 
Reviewed-by: Daniel P. Berrangé 
Reviewed-by: Konstantin Kostiuk 
Link: 
https://lore.kernel.org/r/20240320161648.158226-2-andrey.drobys...@virtuozzo.com
Signed-off-by: Konstantin Kostiuk 


  Commit: c3f32c13a325f1ca9a0b08c19fefe9e5cc04289d
  
https://github.com/qemu/qemu/commit/c3f32c13a325f1ca9a0b08c19fefe9e5cc04289d
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c

  Log Message:
  ---
  qga: introduce ga_run_command() helper for guest cmd execution

When executing guest commands in *nix environment, we repeat the same
fork/exec pattern multiple times.  Let's just separate it into a single
helper which would also be able to feed input data into the launched
process' stdin.  This way we can avoid code duplication.

To keep the history more bisectable, let's replace qmp commands
implementations one by one.  Also add G_GNUC_UNUSED attribute to the
helper and remove it in the next commit.

Originally-by: Yuri Pudgorodskiy 
Signed-off-by: Andrey Drobyshev 
Reviewed-by: Daniel P. Berrangé 
Reviewed-by: Konstantin Kostiuk 
Link: 
https://lore.kernel.org/r/20240320161648.158226-3-andrey.drobys...@virtuozzo.com
Signed-off-by: Konstantin Kostiuk 


  Commit: 123f040a6ba3530c4c427a27522d4f1ec013b4d8
  
https://github.com/qemu/qemu/commit/123f040a6ba3530c4c427a27522d4f1ec013b4d8
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c

  Log Message:
  ---
  qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper

Also remove the G_GNUC_UNUSED attribute added in the previous commit from
the helper.

Signed-off-by: Andrey Drobyshev 
Reviewed-by: Daniel P. Berrangé 
Reviewed-by: Konstantin Kostiuk 
Link: 
https://lore.kernel.org/r/20240320161648.158226-4-andrey.drobys...@virtuozzo.com
Signed-off-by: Konstantin Kostiuk 


  Commit: 1fce82bc407dae3a7a2a7c58a8955fc3598ed25f
  
https://github.com/qemu/qemu/commit/1fce82bc407dae3a7a2a7c58a8955fc3598ed25f
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c

  Log Message:
  ---
  qga/commands-posix: qmp_guest_set_time: use ga_run_command helper

There's no need to check for the existence of "/sbin/hwclock", the
exec() call will do that for us.

Signed-off-by: Andrey Drobyshev 
Reviewed-by: Daniel P. Berrangé 
Reviewed-by: Konstantin Kostiuk 
Link: 
https://lore.kernel.org/r/20240320161648.158226-5-andrey.drobys...@virtuozzo.com
Signed-off-by: Konstantin Kostiuk 


  Commit: 8ef383b460826e1ab138e892559f7ed2305e049d
  
https://github.com/qemu/qemu/commit/8ef383b460826e1ab138e892559f7ed2305e049d
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c

  Log Message:
  ---
  qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper

There's no 

[Qemu-commits] [qemu/qemu] f2c8ae: hw/ufs: Fix buffer overflow bug

2024-05-01 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f2c8aeb1afefcda92054c448b21fc59cdd99db30
  
https://github.com/qemu/qemu/commit/f2c8aeb1afefcda92054c448b21fc59cdd99db30
  Author: Jeuk Kim 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/ufs/ufs.c

  Log Message:
  ---
  hw/ufs: Fix buffer overflow bug

It fixes the buffer overflow vulnerability in the ufs device.
The bug was detected by sanitizers.

You can reproduce it by:

cat << EOF |\
qemu-system-x86_64 \
-display none -machine accel=qtest -m 512M -M q35 -nodefaults -drive \
file=null-co://,if=none,id=disk0 -device ufs,id=ufs_bus -device \
ufs-lu,drive=disk0,bus=ufs_bus -qtest stdio
outl 0xcf8 0x8810
outl 0xcfc 0xe000
outl 0xcf8 0x8804
outw 0xcfc 0x06
write 0xe058 0x1 0xa7
write 0xa 0x1 0x50
EOF

Resolves: #2299
Fixes: 329f16624499 ("hw/ufs: Support for Query Transfer Requests")
Reported-by: Zheyu Ma 
Signed-off-by: Jeuk Kim 


  Commit: 50761a5a9aeaed928807229a86d619b5251598ff
  
https://github.com/qemu/qemu/commit/50761a5a9aeaed928807229a86d619b5251598ff
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c
M qga/commands-win32.c
M qga/qapi-schema.json

  Log Message:
  ---
  qga: guest-get-fsinfo: add optional 'total-bytes-privileged' field

Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to
GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo:
used = (f_blocks - f_bfree), total = (f_blocks - f_bfree + f_bavail) as
returned by statvfs(3).  While on Windows guests that's all we can get
with GetDiskFreeSpaceExA(), on POSIX guests we might also be interested in
total file system size, as it's visible for root user.  Let's add an
optional field 'total-bytes-privileged' to GuestFilesystemInfo struct,
which'd only be reported on POSIX and represent f_blocks value as returned
by statvfs(3).

While here, also tweak the docs to reflect better where those values
come from.

Signed-off-by: Andrey Drobyshev 
Reviewed-by: Daniel P. Berrangé 
Reviewed-by: Konstantin Kostiuk 
Link: 
https://lore.kernel.org/r/20240320161648.158226-2-andrey.drobys...@virtuozzo.com
Signed-off-by: Konstantin Kostiuk 


  Commit: c3f32c13a325f1ca9a0b08c19fefe9e5cc04289d
  
https://github.com/qemu/qemu/commit/c3f32c13a325f1ca9a0b08c19fefe9e5cc04289d
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c

  Log Message:
  ---
  qga: introduce ga_run_command() helper for guest cmd execution

When executing guest commands in *nix environment, we repeat the same
fork/exec pattern multiple times.  Let's just separate it into a single
helper which would also be able to feed input data into the launched
process' stdin.  This way we can avoid code duplication.

To keep the history more bisectable, let's replace qmp commands
implementations one by one.  Also add G_GNUC_UNUSED attribute to the
helper and remove it in the next commit.

Originally-by: Yuri Pudgorodskiy 
Signed-off-by: Andrey Drobyshev 
Reviewed-by: Daniel P. Berrangé 
Reviewed-by: Konstantin Kostiuk 
Link: 
https://lore.kernel.org/r/20240320161648.158226-3-andrey.drobys...@virtuozzo.com
Signed-off-by: Konstantin Kostiuk 


  Commit: 123f040a6ba3530c4c427a27522d4f1ec013b4d8
  
https://github.com/qemu/qemu/commit/123f040a6ba3530c4c427a27522d4f1ec013b4d8
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c

  Log Message:
  ---
  qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper

Also remove the G_GNUC_UNUSED attribute added in the previous commit from
the helper.

Signed-off-by: Andrey Drobyshev 
Reviewed-by: Daniel P. Berrangé 
Reviewed-by: Konstantin Kostiuk 
Link: 
https://lore.kernel.org/r/20240320161648.158226-4-andrey.drobys...@virtuozzo.com
Signed-off-by: Konstantin Kostiuk 


  Commit: 1fce82bc407dae3a7a2a7c58a8955fc3598ed25f
  
https://github.com/qemu/qemu/commit/1fce82bc407dae3a7a2a7c58a8955fc3598ed25f
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c

  Log Message:
  ---
  qga/commands-posix: qmp_guest_set_time: use ga_run_command helper

There's no need to check for the existence of "/sbin/hwclock", the
exec() call will do that for us.

Signed-off-by: Andrey Drobyshev 
Reviewed-by: Daniel P. Berrangé 
Reviewed-by: Konstantin Kostiuk 
Link: 
https://lore.kernel.org/r/20240320161648.158226-5-andrey.drobys...@virtuozzo.com
Signed-off-by: Konstantin Kostiuk 


  Commit: 8ef383b460826e1ab138e892559f7ed2305e049d
  
https://github.com/qemu/qemu/commit/8ef383b460826e1ab138e892559f7ed2305e049d
  Author: Andrey Drobyshev 
  Date:   2024-05-01 (Wed, 01 May 2024)

  Changed paths:
M qga/commands-posix.c

  Log Message:
  ---
  qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper

There's no 

[Qemu-commits] [qemu/qemu] f2c8ae: hw/ufs: Fix buffer overflow bug

2024-04-30 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f2c8aeb1afefcda92054c448b21fc59cdd99db30
  
https://github.com/qemu/qemu/commit/f2c8aeb1afefcda92054c448b21fc59cdd99db30
  Author: Jeuk Kim 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/ufs/ufs.c

  Log Message:
  ---
  hw/ufs: Fix buffer overflow bug

It fixes the buffer overflow vulnerability in the ufs device.
The bug was detected by sanitizers.

You can reproduce it by:

cat << EOF |\
qemu-system-x86_64 \
-display none -machine accel=qtest -m 512M -M q35 -nodefaults -drive \
file=null-co://,if=none,id=disk0 -device ufs,id=ufs_bus -device \
ufs-lu,drive=disk0,bus=ufs_bus -qtest stdio
outl 0xcf8 0x8810
outl 0xcfc 0xe000
outl 0xcf8 0x8804
outw 0xcfc 0x06
write 0xe058 0x1 0xa7
write 0xa 0x1 0x50
EOF

Resolves: #2299
Fixes: 329f16624499 ("hw/ufs: Support for Query Transfer Requests")
Reported-by: Zheyu Ma 
Signed-off-by: Jeuk Kim 


  Commit: e79b15350ef613efdfa5067d07534c6a82a78a06
  
https://github.com/qemu/qemu/commit/e79b15350ef613efdfa5067d07534c6a82a78a06
  Author: Richard Henderson 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M hw/ufs/ufs.c

  Log Message:
  ---
  Merge tag 'pull-ufs-20240429' of https://gitlab.com/jeuk20.kim/qemu into 
staging

ufs queue

# -BEGIN PGP SIGNATURE-
#
# iQIzBAABCgAdFiEEUBfYMVl8eKPZB+73EuIgTA5dtgIFAmYvEScACgkQEuIgTA5d
# tgL3Qg//R3IcISQqqDaJ/ySzKGmkyohJSc6ySLYvla4Aki7PV+um2Dx/XNS7uG2b
# d3Qz4m6QaOKsocLfldRTn2FxVK238Rp5HNny5vc0kGRdwpR514B7aU0FhpT7qObS
# wbbgRdDddIBIiCFLhtXtg5/TK2h32VxGrVI6llX4gmd2VzqM0e4xeG1Oj8rZseOY
# SAgvDv68s1YwlO1p1vPvst/H+mUKYkqtPN1mjfCIn5tM6ss8kCLUnKjqGAg1BnSN
# xwaGrqqOlzQK2+aV02eiItiow8evU/h+c9eiTnBo/EvBwjoBn6flNXABWXFENnmP
# JjVIFeiNzSFhBPDzO23GXviuEt96j5lrcGYR48HYMZfEbJNpblXzWvEGMZWnXNgx
# Q3cpcarZ4vSWIflR9OnCSQaGLA0Ny6YqLbmrM/oD+v67EITafKKc+flmiF7DBASB
# fUoEsdffdA37LDtygJb7hfUhvPQWWAujmGzZ1cDP8Oa0MhT7aiD0Z/WqhhjVQbM0
# iLiCDDD0cc0pmT3vw3EnEjKjnSkY3H62Q7pnYHiQgij4Ls/Rdd/P7OkSd0aI82t0
# TooWGZJnyf8rjAzY2cEB1Twrhmhuyt9NnGxip9W8JsQBZMLabD2CahOm83zsk7jZ
# 3fOONz6XrW2ttFkLZcRd4x4YjKONjEXsSX2ZrXTZ5t3USz/VNvY=
# =Vwyi
# -END PGP SIGNATURE-
# gpg: Signature made Sun 28 Apr 2024 08:16:55 PM PDT
# gpg:using RSA key 5017D831597C78A3D907EEF712E2204C0E5DB602
# gpg: Good signature from "Jeuk Kim " [unknown]
# gpg: aka "Jeuk Kim " [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: 5017 D831 597C 78A3 D907  EEF7 12E2 204C 0E5D B602

* tag 'pull-ufs-20240429' of https://gitlab.com/jeuk20.kim/qemu:
  hw/ufs: Fix buffer overflow bug

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/9c6c079bc672...e79b15350ef6

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



[Qemu-commits] [qemu/qemu] 7c0c09: target/s390x/cpu_model: Make check_compatibility()...

2024-04-30 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7c0c099a88fd45b3598118dd7dce9ba64a1d41b7
  
https://github.com/qemu/qemu/commit/7c0c099a88fd45b3598118dd7dce9ba64a1d41b7
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c

  Log Message:
  ---
  target/s390x/cpu_model: Make check_compatibility() return boolean

As error.h suggested, the best practice for callee is to return
something to indicate success / failure.

With returned boolean, there's no need to check @err.

Suggested-by: Thomas Huth 
Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-2-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 9c2df9c5e849ce2c24a6518a56e6e44371ff541e
  
https://github.com/qemu/qemu/commit/9c2df9c5e849ce2c24a6518a56e6e44371ff541e
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c

  Log Message:
  ---
  target/s390x/cpu_model: Drop local @err in s390_realize_cpu_model()

Use @errp to fetch error information directly and drop the local
variable @err.

Suggested-by: Thomas Huth 
Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-3-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 47ab3b21374627419cd400141cacd534b9281f7b
  
https://github.com/qemu/qemu/commit/47ab3b21374627419cd400141cacd534b9281f7b
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c
M target/s390x/cpu_models.h
M target/s390x/kvm/kvm.c

  Log Message:
  ---
  target/s390x/cpu_models: Make kvm_s390_get_host_cpu_model() return boolean

As error.h suggested, the best practice for callee is to return
something to indicate success / failure.

So make kvm_s390_get_host_cpu_model() return boolean and check the
returned boolean in get_max_cpu_model() instead of accessing @err.

Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-5-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: c6f1baf2d5a91fd2dcb31c3911fa5bec878faf6f
  
https://github.com/qemu/qemu/commit/c6f1baf2d5a91fd2dcb31c3911fa5bec878faf6f
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c

  Log Message:
  ---
  target/s390x/cpu_models: Drop local @err in get_max_cpu_model()

Use @errp to fetch error information directly and drop the local
variable @err.

Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-6-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 38098df346b3daaa8771f2aee64c6b47d4c00e56
  
https://github.com/qemu/qemu/commit/38098df346b3daaa8771f2aee64c6b47d4c00e56
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.h
M target/s390x/cpu_models_sysemu.c
M target/s390x/kvm/kvm.c

  Log Message:
  ---
  target/s390x/cpu_models: Make kvm_s390_apply_cpu_model() return boolean

As error.h suggested, the best practice for callee is to return
something to indicate success / failure.

So make kvm_s390_apply_cpu_model() return boolean and check the
returned boolean in apply_cpu_model() instead of accessing @err.

Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-7-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 046bf2a6184f0a87b89b735ef77edd9a13a96656
  
https://github.com/qemu/qemu/commit/046bf2a6184f0a87b89b735ef77edd9a13a96656
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models_sysemu.c

  Log Message:
  ---
  target/s390x/cpu_models_sysemu: Drop local @err in apply_cpu_model()

Use @errp to fetch error information directly and drop the local
variable @err.

Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-8-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 69826741593644f6e9ee735cff37599c33764d67
  
https://github.com/qemu/qemu/commit/69826741593644f6e9ee735cff37599c33764d67
  Author: Chris Friedt 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M hw/misc/edu.c

  Log Message:
  ---
  hw: misc: edu: fix 2 off-by-one errors

In the case that size1 was zero, because of the explicit
'end1 > addr' check, the range check would fail and the error
message would read as shown below. The correct comparison
is 'end1 >= addr'.

EDU: DMA range 0x4-0x3 out of bounds (0x4-0x40fff)!

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1254
Signed-off-by: Chris Friedt 
[thuth: Adjust patch with regards to the "end1 <= end2" check]
Message-ID: <20221018122551.94567-1-cfri...@meta.com>
Signed-off-by: Thomas Huth 


  Commit: 3e64d7d7b8761107c39cc03da2d031d1d6f6912a
  

[Qemu-commits] [qemu/qemu] 7c0c09: target/s390x/cpu_model: Make check_compatibility()...

2024-04-30 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 7c0c099a88fd45b3598118dd7dce9ba64a1d41b7
  
https://github.com/qemu/qemu/commit/7c0c099a88fd45b3598118dd7dce9ba64a1d41b7
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c

  Log Message:
  ---
  target/s390x/cpu_model: Make check_compatibility() return boolean

As error.h suggested, the best practice for callee is to return
something to indicate success / failure.

With returned boolean, there's no need to check @err.

Suggested-by: Thomas Huth 
Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-2-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 9c2df9c5e849ce2c24a6518a56e6e44371ff541e
  
https://github.com/qemu/qemu/commit/9c2df9c5e849ce2c24a6518a56e6e44371ff541e
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c

  Log Message:
  ---
  target/s390x/cpu_model: Drop local @err in s390_realize_cpu_model()

Use @errp to fetch error information directly and drop the local
variable @err.

Suggested-by: Thomas Huth 
Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-3-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 47ab3b21374627419cd400141cacd534b9281f7b
  
https://github.com/qemu/qemu/commit/47ab3b21374627419cd400141cacd534b9281f7b
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c
M target/s390x/cpu_models.h
M target/s390x/kvm/kvm.c

  Log Message:
  ---
  target/s390x/cpu_models: Make kvm_s390_get_host_cpu_model() return boolean

As error.h suggested, the best practice for callee is to return
something to indicate success / failure.

So make kvm_s390_get_host_cpu_model() return boolean and check the
returned boolean in get_max_cpu_model() instead of accessing @err.

Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-5-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: c6f1baf2d5a91fd2dcb31c3911fa5bec878faf6f
  
https://github.com/qemu/qemu/commit/c6f1baf2d5a91fd2dcb31c3911fa5bec878faf6f
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c

  Log Message:
  ---
  target/s390x/cpu_models: Drop local @err in get_max_cpu_model()

Use @errp to fetch error information directly and drop the local
variable @err.

Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-6-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 38098df346b3daaa8771f2aee64c6b47d4c00e56
  
https://github.com/qemu/qemu/commit/38098df346b3daaa8771f2aee64c6b47d4c00e56
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.h
M target/s390x/cpu_models_sysemu.c
M target/s390x/kvm/kvm.c

  Log Message:
  ---
  target/s390x/cpu_models: Make kvm_s390_apply_cpu_model() return boolean

As error.h suggested, the best practice for callee is to return
something to indicate success / failure.

So make kvm_s390_apply_cpu_model() return boolean and check the
returned boolean in apply_cpu_model() instead of accessing @err.

Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-7-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 046bf2a6184f0a87b89b735ef77edd9a13a96656
  
https://github.com/qemu/qemu/commit/046bf2a6184f0a87b89b735ef77edd9a13a96656
  Author: Zhao Liu 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M target/s390x/cpu_models_sysemu.c

  Log Message:
  ---
  target/s390x/cpu_models_sysemu: Drop local @err in apply_cpu_model()

Use @errp to fetch error information directly and drop the local
variable @err.

Signed-off-by: Zhao Liu 
Reviewed-by: Thomas Huth 
Message-ID: <20240425031232.1586401-8-zhao1@intel.com>
Signed-off-by: Thomas Huth 


  Commit: 69826741593644f6e9ee735cff37599c33764d67
  
https://github.com/qemu/qemu/commit/69826741593644f6e9ee735cff37599c33764d67
  Author: Chris Friedt 
  Date:   2024-04-30 (Tue, 30 Apr 2024)

  Changed paths:
M hw/misc/edu.c

  Log Message:
  ---
  hw: misc: edu: fix 2 off-by-one errors

In the case that size1 was zero, because of the explicit
'end1 > addr' check, the range check would fail and the error
message would read as shown below. The correct comparison
is 'end1 >= addr'.

EDU: DMA range 0x4-0x3 out of bounds (0x4-0x40fff)!

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1254
Signed-off-by: Chris Friedt 
[thuth: Adjust patch with regards to the "end1 <= end2" check]
Message-ID: <20221018122551.94567-1-cfri...@meta.com>
Signed-off-by: Thomas Huth 


  Commit: 3e64d7d7b8761107c39cc03da2d031d1d6f6912a
  

[Qemu-commits] [qemu/qemu] d771ca: hw/loongarch: Move boot functions to boot.c

2024-04-30 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d771ca1c10ab146eae676dd6a6975a8f7cf84d65
  
https://github.com/qemu/qemu/commit/d771ca1c10ab146eae676dd6a6975a8f7cf84d65
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
A hw/loongarch/boot.c
M hw/loongarch/meson.build
M hw/loongarch/virt.c
A include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Move boot functions to boot.c

Move some boot functions to boot.c and struct
loongarch_boot_info into struct LoongArchMachineState.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20240426091551.2397867-2-gaos...@loongson.cn>


  Commit: 02307a678c3cb366d089ef8d90f6acb9663b98ce
  
https://github.com/qemu/qemu/commit/02307a678c3cb366d089ef8d90f6acb9663b98ce
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c

  Log Message:
  ---
  hw/loongarch: Add load initrd

we load initrd ramdisk after kernel_high address

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-3-gaos...@loongson.cn>


  Commit: 7e0510d7600cd0c1c4742751b415f4f7df84328e
  
https://github.com/qemu/qemu/commit/7e0510d7600cd0c1c4742751b415f4f7df84328e
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c

  Log Message:
  ---
  hw/loongarch: Add slave cpu boot_code

Load the slave CPU boot code at pflash0 and set
the slave CPU elf_address to VIRT_FLASH0_BASE.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-4-gaos...@loongson.cn>


  Commit: 58ee60d2d29437d1ddb02640a12a3f028307594c
  
https://github.com/qemu/qemu/commit/58ee60d2d29437d1ddb02640a12a3f028307594c
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/virt.h
M target/loongarch/cpu.h

  Log Message:
  ---
  hw/loongarch: Add init_cmdline

Add init_cmline and set boot_info->a0, a1

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-5-gaos...@loongson.cn>


  Commit: 4216baa90da53f9c53d0a9de264450040423ede0
  
https://github.com/qemu/qemu/commit/4216baa90da53f9c53d0a9de264450040423ede0
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/boot.h

  Log Message:
  ---
  hw/loongarch: Init efi_system_table

Add init_systab and set boot_info->a2

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-6-gaos...@loongson.cn>


  Commit: 252b8e68994aa48508cf1c7d365967e3850b70bb
  
https://github.com/qemu/qemu/commit/252b8e68994aa48508cf1c7d365967e3850b70bb
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M hw/loongarch/virt.c
M include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Init efi_boot_memmap table

The efi_system_table adds a efi_boot_memmap configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-7-gaos...@loongson.cn>


  Commit: 060685041ce6b98e5fb015b1d0318eb2f72944b5
  
https://github.com/qemu/qemu/commit/060685041ce6b98e5fb015b1d0318eb2f72944b5
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/boot.h

  Log Message:
  ---
  hw/loongarch: Init efi_initrd table

The efi_system_table adds a efi_initrd configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-8-gaos...@loongson.cn>


  Commit: 6042385149a0fb3f4a51d264fc3dc42775819c79
  
https://github.com/qemu/qemu/commit/6042385149a0fb3f4a51d264fc3dc42775819c79
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M hw/loongarch/virt.c
M include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Init efi_fdt table

The efi_system_table adds a efi_fdt configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-9-gaos...@loongson.cn>


  Commit: b11f9814526b833b3a052be2559457b1affad7f5
  
https://github.com/qemu/qemu/commit/b11f9814526b833b3a052be2559457b1affad7f5
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/virt.c

  Log Message:
  ---
  hw/loongarch: Fix fdt memory node wrong 'reg'

The right fdt memory node like [1], not [2]

  [1]
memory@0 {
device_type = "memory";
reg = <0x00 0x00 0x00 0x1000>;
};
  [2]
memory@0 {
device_type = "memory";
reg = <0x02 0x00 0x02 

[Qemu-commits] [qemu/qemu] d771ca: hw/loongarch: Move boot functions to boot.c

2024-04-30 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: d771ca1c10ab146eae676dd6a6975a8f7cf84d65
  
https://github.com/qemu/qemu/commit/d771ca1c10ab146eae676dd6a6975a8f7cf84d65
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
A hw/loongarch/boot.c
M hw/loongarch/meson.build
M hw/loongarch/virt.c
A include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Move boot functions to boot.c

Move some boot functions to boot.c and struct
loongarch_boot_info into struct LoongArchMachineState.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20240426091551.2397867-2-gaos...@loongson.cn>


  Commit: 02307a678c3cb366d089ef8d90f6acb9663b98ce
  
https://github.com/qemu/qemu/commit/02307a678c3cb366d089ef8d90f6acb9663b98ce
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c

  Log Message:
  ---
  hw/loongarch: Add load initrd

we load initrd ramdisk after kernel_high address

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-3-gaos...@loongson.cn>


  Commit: 7e0510d7600cd0c1c4742751b415f4f7df84328e
  
https://github.com/qemu/qemu/commit/7e0510d7600cd0c1c4742751b415f4f7df84328e
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c

  Log Message:
  ---
  hw/loongarch: Add slave cpu boot_code

Load the slave CPU boot code at pflash0 and set
the slave CPU elf_address to VIRT_FLASH0_BASE.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-4-gaos...@loongson.cn>


  Commit: 58ee60d2d29437d1ddb02640a12a3f028307594c
  
https://github.com/qemu/qemu/commit/58ee60d2d29437d1ddb02640a12a3f028307594c
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/virt.h
M target/loongarch/cpu.h

  Log Message:
  ---
  hw/loongarch: Add init_cmdline

Add init_cmline and set boot_info->a0, a1

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-5-gaos...@loongson.cn>


  Commit: 4216baa90da53f9c53d0a9de264450040423ede0
  
https://github.com/qemu/qemu/commit/4216baa90da53f9c53d0a9de264450040423ede0
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/boot.h

  Log Message:
  ---
  hw/loongarch: Init efi_system_table

Add init_systab and set boot_info->a2

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-6-gaos...@loongson.cn>


  Commit: 252b8e68994aa48508cf1c7d365967e3850b70bb
  
https://github.com/qemu/qemu/commit/252b8e68994aa48508cf1c7d365967e3850b70bb
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M hw/loongarch/virt.c
M include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Init efi_boot_memmap table

The efi_system_table adds a efi_boot_memmap configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-7-gaos...@loongson.cn>


  Commit: 060685041ce6b98e5fb015b1d0318eb2f72944b5
  
https://github.com/qemu/qemu/commit/060685041ce6b98e5fb015b1d0318eb2f72944b5
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/boot.h

  Log Message:
  ---
  hw/loongarch: Init efi_initrd table

The efi_system_table adds a efi_initrd configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-8-gaos...@loongson.cn>


  Commit: 6042385149a0fb3f4a51d264fc3dc42775819c79
  
https://github.com/qemu/qemu/commit/6042385149a0fb3f4a51d264fc3dc42775819c79
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M hw/loongarch/virt.c
M include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Init efi_fdt table

The efi_system_table adds a efi_fdt configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-9-gaos...@loongson.cn>


  Commit: b11f9814526b833b3a052be2559457b1affad7f5
  
https://github.com/qemu/qemu/commit/b11f9814526b833b3a052be2559457b1affad7f5
  Author: Song Gao 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/loongarch/virt.c

  Log Message:
  ---
  hw/loongarch: Fix fdt memory node wrong 'reg'

The right fdt memory node like [1], not [2]

  [1]
memory@0 {
device_type = "memory";
reg = <0x00 0x00 0x00 0x1000>;
};
  [2]
memory@0 {
device_type = "memory";
reg = <0x02 0x00 0x02 

[Qemu-commits] [qemu/qemu] 498432: target/i386/cpu: Remove "x86" prefix from the CPU ...

2024-04-30 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 49843214368eccbc46ad3946aae8cc81eaced98e
  
https://github.com/qemu/qemu/commit/49843214368eccbc46ad3946aae8cc81eaced98e
  Author: Thomas Huth 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M target/i386/cpu.c

  Log Message:
  ---
  target/i386/cpu: Remove "x86" prefix from the CPU list

Printing an "x86" in front of each CPU name is not helpful at all:
It is confusing for the users since they don't know whether they
have to specify these letters for the "-cpu" parameter, too, and
it also takes some precious space in the dense output of the CPU
entries. Let's simply remove this now and use two spaces at the
beginning of the lines for the indentation of the entries instead,
like most other target architectures are doing it for their CPU help
output already.

Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: 7febce361da200fa71e71e40316e4a6d2a5b40ab
  
https://github.com/qemu/qemu/commit/7febce361da200fa71e71e40316e4a6d2a5b40ab
  Author: Thomas Huth 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c

  Log Message:
  ---
  target/s390x/cpu_models: Rework the output of "-cpu help"

Printing an "s390x" in front of each CPU name is not helpful at all:
It is confusing for the users since they don't know whether they
have to specify these letters for the "-cpu" parameter, too, and
it also takes some precious space in the dense output of the CPU
entries. Let's simply remove this now!

While we're at it, use two spaces at the beginning of the lines for
the indentation of the entries, and add a "Available CPUs" in the
very first line, like most other target architectures are doing it
for their "-cpu help" output already.

Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: 5b638f6e900efd1d5f5d0697af69a0e9eb2bfc72
  
https://github.com/qemu/qemu/commit/5b638f6e900efd1d5f5d0697af69a0e9eb2bfc72
  Author: Thomas Huth 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M target/ppc/cpu_init.c

  Log Message:
  ---
  target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list

Printing a "PowerPC" in front of each CPU name is not helpful at all:
It is confusing for the users since they don't know whether they
have to specify these letters for the "-cpu" parameter, too, and
it also takes some precious space in the dense output of the CPU
entries. Let's simply remove this now and use two spaces at the
beginning of the lines for the indentation of the entries instead,
and add a "Available CPUs" in the very first line, like most other
target architectures are doing it for their CPU help output already.

Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: e3812d109663b8fee28e9334bbc12f684355984e
  
https://github.com/qemu/qemu/commit/e3812d109663b8fee28e9334bbc12f684355984e
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M scripts/checkpatch.pl

  Log Message:
  ---
  scripts/checkpatch: Avoid author email mangled by qemu-*@nongnu.org

Commit f5177798d8 ("scripts: report on author emails
that are mangled by the mailing list") added a check
for qemu-devel@ list, extend the regexp to cover more
such qemu-trivial@, qemu-block@ and qemu-ppc@.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: af692fd338154a20010c78a6bd9acb2c889dd4e7
  
https://github.com/qemu/qemu/commit/af692fd338154a20010c78a6bd9acb2c889dd4e7
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M scripts/checkpatch.pl

  Log Message:
  ---
  scripts/checkpatch: Do not use mailmap

The .mailmap file fixes mistake we already did.
Do not use it when running checkpatch.pl, otherwise
we might commit the very same mistakes.

Reported-by: Peter Maydell 
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: 06479dbf3d7d245572c4b3016e5a1d923ff04d66
  
https://github.com/qemu/qemu/commit/06479dbf3d7d245572c4b3016e5a1d923ff04d66
  Author: Li Zhijian 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M backends/cryptodev-builtin.c

  Log Message:
  ---
  backends/cryptodev-builtin: Fix local_error leaks

It seems that this error does not need to be propagated to the upper,
directly output the error to avoid the leaks

Closes: https://gitlab.com/qemu-project/qemu/-/issues/2283
Fixes: 2fda101de07 ("virtio-crypto: Support asynchronous mode")
Signed-off-by: Li Zhijian 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: zhenwei pi 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  

[Qemu-commits] [qemu/qemu] 498432: target/i386/cpu: Remove "x86" prefix from the CPU ...

2024-04-29 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 49843214368eccbc46ad3946aae8cc81eaced98e
  
https://github.com/qemu/qemu/commit/49843214368eccbc46ad3946aae8cc81eaced98e
  Author: Thomas Huth 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M target/i386/cpu.c

  Log Message:
  ---
  target/i386/cpu: Remove "x86" prefix from the CPU list

Printing an "x86" in front of each CPU name is not helpful at all:
It is confusing for the users since they don't know whether they
have to specify these letters for the "-cpu" parameter, too, and
it also takes some precious space in the dense output of the CPU
entries. Let's simply remove this now and use two spaces at the
beginning of the lines for the indentation of the entries instead,
like most other target architectures are doing it for their CPU help
output already.

Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: 7febce361da200fa71e71e40316e4a6d2a5b40ab
  
https://github.com/qemu/qemu/commit/7febce361da200fa71e71e40316e4a6d2a5b40ab
  Author: Thomas Huth 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M target/s390x/cpu_models.c

  Log Message:
  ---
  target/s390x/cpu_models: Rework the output of "-cpu help"

Printing an "s390x" in front of each CPU name is not helpful at all:
It is confusing for the users since they don't know whether they
have to specify these letters for the "-cpu" parameter, too, and
it also takes some precious space in the dense output of the CPU
entries. Let's simply remove this now!

While we're at it, use two spaces at the beginning of the lines for
the indentation of the entries, and add a "Available CPUs" in the
very first line, like most other target architectures are doing it
for their "-cpu help" output already.

Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: 5b638f6e900efd1d5f5d0697af69a0e9eb2bfc72
  
https://github.com/qemu/qemu/commit/5b638f6e900efd1d5f5d0697af69a0e9eb2bfc72
  Author: Thomas Huth 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M target/ppc/cpu_init.c

  Log Message:
  ---
  target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list

Printing a "PowerPC" in front of each CPU name is not helpful at all:
It is confusing for the users since they don't know whether they
have to specify these letters for the "-cpu" parameter, too, and
it also takes some precious space in the dense output of the CPU
entries. Let's simply remove this now and use two spaces at the
beginning of the lines for the indentation of the entries instead,
and add a "Available CPUs" in the very first line, like most other
target architectures are doing it for their CPU help output already.

Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: e3812d109663b8fee28e9334bbc12f684355984e
  
https://github.com/qemu/qemu/commit/e3812d109663b8fee28e9334bbc12f684355984e
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M scripts/checkpatch.pl

  Log Message:
  ---
  scripts/checkpatch: Avoid author email mangled by qemu-*@nongnu.org

Commit f5177798d8 ("scripts: report on author emails
that are mangled by the mailing list") added a check
for qemu-devel@ list, extend the regexp to cover more
such qemu-trivial@, qemu-block@ and qemu-ppc@.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: af692fd338154a20010c78a6bd9acb2c889dd4e7
  
https://github.com/qemu/qemu/commit/af692fd338154a20010c78a6bd9acb2c889dd4e7
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M scripts/checkpatch.pl

  Log Message:
  ---
  scripts/checkpatch: Do not use mailmap

The .mailmap file fixes mistake we already did.
Do not use it when running checkpatch.pl, otherwise
we might commit the very same mistakes.

Reported-by: Peter Maydell 
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  Commit: 06479dbf3d7d245572c4b3016e5a1d923ff04d66
  
https://github.com/qemu/qemu/commit/06479dbf3d7d245572c4b3016e5a1d923ff04d66
  Author: Li Zhijian 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M backends/cryptodev-builtin.c

  Log Message:
  ---
  backends/cryptodev-builtin: Fix local_error leaks

It seems that this error does not need to be propagated to the upper,
directly output the error to avoid the leaks

Closes: https://gitlab.com/qemu-project/qemu/-/issues/2283
Fixes: 2fda101de07 ("virtio-crypto: Support asynchronous mode")
Signed-off-by: Li Zhijian 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: zhenwei pi 
Reviewed-by: Michael Tokarev 
Signed-off-by: Michael Tokarev 


  

[Qemu-commits] [qemu/qemu] 035551: net/slirp: Use newer slirp_*_hostxfwd API

2024-04-29 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 03555199b63aa1fbce24d16287e141c33f572a24
  
https://github.com/qemu/qemu/commit/03555199b63aa1fbce24d16287e141c33f572a24
  Author: Nicholas Ngai 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M net/slirp.c

  Log Message:
  ---
  net/slirp: Use newer slirp_*_hostxfwd API

libslirp provides a newer slirp_*_hostxfwd API meant for
address-agnostic forwarding instead of the is_udp parameter which is
limited to just TCP/UDP.

This paves the way for IPv6 and Unix socket support.

Signed-off-by: Nicholas Ngai 
Signed-off-by: Samuel Thibault 
Tested-by: Breno Leitao 
Message-Id: <20210925214820.18078-1-nicho...@ngai.me>


  Commit: 5fee33d97a7f2e95716417bd164f2f5264acd976
  
https://github.com/qemu/qemu/commit/5fee33d97a7f2e95716417bd164f2f5264acd976
  Author: Richard Henderson 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M net/slirp.c

  Log Message:
  ---
  Merge tag 'samuel-thibault' of https://people.debian.org/~sthibault/qemu into 
staging

slirp: Use newer slirp_*_hostxfwd API

Nicholas Ngai (1):
  net/slirp: Use newer slirp_*_hostxfwd API

# -BEGIN PGP SIGNATURE-
#
# iQIzBAABCgAdFiEEqpLrvfAUiqYaQ7iu5IlMrEVBS7AFAmYu5OgACgkQ5IlMrEVB
# S7DGOQ//cnW2fiXnj+ijmQ4+h8Yj2vCtGZ9+7D74Q6KSbY0AkYVhRm+qWJA1XJrR
# Y7JvetqKGCxhol24x0aopDvcybIDU/EqFrxhmZY+dJhZWxfsvYpLGJ5TfulRA1gy
# PSDYQi6LlwDJyQT08po2TLA0zSOmxycdrA8mTJuf8UHDiXnwcy9WjDFF1tCrGoN4
# LgvsUUpQ6y9fZQxbFyPFwtHkUeREvfhRPT0c5lNsF0Cot8uXt5YOyCc0XKjX1d0F
# ucuCwv65gsIdcaDHcHIYhyKZX3lfAXAAaDe9njvISYcyOlyXOZS9df3tuMTeEW8S
# wuN10WuQHI7mpLS/IomnmYxb16lyhhwLC9kmNVZt6jGfTYB/xHUeXb9gIsdkc05s
# Cxy+VdxgnzGji6dOwufI8/ufWSti1PRB1yhZsmJtLC7MDOv5EJkxrmRXhWkr6LYZ
# CU52uT7CsOTKdmmwdjTUqkfswB70Js68J33Rbm3VWJlnSBAQ/ioGt50r7tqFBwT8
# HQc4CqYBT58BPb7rKrUa6dCy1uAprYl2juU3vl/nHcp2zIxIar1yzQK3OG+3h6fZ
# Mrg/C5l4WiEKFgdl5sMj1xJK15aC42/UyzxUFM12usKaOtKjQAIkjx6U7HCjwfdR
# BZmxTx2u7jGm9a0R3qhVhZjmIIbfLoeEHepLMOAHN+TGAl0bcxc=
# =22cZ
# -END PGP SIGNATURE-
# gpg: Signature made Sun 28 Apr 2024 05:08:08 PM PDT
# gpg:using RSA key AA92EBBDF0148AA61A43B8AEE4894CAC45414BB0
# gpg: Good signature from "Samuel Thibault " 
[undefined]
# gpg: aka "Samuel Thibault " [undefined]
# gpg: aka "Samuel Thibault " [unknown]
# gpg: aka "Samuel Thibault " 
[undefined]
# gpg: aka "Samuel Thibault " 
[undefined]
# gpg: aka "Samuel Thibault " 
[unknown]
# gpg: aka "Samuel Thibault " 
[unknown]
# gpg: aka "Samuel Thibault " [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: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#  Subkey fingerprint: AA92 EBBD F014 8AA6 1A43  B8AE E489 4CAC 4541 4BB0

* tag 'samuel-thibault' of https://people.debian.org/~sthibault/qemu:
  net/slirp: Use newer slirp_*_hostxfwd API

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/fd87be1dada5...5fee33d97a7f

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



[Qemu-commits] [qemu/qemu] 035551: net/slirp: Use newer slirp_*_hostxfwd API

2024-04-29 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 03555199b63aa1fbce24d16287e141c33f572a24
  
https://github.com/qemu/qemu/commit/03555199b63aa1fbce24d16287e141c33f572a24
  Author: Nicholas Ngai 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M net/slirp.c

  Log Message:
  ---
  net/slirp: Use newer slirp_*_hostxfwd API

libslirp provides a newer slirp_*_hostxfwd API meant for
address-agnostic forwarding instead of the is_udp parameter which is
limited to just TCP/UDP.

This paves the way for IPv6 and Unix socket support.

Signed-off-by: Nicholas Ngai 
Signed-off-by: Samuel Thibault 
Tested-by: Breno Leitao 
Message-Id: <20210925214820.18078-1-nicho...@ngai.me>


  Commit: 5fee33d97a7f2e95716417bd164f2f5264acd976
  
https://github.com/qemu/qemu/commit/5fee33d97a7f2e95716417bd164f2f5264acd976
  Author: Richard Henderson 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M net/slirp.c

  Log Message:
  ---
  Merge tag 'samuel-thibault' of https://people.debian.org/~sthibault/qemu into 
staging

slirp: Use newer slirp_*_hostxfwd API

Nicholas Ngai (1):
  net/slirp: Use newer slirp_*_hostxfwd API

# -BEGIN PGP SIGNATURE-
#
# iQIzBAABCgAdFiEEqpLrvfAUiqYaQ7iu5IlMrEVBS7AFAmYu5OgACgkQ5IlMrEVB
# S7DGOQ//cnW2fiXnj+ijmQ4+h8Yj2vCtGZ9+7D74Q6KSbY0AkYVhRm+qWJA1XJrR
# Y7JvetqKGCxhol24x0aopDvcybIDU/EqFrxhmZY+dJhZWxfsvYpLGJ5TfulRA1gy
# PSDYQi6LlwDJyQT08po2TLA0zSOmxycdrA8mTJuf8UHDiXnwcy9WjDFF1tCrGoN4
# LgvsUUpQ6y9fZQxbFyPFwtHkUeREvfhRPT0c5lNsF0Cot8uXt5YOyCc0XKjX1d0F
# ucuCwv65gsIdcaDHcHIYhyKZX3lfAXAAaDe9njvISYcyOlyXOZS9df3tuMTeEW8S
# wuN10WuQHI7mpLS/IomnmYxb16lyhhwLC9kmNVZt6jGfTYB/xHUeXb9gIsdkc05s
# Cxy+VdxgnzGji6dOwufI8/ufWSti1PRB1yhZsmJtLC7MDOv5EJkxrmRXhWkr6LYZ
# CU52uT7CsOTKdmmwdjTUqkfswB70Js68J33Rbm3VWJlnSBAQ/ioGt50r7tqFBwT8
# HQc4CqYBT58BPb7rKrUa6dCy1uAprYl2juU3vl/nHcp2zIxIar1yzQK3OG+3h6fZ
# Mrg/C5l4WiEKFgdl5sMj1xJK15aC42/UyzxUFM12usKaOtKjQAIkjx6U7HCjwfdR
# BZmxTx2u7jGm9a0R3qhVhZjmIIbfLoeEHepLMOAHN+TGAl0bcxc=
# =22cZ
# -END PGP SIGNATURE-
# gpg: Signature made Sun 28 Apr 2024 05:08:08 PM PDT
# gpg:using RSA key AA92EBBDF0148AA61A43B8AEE4894CAC45414BB0
# gpg: Good signature from "Samuel Thibault " 
[undefined]
# gpg: aka "Samuel Thibault " [undefined]
# gpg: aka "Samuel Thibault " [unknown]
# gpg: aka "Samuel Thibault " 
[undefined]
# gpg: aka "Samuel Thibault " 
[undefined]
# gpg: aka "Samuel Thibault " 
[unknown]
# gpg: aka "Samuel Thibault " 
[unknown]
# gpg: aka "Samuel Thibault " [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: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#  Subkey fingerprint: AA92 EBBD F014 8AA6 1A43  B8AE E489 4CAC 4541 4BB0

* tag 'samuel-thibault' of https://people.debian.org/~sthibault/qemu:
  net/slirp: Use newer slirp_*_hostxfwd API

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/fd87be1dada5...5fee33d97a7f

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



[Qemu-commits] [qemu/qemu] 294c92: Merge tag 'pull-ufs-20240429' of https://gitlab.co...

2024-04-29 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 294c92efc210d4762db68dc368960574489daf0a
  
https://github.com/qemu/qemu/commit/294c92efc210d4762db68dc368960574489daf0a
  Author: Richard Henderson 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/ufs/ufs.c

  Log Message:
  ---
  Merge tag 'pull-ufs-20240429' of https://gitlab.com/jeuk20.kim/qemu into 
staging

ufs queue

# -BEGIN PGP SIGNATURE-
#
# iQIzBAABCgAdFiEEUBfYMVl8eKPZB+73EuIgTA5dtgIFAmYvEScACgkQEuIgTA5d
# tgL3Qg//R3IcISQqqDaJ/ySzKGmkyohJSc6ySLYvla4Aki7PV+um2Dx/XNS7uG2b
# d3Qz4m6QaOKsocLfldRTn2FxVK238Rp5HNny5vc0kGRdwpR514B7aU0FhpT7qObS
# wbbgRdDddIBIiCFLhtXtg5/TK2h32VxGrVI6llX4gmd2VzqM0e4xeG1Oj8rZseOY
# SAgvDv68s1YwlO1p1vPvst/H+mUKYkqtPN1mjfCIn5tM6ss8kCLUnKjqGAg1BnSN
# xwaGrqqOlzQK2+aV02eiItiow8evU/h+c9eiTnBo/EvBwjoBn6flNXABWXFENnmP
# JjVIFeiNzSFhBPDzO23GXviuEt96j5lrcGYR48HYMZfEbJNpblXzWvEGMZWnXNgx
# Q3cpcarZ4vSWIflR9OnCSQaGLA0Ny6YqLbmrM/oD+v67EITafKKc+flmiF7DBASB
# fUoEsdffdA37LDtygJb7hfUhvPQWWAujmGzZ1cDP8Oa0MhT7aiD0Z/WqhhjVQbM0
# iLiCDDD0cc0pmT3vw3EnEjKjnSkY3H62Q7pnYHiQgij4Ls/Rdd/P7OkSd0aI82t0
# TooWGZJnyf8rjAzY2cEB1Twrhmhuyt9NnGxip9W8JsQBZMLabD2CahOm83zsk7jZ
# 3fOONz6XrW2ttFkLZcRd4x4YjKONjEXsSX2ZrXTZ5t3USz/VNvY=
# =Vwyi
# -END PGP SIGNATURE-
# gpg: Signature made Sun 28 Apr 2024 08:16:55 PM PDT
# gpg:using RSA key 5017D831597C78A3D907EEF712E2204C0E5DB602
# gpg: Good signature from "Jeuk Kim " [unknown]
# gpg: aka "Jeuk Kim " [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: 5017 D831 597C 78A3 D907  EEF7 12E2 204C 0E5D B602

* tag 'pull-ufs-20240429' of https://gitlab.com/jeuk20.kim/qemu:
  hw/ufs: Fix buffer overflow bug

Signed-off-by: Richard Henderson 



To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



[Qemu-commits] [qemu/qemu] 035551: net/slirp: Use newer slirp_*_hostxfwd API

2024-04-29 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 03555199b63aa1fbce24d16287e141c33f572a24
  
https://github.com/qemu/qemu/commit/03555199b63aa1fbce24d16287e141c33f572a24
  Author: Nicholas Ngai 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M net/slirp.c

  Log Message:
  ---
  net/slirp: Use newer slirp_*_hostxfwd API

libslirp provides a newer slirp_*_hostxfwd API meant for
address-agnostic forwarding instead of the is_udp parameter which is
limited to just TCP/UDP.

This paves the way for IPv6 and Unix socket support.

Signed-off-by: Nicholas Ngai 
Signed-off-by: Samuel Thibault 
Tested-by: Breno Leitao 
Message-Id: <20210925214820.18078-1-nicho...@ngai.me>


  Commit: f2c8aeb1afefcda92054c448b21fc59cdd99db30
  
https://github.com/qemu/qemu/commit/f2c8aeb1afefcda92054c448b21fc59cdd99db30
  Author: Jeuk Kim 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M hw/ufs/ufs.c

  Log Message:
  ---
  hw/ufs: Fix buffer overflow bug

It fixes the buffer overflow vulnerability in the ufs device.
The bug was detected by sanitizers.

You can reproduce it by:

cat << EOF |\
qemu-system-x86_64 \
-display none -machine accel=qtest -m 512M -M q35 -nodefaults -drive \
file=null-co://,if=none,id=disk0 -device ufs,id=ufs_bus -device \
ufs-lu,drive=disk0,bus=ufs_bus -qtest stdio
outl 0xcf8 0x8810
outl 0xcfc 0xe000
outl 0xcf8 0x8804
outw 0xcfc 0x06
write 0xe058 0x1 0xa7
write 0xa 0x1 0x50
EOF

Resolves: #2299
Fixes: 329f16624499 ("hw/ufs: Support for Query Transfer Requests")
Reported-by: Zheyu Ma 
Signed-off-by: Jeuk Kim 


  Commit: 89ef79063ab8a0066cd8856aa054cd44a9e29da7
  
https://github.com/qemu/qemu/commit/89ef79063ab8a0066cd8856aa054cd44a9e29da7
  Author: Alexander Ivanov 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M block/mirror.c

  Log Message:
  ---
  blockcommit: Reopen base image as RO after abort

If a blockcommit is aborted the base image remains in RW mode, that leads
to a fail of subsequent live migration.

How to reproduce:
  $ virsh snapshot-create-as vm snp1 --disk-only

  *** write something to the disk inside the guest ***

  $ virsh blockcommit vm vda --active --shallow && virsh blockjob vm vda --abort
  $ lsof /vzt/vm.qcow2
  COMMAND  PID USER   FD   TYPE DEVICE   SIZE/OFF NODE NAME
  qemu-syst 433203 root   45u   REG  253,0 1724776448  133 /vzt/vm.qcow2
  $ cat /proc/433203/fdinfo/45
  pos:0
  flags:  02140002 < The last 2 means RW mode

If the base image is in RW mode at the end of blockcommit and was in RO
mode before blockcommit, reopen the base BDS in RO.

Signed-off-by: Alexander Ivanov 
Reviewed-by: Vladimir Sementsov-Ogievskiy 
Message-Id: <20240404091136.129811-1-alexander.iva...@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy 


  Commit: 2bc68cb02cfa70b1f9ad57112196d5d24ab9a726
  
https://github.com/qemu/qemu/commit/2bc68cb02cfa70b1f9ad57112196d5d24ab9a726
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M block/copy-before-write.c

  Log Message:
  ---
  block/copy-before-write: fix permission

In case when source node does not have any parents, the condition still
works as required: backup job do create the parent by

  block_job_create -> block_job_add_bdrv -> bdrv_root_attach_child

Still, in this case checking @perm variable doesn't work, as backup job
creates the root blk with empty permissions (as it rely on CBW filter
to require correct permissions and don't want to create extra
conflicts).

So, we should not check @perm.

The hack may be dropped entirely when transactional insertion of
filter (when we don't try to recalculate permissions in intermediate
state, when filter does conflict with original parent of the source
node) merged (old big series
"[PATCH v5 00/45] Transactional block-graph modifying API"[1] and it's
current in-flight part is "[PATCH v8 0/7] blockdev-replace"[2])

[1] https://patchew.org/QEMU/20220330212902.590099-1-vsement...@openvz.org/
[2] https://patchew.org/QEMU/2023101718.932733-1-vsement...@yandex-team.ru/

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Tested-by: Fiona Ebner 
Message-Id: <20240313152822.626493-2-vsement...@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy 


  Commit: 64c4db62a32fd6d98993601ea14ce18b3b64d06b
  
https://github.com/qemu/qemu/commit/64c4db62a32fd6d98993601ea14ce18b3b64d06b
  Author: Vladimir Sementsov-Ogievskiy 
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
M block/copy-before-write.c

  Log Message:
  ---
  block/copy-before-write: support unligned snapshot-discard

First thing that crashes on unligned access here is
bdrv_reset_dirty_bitmap(). Correct way is to align-down the
snapshot-discard request.

Signed-off-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Fiona Ebner 
Tested-by: Fiona Ebner 
Message-Id: <20240313152822.626493-3-vsement...@yandex-team.ru>

[Qemu-commits] [qemu/qemu] b7084b: hw/loongarch: Move boot functions to boot.c

2024-04-28 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: b7084b5067b617fa193cb8c93273b7d8c2f1818f
  
https://github.com/qemu/qemu/commit/b7084b5067b617fa193cb8c93273b7d8c2f1818f
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
A hw/loongarch/boot.c
M hw/loongarch/meson.build
M hw/loongarch/virt.c
A include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Move boot functions to boot.c

Move some boot functions to boot.c and struct
loongarch_boot_info into struct LoongArchMachineState.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20240426091551.2397867-2-gaos...@loongson.cn>


  Commit: 56cf5871f2fe16c9bd1c58a10de003e6a74d3b1f
  
https://github.com/qemu/qemu/commit/56cf5871f2fe16c9bd1c58a10de003e6a74d3b1f
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c

  Log Message:
  ---
  hw/loongarch: Add load initrd

we load initrd ramdisk after kernel_high address

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-3-gaos...@loongson.cn>


  Commit: d17ddab92cd60f77a12dedfaddcb9ed8b77ff043
  
https://github.com/qemu/qemu/commit/d17ddab92cd60f77a12dedfaddcb9ed8b77ff043
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c

  Log Message:
  ---
  hw/loongarch: Add slave cpu boot_code

Load the slave CPU boot code at pflash0 and set
the slave CPU elf_address to VIRT_FLASH0_BASE.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-4-gaos...@loongson.cn>


  Commit: bafbdb7f1a196ac43f05074270024c7772773919
  
https://github.com/qemu/qemu/commit/bafbdb7f1a196ac43f05074270024c7772773919
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/virt.h
M target/loongarch/cpu.h

  Log Message:
  ---
  hw/loongarch: Add init_cmdline

Add init_cmline and set boot_info->a0, a1

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-5-gaos...@loongson.cn>


  Commit: a85f06f687dc20b705aab954bd30d956fb2e9493
  
https://github.com/qemu/qemu/commit/a85f06f687dc20b705aab954bd30d956fb2e9493
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/boot.h

  Log Message:
  ---
  hw/loongarch: Init efi_system_table

Add init_systab and set boot_info->a2

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-6-gaos...@loongson.cn>


  Commit: c7f312c889052f87856f52f6900f091915d9261c
  
https://github.com/qemu/qemu/commit/c7f312c889052f87856f52f6900f091915d9261c
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M hw/loongarch/virt.c
M include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Init efi_boot_memmap table

The efi_system_table adds a efi_boot_memmap configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-7-gaos...@loongson.cn>


  Commit: 9af253ee98a0b5976549b7d7a7572ababf1fabe6
  
https://github.com/qemu/qemu/commit/9af253ee98a0b5976549b7d7a7572ababf1fabe6
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M include/hw/loongarch/boot.h

  Log Message:
  ---
  hw/loongarch: Init efi_initrd table

The efi_system_table adds a efi_initrd configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-8-gaos...@loongson.cn>


  Commit: 02585ed92bfaf4e38f7c2cf15ce03b88cbc31b9c
  
https://github.com/qemu/qemu/commit/02585ed92bfaf4e38f7c2cf15ce03b88cbc31b9c
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M hw/loongarch/boot.c
M hw/loongarch/virt.c
M include/hw/loongarch/boot.h
M include/hw/loongarch/virt.h

  Log Message:
  ---
  hw/loongarch: Init efi_fdt table

The efi_system_table adds a efi_fdt configuration table.

Signed-off-by: Song Gao 
Reviewed-by: Bibo Mao 
Message-Id: <20240426091551.2397867-9-gaos...@loongson.cn>


  Commit: 3b51b4b80293c40358ab49eb8f49647b4943786f
  
https://github.com/qemu/qemu/commit/3b51b4b80293c40358ab49eb8f49647b4943786f
  Author: Song Gao 
  Date:   2024-04-28 (Sun, 28 Apr 2024)

  Changed paths:
M hw/loongarch/virt.c

  Log Message:
  ---
  hw/loongarch: Fix fdt memory node wrong 'reg'

The right fdt memory node like [1], not [2]

  [1]
memory@0 {
device_type = "memory";
reg = <0x00 0x00 0x00 0x1000>;
};
  [2]
memory@0 {
device_type = "memory";
reg = <0x02 0x00 0x02 

[Qemu-commits] [qemu/qemu] 7d7a21: exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET

2024-04-27 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7d7a21ba691d3f52fdcf123adf2b79f7ce88174d
  
https://github.com/qemu/qemu/commit/7d7a21ba691d3f52fdcf123adf2b79f7ce88174d
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M include/exec/cpu-defs.h
M include/exec/helper-head.h
M include/exec/memop.h
M include/exec/memory.h
M include/exec/tswap.h
M include/gdbstub/helpers.h
M include/hw/core/cpu.h
M include/qemu/osdep.h
M include/sysemu/hvf.h
M include/sysemu/kvm.h
M include/sysemu/nvmm.h
M include/sysemu/whpx.h
M include/sysemu/xen.h
M meson.build
M scripts/analyze-inclusions
M target/arm/kvm-consts.h

  Log Message:
  ---
  exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET

'NEED_CPU_H' guard target-specific code; it is defined by meson
altogether with the 'CONFIG_TARGET' definition. Rename NEED_CPU_H
as COMPILING_PER_TARGET to clarify its meaning.

Mechanical change running:

 $ sed -i s/NEED_CPU_H/COMPILING_PER_TARGET/g $(git grep -l NEED_CPU_H)

then manually add a /* COMPILING_PER_TARGET */ comment
after the '#endif' when the block is large.

Inspired-by: Peter Maydell 
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240322161439.6448-4-phi...@linaro.org>


  Commit: 51579d40f9c719361ec9355bb48386e5d3ce85c1
  
https://github.com/qemu/qemu/commit/51579d40f9c719361ec9355bb48386e5d3ce85c1
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M accel/stubs/tcg-stub.c
M accel/tcg/cputlb.c
M include/exec/exec-all.h

  Log Message:
  ---
  exec: Reduce tlb_set_dirty() declaration scope

tlb_set_dirty() is only used in accel/tcg/cputlb.c,
where it is defined. Declare it statically, removing
the stub.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Harsh Prateek Bora 
Reviewed-by: Richard Henderson 
Message-Id: <20240418192525.97451-11-phi...@linaro.org>


  Commit: 8501048b501aec0d2d422aafd713348c235d8b83
  
https://github.com/qemu/qemu/commit/8501048b501aec0d2d422aafd713348c235d8b83
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M include/exec/cpu-all.h

  Log Message:
  ---
  exec: Include 'cpu.h' before validating CPUArchState placement

CPUArchState 'env' field is defined within the ArchCPU structure,
so we need to include each target "cpu.h" header which defines it.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Warner Losh 
Message-Id: <20231211212003.21686-2-phi...@linaro.org>


  Commit: 75bbe6a4d2bc9c3681ab71021645d655ad045a75
  
https://github.com/qemu/qemu/commit/75bbe6a4d2bc9c3681ab71021645d655ad045a75
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M meson.build
A page-target.c
M system/physmem.c
M target/meson.build
R target/target-common.c

  Log Message:
  ---
  exec: Expose 'target_page.h' API to user emulation

User-only objects might benefit from the "exec/target_page.h"
API, which allows to build some objects once for all targets.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Warner Losh 
Reviewed-by: Richard Henderson 
Message-Id: <20231211212003.21686-3-phi...@linaro.org>


  Commit: 4597463b3851d9f6ec22542b6645511d7f889f78
  
https://github.com/qemu/qemu/commit/4597463b3851d9f6ec22542b6645511d7f889f78
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M accel/tcg/translator.c
M target/hexagon/translate.c
M target/microblaze/cpu.c
M target/microblaze/translate.c

  Log Message:
  ---
  accel: Include missing 'exec/cpu_ldst.h' header

Theses files call cpu_ldl_code() which is declared
in "exec/cpu_ldst.h".

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20231211212003.21686-5-phi...@linaro.org>


  Commit: fe7667343c81bffc5f87e591589c691faa84286a
  
https://github.com/qemu/qemu/commit/fe7667343c81bffc5f87e591589c691faa84286a
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M gdbstub/gdbstub.c

  Log Message:
  ---
  gdbstub: Include missing 'hw/core/cpu.h' header

Functions such gdb_get_cpu_pid() dereference CPUState so
require the structure declaration from "hw/core/cpu.h":

  static uint32_t gdb_get_cpu_pid(CPUState *cpu)
  {
...
return cpu->cluster_index + 1;
  }

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Warner Losh 
Message-Id: <20231211212003.21686-15-phi...@linaro.org>
Reviewed-by: Richard Henderson 


  Commit: 94326e4f217991102770667f684156bdbef599e6
  
https://github.com/qemu/qemu/commit/94326e4f217991102770667f684156bdbef599e6
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M include/gdbstub/helpers.h

  Log Message:
  ---
  gdbstub: Simplify 

[Qemu-commits] [qemu/qemu] 7d7a21: exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET

2024-04-26 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 7d7a21ba691d3f52fdcf123adf2b79f7ce88174d
  
https://github.com/qemu/qemu/commit/7d7a21ba691d3f52fdcf123adf2b79f7ce88174d
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M include/exec/cpu-defs.h
M include/exec/helper-head.h
M include/exec/memop.h
M include/exec/memory.h
M include/exec/tswap.h
M include/gdbstub/helpers.h
M include/hw/core/cpu.h
M include/qemu/osdep.h
M include/sysemu/hvf.h
M include/sysemu/kvm.h
M include/sysemu/nvmm.h
M include/sysemu/whpx.h
M include/sysemu/xen.h
M meson.build
M scripts/analyze-inclusions
M target/arm/kvm-consts.h

  Log Message:
  ---
  exec: Rename NEED_CPU_H -> COMPILING_PER_TARGET

'NEED_CPU_H' guard target-specific code; it is defined by meson
altogether with the 'CONFIG_TARGET' definition. Rename NEED_CPU_H
as COMPILING_PER_TARGET to clarify its meaning.

Mechanical change running:

 $ sed -i s/NEED_CPU_H/COMPILING_PER_TARGET/g $(git grep -l NEED_CPU_H)

then manually add a /* COMPILING_PER_TARGET */ comment
after the '#endif' when the block is large.

Inspired-by: Peter Maydell 
Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240322161439.6448-4-phi...@linaro.org>


  Commit: 51579d40f9c719361ec9355bb48386e5d3ce85c1
  
https://github.com/qemu/qemu/commit/51579d40f9c719361ec9355bb48386e5d3ce85c1
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M accel/stubs/tcg-stub.c
M accel/tcg/cputlb.c
M include/exec/exec-all.h

  Log Message:
  ---
  exec: Reduce tlb_set_dirty() declaration scope

tlb_set_dirty() is only used in accel/tcg/cputlb.c,
where it is defined. Declare it statically, removing
the stub.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Harsh Prateek Bora 
Reviewed-by: Richard Henderson 
Message-Id: <20240418192525.97451-11-phi...@linaro.org>


  Commit: 8501048b501aec0d2d422aafd713348c235d8b83
  
https://github.com/qemu/qemu/commit/8501048b501aec0d2d422aafd713348c235d8b83
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M include/exec/cpu-all.h

  Log Message:
  ---
  exec: Include 'cpu.h' before validating CPUArchState placement

CPUArchState 'env' field is defined within the ArchCPU structure,
so we need to include each target "cpu.h" header which defines it.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Warner Losh 
Message-Id: <20231211212003.21686-2-phi...@linaro.org>


  Commit: 75bbe6a4d2bc9c3681ab71021645d655ad045a75
  
https://github.com/qemu/qemu/commit/75bbe6a4d2bc9c3681ab71021645d655ad045a75
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M meson.build
A page-target.c
M system/physmem.c
M target/meson.build
R target/target-common.c

  Log Message:
  ---
  exec: Expose 'target_page.h' API to user emulation

User-only objects might benefit from the "exec/target_page.h"
API, which allows to build some objects once for all targets.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Warner Losh 
Reviewed-by: Richard Henderson 
Message-Id: <20231211212003.21686-3-phi...@linaro.org>


  Commit: 4597463b3851d9f6ec22542b6645511d7f889f78
  
https://github.com/qemu/qemu/commit/4597463b3851d9f6ec22542b6645511d7f889f78
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M accel/tcg/translator.c
M target/hexagon/translate.c
M target/microblaze/cpu.c
M target/microblaze/translate.c

  Log Message:
  ---
  accel: Include missing 'exec/cpu_ldst.h' header

Theses files call cpu_ldl_code() which is declared
in "exec/cpu_ldst.h".

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20231211212003.21686-5-phi...@linaro.org>


  Commit: fe7667343c81bffc5f87e591589c691faa84286a
  
https://github.com/qemu/qemu/commit/fe7667343c81bffc5f87e591589c691faa84286a
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M gdbstub/gdbstub.c

  Log Message:
  ---
  gdbstub: Include missing 'hw/core/cpu.h' header

Functions such gdb_get_cpu_pid() dereference CPUState so
require the structure declaration from "hw/core/cpu.h":

  static uint32_t gdb_get_cpu_pid(CPUState *cpu)
  {
...
return cpu->cluster_index + 1;
  }

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Warner Losh 
Message-Id: <20231211212003.21686-15-phi...@linaro.org>
Reviewed-by: Richard Henderson 


  Commit: 94326e4f217991102770667f684156bdbef599e6
  
https://github.com/qemu/qemu/commit/94326e4f217991102770667f684156bdbef599e6
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M include/gdbstub/helpers.h

  Log Message:
  ---
  gdbstub: Simplify 

[Qemu-commits] [qemu/qemu] ae6d91: nbd/server: do not poll within a coroutine context

2024-04-26 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ae6d91a7e9b77abb029ed3fa9fad461422286942
  
https://github.com/qemu/qemu/commit/ae6d91a7e9b77abb029ed3fa9fad461422286942
  Author: Zhu Yangyang 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M nbd/client.c
M nbd/common.c
M nbd/nbd-internal.h
M nbd/server.c

  Log Message:
  ---
  nbd/server: do not poll within a coroutine context

Coroutines are not supposed to block. Instead, they should yield.

The client performs TLS upgrade outside of an AIOContext, during
synchronous handshake; this still requires g_main_loop.  But the
server responds to TLS upgrade inside a coroutine, so a nested
g_main_loop is wrong.  Since the two callbacks no longer share more
than the setting of data.complete and data.error, it's just as easy to
use static helpers instead of trying to share a common code path.  It
is also possible to add assertions that no other code is interfering
with the eventual path to qio reaching the callback, whether or not it
required a yield or main loop.

Fixes: f95910f ("nbd: implement TLS support in the protocol negotiation")
Signed-off-by: Zhu Yangyang 
[eblake: move callbacks to their use point, add assertions]
Signed-off-by: Eric Blake 
Message-ID: <20240408160214.1200629-5-ebl...@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy 


  Commit: 4fa333e08dd96395a99ea8dd9e4c73a29dd23344
  
https://github.com/qemu/qemu/commit/4fa333e08dd96395a99ea8dd9e4c73a29dd23344
  Author: Eric Blake 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M nbd/server.c

  Log Message:
  ---
  nbd/server: Mark negotiation functions as coroutine_fn

nbd_negotiate() is already marked coroutine_fn.  And given the fix in
the previous patch to have nbd_negotiate_handle_starttls not create
and wait on a g_main_loop (as that would violate coroutine
constraints), it is worth marking the rest of the related static
functions reachable only during option negotiation as also being
coroutine_fn.

Suggested-by: Vladimir Sementsov-Ogievskiy 
Signed-off-by: Eric Blake 
Message-ID: <20240408160214.1200629-6-ebl...@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy 
[eblake: drop one spurious coroutine_fn marking]
Signed-off-by: Eric Blake 


  Commit: 77bcaf5f222fb19667738dc2ca7dec6172d69db7
  
https://github.com/qemu/qemu/commit/77bcaf5f222fb19667738dc2ca7dec6172d69db7
  Author: Richard Henderson 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M nbd/client.c
M nbd/common.c
M nbd/nbd-internal.h
M nbd/server.c

  Log Message:
  ---
  Merge tag 'pull-nbd-2024-04-25' of https://repo.or.cz/qemu/ericb into staging

NBD patches for 2024-04-25

- Avoid calling poll() within coroutine

# -BEGIN PGP SIGNATURE-
#
# iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAmYqzkMACgkQp6FrSiUn
# Q2ol3wf9HbwiYkyHhqybb4ykEs75N8B2JPbOj6gYRSBn7rz90k1vElDCM2yQhlDN
# Ltuh8lTOaJb+Z4n2dKIF2m5hL2GTm/xtErIIpP7o6A+11mHW9ag/VLaAMdWJxmUr
# WEUIH6mVtuRcxTTCp01l/JAYpUxOoQs1fyQljONH5kg1MAZpTTD61/cuhrXlvPLU
# cVlrLfob90oYhydCq5o6ucW3GhaEYkaZzHIWFy7LphFySebMmnbnPhYf/JD6RZPL
# s5K7njMK1DOyguCLlOzSuRM4gIbYunnr0Ofr/orTlAUZvbhRGKUlH0RTMWVMzgek
# xArnEZYlsqF2wIvrz0GwMDL7BMmG7A==
# =vXJj
# -END PGP SIGNATURE-
# gpg: Signature made Thu 25 Apr 2024 02:42:27 PM PDT
# gpg:using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake " [full]
# gpg: aka "Eric Blake (Free Software Programmer) 
" [full]
# gpg: aka "[jpeg image of size 6874]" [full]

* tag 'pull-nbd-2024-04-25' of https://repo.or.cz/qemu/ericb:
  nbd/server: Mark negotiation functions as coroutine_fn
  nbd/server: do not poll within a coroutine context

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/a118c4aff408...77bcaf5f222f

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



[Qemu-commits] [qemu/qemu] ae6d91: nbd/server: do not poll within a coroutine context

2024-04-26 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: ae6d91a7e9b77abb029ed3fa9fad461422286942
  
https://github.com/qemu/qemu/commit/ae6d91a7e9b77abb029ed3fa9fad461422286942
  Author: Zhu Yangyang 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M nbd/client.c
M nbd/common.c
M nbd/nbd-internal.h
M nbd/server.c

  Log Message:
  ---
  nbd/server: do not poll within a coroutine context

Coroutines are not supposed to block. Instead, they should yield.

The client performs TLS upgrade outside of an AIOContext, during
synchronous handshake; this still requires g_main_loop.  But the
server responds to TLS upgrade inside a coroutine, so a nested
g_main_loop is wrong.  Since the two callbacks no longer share more
than the setting of data.complete and data.error, it's just as easy to
use static helpers instead of trying to share a common code path.  It
is also possible to add assertions that no other code is interfering
with the eventual path to qio reaching the callback, whether or not it
required a yield or main loop.

Fixes: f95910f ("nbd: implement TLS support in the protocol negotiation")
Signed-off-by: Zhu Yangyang 
[eblake: move callbacks to their use point, add assertions]
Signed-off-by: Eric Blake 
Message-ID: <20240408160214.1200629-5-ebl...@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy 


  Commit: 4fa333e08dd96395a99ea8dd9e4c73a29dd23344
  
https://github.com/qemu/qemu/commit/4fa333e08dd96395a99ea8dd9e4c73a29dd23344
  Author: Eric Blake 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M nbd/server.c

  Log Message:
  ---
  nbd/server: Mark negotiation functions as coroutine_fn

nbd_negotiate() is already marked coroutine_fn.  And given the fix in
the previous patch to have nbd_negotiate_handle_starttls not create
and wait on a g_main_loop (as that would violate coroutine
constraints), it is worth marking the rest of the related static
functions reachable only during option negotiation as also being
coroutine_fn.

Suggested-by: Vladimir Sementsov-Ogievskiy 
Signed-off-by: Eric Blake 
Message-ID: <20240408160214.1200629-6-ebl...@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy 
[eblake: drop one spurious coroutine_fn marking]
Signed-off-by: Eric Blake 


  Commit: 77bcaf5f222fb19667738dc2ca7dec6172d69db7
  
https://github.com/qemu/qemu/commit/77bcaf5f222fb19667738dc2ca7dec6172d69db7
  Author: Richard Henderson 
  Date:   2024-04-26 (Fri, 26 Apr 2024)

  Changed paths:
M nbd/client.c
M nbd/common.c
M nbd/nbd-internal.h
M nbd/server.c

  Log Message:
  ---
  Merge tag 'pull-nbd-2024-04-25' of https://repo.or.cz/qemu/ericb into staging

NBD patches for 2024-04-25

- Avoid calling poll() within coroutine

# -BEGIN PGP SIGNATURE-
#
# iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAmYqzkMACgkQp6FrSiUn
# Q2ol3wf9HbwiYkyHhqybb4ykEs75N8B2JPbOj6gYRSBn7rz90k1vElDCM2yQhlDN
# Ltuh8lTOaJb+Z4n2dKIF2m5hL2GTm/xtErIIpP7o6A+11mHW9ag/VLaAMdWJxmUr
# WEUIH6mVtuRcxTTCp01l/JAYpUxOoQs1fyQljONH5kg1MAZpTTD61/cuhrXlvPLU
# cVlrLfob90oYhydCq5o6ucW3GhaEYkaZzHIWFy7LphFySebMmnbnPhYf/JD6RZPL
# s5K7njMK1DOyguCLlOzSuRM4gIbYunnr0Ofr/orTlAUZvbhRGKUlH0RTMWVMzgek
# xArnEZYlsqF2wIvrz0GwMDL7BMmG7A==
# =vXJj
# -END PGP SIGNATURE-
# gpg: Signature made Thu 25 Apr 2024 02:42:27 PM PDT
# gpg:using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake " [full]
# gpg: aka "Eric Blake (Free Software Programmer) 
" [full]
# gpg: aka "[jpeg image of size 6874]" [full]

* tag 'pull-nbd-2024-04-25' of https://repo.or.cz/qemu/ericb:
  nbd/server: Mark negotiation functions as coroutine_fn
  nbd/server: do not poll within a coroutine context

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/a118c4aff408...77bcaf5f222f

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



[Qemu-commits] [qemu/qemu] 443df4: qom: add default value

2024-04-25 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 443df40cad0f5de602ac6f6ca1559e0923e180b3
  
https://github.com/qemu/qemu/commit/443df40cad0f5de602ac6f6ca1559e0923e180b3
  Author: Maksim Davydov 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M qom/qom-qmp-cmds.c

  Log Message:
  ---
  qom: add default value

qmp_qom_list_properties can print default values if they are available
as qmp_device_list_properties does, because both of them use the
ObjectPropertyInfo structure with default_value field. This can be useful
when working with "not device" types (e.g. memory-backend).

Signed-off-by: Maksim Davydov 
Reviewed-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Markus Armbruster 
Message-ID: <20240318213550.155573-2-davydov-...@yandex-team.ru>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 236e9397b320518372a67c55777193c032b93d89
  
https://github.com/qemu/qemu/commit/236e9397b320518372a67c55777193c032b93d89
  Author: Maksim Davydov 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M hw/core/machine-qmp-cmds.c
M qapi/machine.json
M tests/qtest/fuzz/qos_fuzz.c

  Log Message:
  ---
  qmp: add dump machine type compatibility properties

To control that creating new machine type doesn't affect the previous
types (their compat_props) and to check complex compat_props inheritance
we need qmp command to print machine type compatibility properties.
This patch adds the ability to get list of all the compat_props of the
corresponding supported machines for their comparison via new optional
argument of "query-machines" command. Since information on compatibility
properties can increase the command output by a factor of 40, add an
argument to enable it, default off.

Signed-off-by: Maksim Davydov 
Reviewed-by: Vladimir Sementsov-Ogievskiy 
Acked-by: Markus Armbruster 
Message-ID: <20240318213550.155573-3-davydov-...@yandex-team.ru>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 33956e476802a6ae9b9a8e047f6a78e09e9ae180
  
https://github.com/qemu/qemu/commit/33956e476802a6ae9b9a8e047f6a78e09e9ae180
  Author: Maksim Davydov 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M python/qemu/machine/machine.py

  Log Message:
  ---
  python/qemu/machine: add method to retrieve QEMUMachine::binary field

Add a supportive property to access the path to the QEMU binary

Signed-off-by: Maksim Davydov 
Reviewed-by: John Snow 
Reviewed-by: Philippe Mathieu-Daudé 
Message-ID: <20240318213550.155573-4-davydov-...@yandex-team.ru>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: b928505d39b634cdd3ba27b94561e6aadcd677af
  
https://github.com/qemu/qemu/commit/b928505d39b634cdd3ba27b94561e6aadcd677af
  Author: Maksim Davydov 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M MAINTAINERS
A scripts/compare-machine-types.py

  Log Message:
  ---
  scripts: add script to compare compatibility properties

This script runs QEMU to obtain compat_props of machines and default
values of different types of drivers to produce comparison table. This
table can be used to compare machine types to choose the most suitable
machine or compare binaries to be sure that migration to the newer version
will save all device properties. Also the json or csv format of this
table can be used to check does a new machine affect the previous ones by
comparing tables with and without the new machine.

Default values (that will be used without machine compat_props) of
properties are needed to fill "holes" in the table (one machine has
the property but another machine not. For instance, 2.12 machine has
`{ "EPYC-" TYPE_X86_CPU, "xlevel", "0x800a" }`, but compat_pros of
3.1 machine doesn't have it. Thus, to compare these machines we need to
get unknown value of "EPYC-x86_64-cpu-xlevel" for 3.1 machine. These
unknown values in the table are called "holes". To get values for these
"holes" the script uses list of appropriate methods.)

Notes:
* Some init values from the devices can't be available like properties
  from virtio-9p when configure has --disable-virtfs. This situations will
  be seen in the table as "unavailable driver".
* Default values can be obtained in an unobvious way, like x86 features.
  If the script doesn't know how to get property default value to compare
  one machine with another it fills "holes" with "unavailable method". This
  is done because script uses whitelist model to get default values of
  different types. It means that the method that can't be applied to a new
  type that can crash this script. It is better to get an "unavailable
  driver" when creating a new machine with new compatible properties than
  to break this script. So it turns out a more stable and generic script.
* If the default value can't be obtained because this property doesn't
  exist or because this property can't have default value, appropriate
  "hole" will be filled by 

[Qemu-commits] [qemu/qemu] 443df4: qom: add default value

2024-04-25 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 443df40cad0f5de602ac6f6ca1559e0923e180b3
  
https://github.com/qemu/qemu/commit/443df40cad0f5de602ac6f6ca1559e0923e180b3
  Author: Maksim Davydov 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M qom/qom-qmp-cmds.c

  Log Message:
  ---
  qom: add default value

qmp_qom_list_properties can print default values if they are available
as qmp_device_list_properties does, because both of them use the
ObjectPropertyInfo structure with default_value field. This can be useful
when working with "not device" types (e.g. memory-backend).

Signed-off-by: Maksim Davydov 
Reviewed-by: Vladimir Sementsov-Ogievskiy 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Markus Armbruster 
Message-ID: <20240318213550.155573-2-davydov-...@yandex-team.ru>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 236e9397b320518372a67c55777193c032b93d89
  
https://github.com/qemu/qemu/commit/236e9397b320518372a67c55777193c032b93d89
  Author: Maksim Davydov 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M hw/core/machine-qmp-cmds.c
M qapi/machine.json
M tests/qtest/fuzz/qos_fuzz.c

  Log Message:
  ---
  qmp: add dump machine type compatibility properties

To control that creating new machine type doesn't affect the previous
types (their compat_props) and to check complex compat_props inheritance
we need qmp command to print machine type compatibility properties.
This patch adds the ability to get list of all the compat_props of the
corresponding supported machines for their comparison via new optional
argument of "query-machines" command. Since information on compatibility
properties can increase the command output by a factor of 40, add an
argument to enable it, default off.

Signed-off-by: Maksim Davydov 
Reviewed-by: Vladimir Sementsov-Ogievskiy 
Acked-by: Markus Armbruster 
Message-ID: <20240318213550.155573-3-davydov-...@yandex-team.ru>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 33956e476802a6ae9b9a8e047f6a78e09e9ae180
  
https://github.com/qemu/qemu/commit/33956e476802a6ae9b9a8e047f6a78e09e9ae180
  Author: Maksim Davydov 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M python/qemu/machine/machine.py

  Log Message:
  ---
  python/qemu/machine: add method to retrieve QEMUMachine::binary field

Add a supportive property to access the path to the QEMU binary

Signed-off-by: Maksim Davydov 
Reviewed-by: John Snow 
Reviewed-by: Philippe Mathieu-Daudé 
Message-ID: <20240318213550.155573-4-davydov-...@yandex-team.ru>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: b928505d39b634cdd3ba27b94561e6aadcd677af
  
https://github.com/qemu/qemu/commit/b928505d39b634cdd3ba27b94561e6aadcd677af
  Author: Maksim Davydov 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M MAINTAINERS
A scripts/compare-machine-types.py

  Log Message:
  ---
  scripts: add script to compare compatibility properties

This script runs QEMU to obtain compat_props of machines and default
values of different types of drivers to produce comparison table. This
table can be used to compare machine types to choose the most suitable
machine or compare binaries to be sure that migration to the newer version
will save all device properties. Also the json or csv format of this
table can be used to check does a new machine affect the previous ones by
comparing tables with and without the new machine.

Default values (that will be used without machine compat_props) of
properties are needed to fill "holes" in the table (one machine has
the property but another machine not. For instance, 2.12 machine has
`{ "EPYC-" TYPE_X86_CPU, "xlevel", "0x800a" }`, but compat_pros of
3.1 machine doesn't have it. Thus, to compare these machines we need to
get unknown value of "EPYC-x86_64-cpu-xlevel" for 3.1 machine. These
unknown values in the table are called "holes". To get values for these
"holes" the script uses list of appropriate methods.)

Notes:
* Some init values from the devices can't be available like properties
  from virtio-9p when configure has --disable-virtfs. This situations will
  be seen in the table as "unavailable driver".
* Default values can be obtained in an unobvious way, like x86 features.
  If the script doesn't know how to get property default value to compare
  one machine with another it fills "holes" with "unavailable method". This
  is done because script uses whitelist model to get default values of
  different types. It means that the method that can't be applied to a new
  type that can crash this script. It is better to get an "unavailable
  driver" when creating a new machine with new compatible properties than
  to break this script. So it turns out a more stable and generic script.
* If the default value can't be obtained because this property doesn't
  exist or because this property can't have default value, appropriate
  "hole" will be filled by 

[Qemu-commits] [qemu/qemu] cbd58e: MAINTAINERS: update email of Peter Lieven

2024-04-25 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: cbd58e7cc26cef811bd947f48345ec930481e4e2
  
https://github.com/qemu/qemu/commit/cbd58e7cc26cef811bd947f48345ec930481e4e2
  Author: Peter Lieven 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M MAINTAINERS

  Log Message:
  ---
  MAINTAINERS: update email of Peter Lieven

I will leave KAMP in the next days. Update email to stay reachable.

Signed-off-by: Peter Lieven 
Message-ID: <20230105095039.182718-1...@kamp.de>
Signed-off-by: Thomas Huth 


  Commit: 58045186fccaf400d3938fad220a99b1b5f3da6d
  
https://github.com/qemu/qemu/commit/58045186fccaf400d3938fad220a99b1b5f3da6d
  Author: Inès Varhol 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M tests/qtest/aspeed_fsi-test.c
M tests/qtest/cmsdk-apb-dualtimer-test.c
M tests/qtest/cmsdk-apb-watchdog-test.c
M tests/qtest/erst-test.c
M tests/qtest/ivshmem-test.c
M tests/qtest/libqos/ahci.c
M tests/qtest/microbit-test.c
M tests/qtest/sse-timer-test.c
M tests/qtest/stm32l4x5_exti-test.c
M tests/qtest/stm32l4x5_syscfg-test.c

  Log Message:
  ---
  tests/qtest : Use `g_assert_cmphex` instead of `g_assert_cmpuint`

The messages for assertions using hexadecimal numbers will be
easier to understand with `g_assert_cmphex`.

Cases changed : "cmpuint.*0x", "cmpuint.*<<"

Signed-off-by: Inès Varhol 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Ninad Palsule 
Message-ID: <20240414173349.31194-1-ines.var...@telecom-paris.fr>
Signed-off-by: Thomas Huth 


  Commit: 838f82468a1282f7e89dbbd6c015c8742bfdafce
  
https://github.com/qemu/qemu/commit/838f82468a1282f7e89dbbd6c015c8742bfdafce
  Author: Zhao Liu 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M docs/system/target-i386-desc.rst.inc

  Log Message:
  ---
  docs: i386: pc: Update maximum CPU numbers for PC Q35

Commit e4e98c7eebfa ("pc: q35: Bump max_cpus to 4096 vcpus") increases
the supported CPUs for PC Q35 machine.

Update maximum CPU numbers for PC Q35 in the document.

Signed-off-by: Zhao Liu 
Message-ID: <20240412085358.731560-1-zhao1@linux.intel.com>
Signed-off-by: Thomas Huth 


  Commit: 5e279f38c7eabfcb9c3ab0bac8ae04316c3d7814
  
https://github.com/qemu/qemu/commit/5e279f38c7eabfcb9c3ab0bac8ae04316c3d7814
  Author: Brad Smith 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M tests/vm/openbsd

  Log Message:
  ---
  tests/vm: update openbsd image to 7.5

tests/vm: update openbsd to release 7.5

Signed-off-by: Brad Smith 
Message-ID: 
Signed-off-by: Thomas Huth 


  Commit: 6705587adbf11dacb9722e7c4091936439ae5dad
  
https://github.com/qemu/qemu/commit/6705587adbf11dacb9722e7c4091936439ae5dad
  Author: Thomas Huth 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  Revert ".travis.yml: Cache Avocado cache"

This reverts commit c1073e44b46490133e16420e1784dec7bcd4e030.

The Avocado tests have been removed from Travis a long time ago with
commit c5008c76ee ("gitlab: add acceptance testing to system builds"),
so we don't need to cache the avocado files here anymore.

Message-ID: <20240320104144.823425-4-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: aeb99d0772477c6c94e7def85526ee88fbe6135b
  
https://github.com/qemu/qemu/commit/aeb99d0772477c6c94e7def85526ee88fbe6135b
  Author: Thomas Huth 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  .travis.yml: Remove the unused UNRELIABLE environment variable

This variable was used to allow jobs to fail without spoiling the
overall result. But the required "allow_failures:" hunk has been
accidentally removed in commit 9d03f5abed ("travis.yml: Remove the
"Release tarball" job"), and it was anyway only useful while we
still had the x86 jobs here around that were our main CI jobs.
Thus let's simply remove this useless variable now.

Message-ID: <20240320104144.823425-6-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: 66163bc7d79f40fb323d405559f19edb0f92f72b
  
https://github.com/qemu/qemu/commit/66163bc7d79f40fb323d405559f19edb0f92f72b
  Author: Thomas Huth 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  .travis.yml: Update the jobs to Ubuntu 22.04

According to our support policy, we'll soon drop our official support
for Ubuntu 20.04 ("Focal Fossa") in QEMU. Thus we should update the
Travis jobs now to a newer release (Ubuntu 22.04 - "Jammy Jellyfish")
for future testing. Since all jobs are using this release now, we
can drop the entries from the individual jobs and use the global
setting again.

Reviewed-by: Daniel P. Berrangé 
Message-ID: <20240418101056.302103-6-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: 4d6ae2df56b7ef7a479a1656872a95e0ed23f2d9
  

[Qemu-commits] [qemu/qemu] cbd58e: MAINTAINERS: update email of Peter Lieven

2024-04-25 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: cbd58e7cc26cef811bd947f48345ec930481e4e2
  
https://github.com/qemu/qemu/commit/cbd58e7cc26cef811bd947f48345ec930481e4e2
  Author: Peter Lieven 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M MAINTAINERS

  Log Message:
  ---
  MAINTAINERS: update email of Peter Lieven

I will leave KAMP in the next days. Update email to stay reachable.

Signed-off-by: Peter Lieven 
Message-ID: <20230105095039.182718-1...@kamp.de>
Signed-off-by: Thomas Huth 


  Commit: 58045186fccaf400d3938fad220a99b1b5f3da6d
  
https://github.com/qemu/qemu/commit/58045186fccaf400d3938fad220a99b1b5f3da6d
  Author: Inès Varhol 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M tests/qtest/aspeed_fsi-test.c
M tests/qtest/cmsdk-apb-dualtimer-test.c
M tests/qtest/cmsdk-apb-watchdog-test.c
M tests/qtest/erst-test.c
M tests/qtest/ivshmem-test.c
M tests/qtest/libqos/ahci.c
M tests/qtest/microbit-test.c
M tests/qtest/sse-timer-test.c
M tests/qtest/stm32l4x5_exti-test.c
M tests/qtest/stm32l4x5_syscfg-test.c

  Log Message:
  ---
  tests/qtest : Use `g_assert_cmphex` instead of `g_assert_cmpuint`

The messages for assertions using hexadecimal numbers will be
easier to understand with `g_assert_cmphex`.

Cases changed : "cmpuint.*0x", "cmpuint.*<<"

Signed-off-by: Inès Varhol 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Ninad Palsule 
Message-ID: <20240414173349.31194-1-ines.var...@telecom-paris.fr>
Signed-off-by: Thomas Huth 


  Commit: 838f82468a1282f7e89dbbd6c015c8742bfdafce
  
https://github.com/qemu/qemu/commit/838f82468a1282f7e89dbbd6c015c8742bfdafce
  Author: Zhao Liu 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M docs/system/target-i386-desc.rst.inc

  Log Message:
  ---
  docs: i386: pc: Update maximum CPU numbers for PC Q35

Commit e4e98c7eebfa ("pc: q35: Bump max_cpus to 4096 vcpus") increases
the supported CPUs for PC Q35 machine.

Update maximum CPU numbers for PC Q35 in the document.

Signed-off-by: Zhao Liu 
Message-ID: <20240412085358.731560-1-zhao1@linux.intel.com>
Signed-off-by: Thomas Huth 


  Commit: 5e279f38c7eabfcb9c3ab0bac8ae04316c3d7814
  
https://github.com/qemu/qemu/commit/5e279f38c7eabfcb9c3ab0bac8ae04316c3d7814
  Author: Brad Smith 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M tests/vm/openbsd

  Log Message:
  ---
  tests/vm: update openbsd image to 7.5

tests/vm: update openbsd to release 7.5

Signed-off-by: Brad Smith 
Message-ID: 
Signed-off-by: Thomas Huth 


  Commit: 6705587adbf11dacb9722e7c4091936439ae5dad
  
https://github.com/qemu/qemu/commit/6705587adbf11dacb9722e7c4091936439ae5dad
  Author: Thomas Huth 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  Revert ".travis.yml: Cache Avocado cache"

This reverts commit c1073e44b46490133e16420e1784dec7bcd4e030.

The Avocado tests have been removed from Travis a long time ago with
commit c5008c76ee ("gitlab: add acceptance testing to system builds"),
so we don't need to cache the avocado files here anymore.

Message-ID: <20240320104144.823425-4-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: aeb99d0772477c6c94e7def85526ee88fbe6135b
  
https://github.com/qemu/qemu/commit/aeb99d0772477c6c94e7def85526ee88fbe6135b
  Author: Thomas Huth 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  .travis.yml: Remove the unused UNRELIABLE environment variable

This variable was used to allow jobs to fail without spoiling the
overall result. But the required "allow_failures:" hunk has been
accidentally removed in commit 9d03f5abed ("travis.yml: Remove the
"Release tarball" job"), and it was anyway only useful while we
still had the x86 jobs here around that were our main CI jobs.
Thus let's simply remove this useless variable now.

Message-ID: <20240320104144.823425-6-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: 66163bc7d79f40fb323d405559f19edb0f92f72b
  
https://github.com/qemu/qemu/commit/66163bc7d79f40fb323d405559f19edb0f92f72b
  Author: Thomas Huth 
  Date:   2024-04-25 (Thu, 25 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  .travis.yml: Update the jobs to Ubuntu 22.04

According to our support policy, we'll soon drop our official support
for Ubuntu 20.04 ("Focal Fossa") in QEMU. Thus we should update the
Travis jobs now to a newer release (Ubuntu 22.04 - "Jammy Jellyfish")
for future testing. Since all jobs are using this release now, we
can drop the entries from the individual jobs and use the global
setting again.

Reviewed-by: Daniel P. Berrangé 
Message-ID: <20240418101056.302103-6-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: 4d6ae2df56b7ef7a479a1656872a95e0ed23f2d9
  

[Qemu-commits] [qemu/qemu] 1f2355: meson: Make DEBUG_REMAP a meson option

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1f2355f53c752297789d431575c4ba975219599c
  
https://github.com/qemu/qemu/commit/1f2355f53c752297789d431575c4ba975219599c
  Author: Ilya Leoshkevich 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M bsd-user/qemu.h
M linux-user/qemu.h
M linux-user/uaccess.c
M meson.build
M meson_options.txt
M scripts/meson-buildoptions.sh

  Log Message:
  ---
  meson: Make DEBUG_REMAP a meson option

Currently DEBUG_REMAP is a macro that needs to be manually #defined to
be activated, which makes it hard to have separate build directories
dedicated to testing the code with it. Promote it to a meson option.

Signed-off-by: Ilya Leoshkevich 
Message-Id: <20240312002402.14344-1-...@linux.ibm.com>
Signed-off-by: Richard Henderson 


  Commit: 04f6fb897a5aeb3e356a7b889869c9962f9c16c7
  
https://github.com/qemu/qemu/commit/04f6fb897a5aeb3e356a7b889869c9962f9c16c7
  Author: Michael Tokarev 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY

This setsockopt accepts zero-lengh optlen (current qemu implementation
does not allow this).  Also, there's no need to make a copy of the key,
it is enough to use lock_user() (which accepts zero length already).

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2197
Fixes: f312fc "linux-user: Add support for setsockopt() option SOL_ALG"
Signed-off-by: Michael Tokarev 
Message-Id: <20240331100737.2724186-2-...@tls.msk.ru>
Signed-off-by: Richard Henderson 


  Commit: 124a1341a66287ab8f4ce3de3c98eed6747a639f
  
https://github.com/qemu/qemu/commit/124a1341a66287ab8f4ce3de3c98eed6747a639f
  Author: Michael Tokarev 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: make ip_mreq local to the place it is used and 
inline target_to_host_ip_mreq()

ip_mreq is declared at the beginning of do_setsockopt(), while
it is used in only one place.  Move its declaration to that very
place and replace pointer to alloca()-allocated memory with the
structure itself.

target_to_host_ip_mreq() is used only once, inline it.

This change also properly handles TARGET_EFAULT when the address
is wrong.

Signed-off-by: Michael Tokarev 
Message-Id: <20240331100737.2724186-3-...@tls.msk.ru>
[rth: Fix braces, adjust optlen to match host structure size]
Signed-off-by: Richard Henderson 


  Commit: 166bd92e3b4dfcd058013453e4dd94ebe5e87819
  
https://github.com/qemu/qemu/commit/166bd92e3b4dfcd058013453e4dd94ebe5e87819
  Author: Michael Tokarev 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: make ip_mreq_source local to the place where it is 
used

Signed-off-by: Michael Tokarev 
Message-Id: <20240331100737.2724186-4-...@tls.msk.ru>
Signed-off-by: Richard Henderson 


  Commit: 88a722b6ad59bf6ca42c01ac806c54bd94d98642
  
https://github.com/qemu/qemu/commit/88a722b6ad59bf6ca42c01ac806c54bd94d98642
  Author: Michael Tokarev 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: eliminate goto in switch for SO_SNDTIMEO

There's identical code for SO_SNDTIMEO and SO_RCVTIMEO, currently
implemented using an ugly goto into another switch case.  Eliminate
that using arithmetic if, making code flow more natural.

Signed-off-by: Michael Tokarev 
Message-Id: <20240331100737.2724186-5-...@tls.msk.ru>
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 7048fc59ef6a9f76693db3bafede6234a3897385
  
https://github.com/qemu/qemu/commit/7048fc59ef6a9f76693db3bafede6234a3897385
  Author: Michael Vogt 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/ioctls.h
M linux-user/syscall_defs.h
M linux-user/syscall_types.h

  Log Message:
  ---
  linux-user: Add FITRIM ioctl

Tiny patch to add the missing FITRIM ioctl.

Signed-off-by: Michael Vogt 
Message-Id: <20240403092048.16023-2-michael.v...@gmail.com>
Signed-off-by: Richard Henderson 


  Commit: 5fae5110eedba1110605c88d96cd4a5f057bfca2
  
https://github.com/qemu/qemu/commit/5fae5110eedba1110605c88d96cd4a5f057bfca2
  Author: Keith Packard 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M target/m68k/m68k-semi.c

  Log Message:
  ---
  target/m68k: Pass semihosting arg to exit

Instead of using d0 (the semihost function number), use d1 (the
provide exit status).

Signed-off-by: Keith Packard 
Reviewed-by: Peter Maydell 
Message-Id: <20230802161914.395443-2-kei...@keithp.com>
Signed-off-by: Richard Henderson 


  Commit: f161e723fdfddfc820c7f19eb6ac76ac6ba6d2a8
  
https://github.com/qemu/qemu/commit/f161e723fdfddfc820c7f19eb6ac76ac6ba6d2a8
  Author: 

[Qemu-commits] [qemu/qemu] 1f2355: meson: Make DEBUG_REMAP a meson option

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 1f2355f53c752297789d431575c4ba975219599c
  
https://github.com/qemu/qemu/commit/1f2355f53c752297789d431575c4ba975219599c
  Author: Ilya Leoshkevich 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M bsd-user/qemu.h
M linux-user/qemu.h
M linux-user/uaccess.c
M meson.build
M meson_options.txt
M scripts/meson-buildoptions.sh

  Log Message:
  ---
  meson: Make DEBUG_REMAP a meson option

Currently DEBUG_REMAP is a macro that needs to be manually #defined to
be activated, which makes it hard to have separate build directories
dedicated to testing the code with it. Promote it to a meson option.

Signed-off-by: Ilya Leoshkevich 
Message-Id: <20240312002402.14344-1-...@linux.ibm.com>
Signed-off-by: Richard Henderson 


  Commit: 04f6fb897a5aeb3e356a7b889869c9962f9c16c7
  
https://github.com/qemu/qemu/commit/04f6fb897a5aeb3e356a7b889869c9962f9c16c7
  Author: Michael Tokarev 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY

This setsockopt accepts zero-lengh optlen (current qemu implementation
does not allow this).  Also, there's no need to make a copy of the key,
it is enough to use lock_user() (which accepts zero length already).

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2197
Fixes: f312fc "linux-user: Add support for setsockopt() option SOL_ALG"
Signed-off-by: Michael Tokarev 
Message-Id: <20240331100737.2724186-2-...@tls.msk.ru>
Signed-off-by: Richard Henderson 


  Commit: 124a1341a66287ab8f4ce3de3c98eed6747a639f
  
https://github.com/qemu/qemu/commit/124a1341a66287ab8f4ce3de3c98eed6747a639f
  Author: Michael Tokarev 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: make ip_mreq local to the place it is used and 
inline target_to_host_ip_mreq()

ip_mreq is declared at the beginning of do_setsockopt(), while
it is used in only one place.  Move its declaration to that very
place and replace pointer to alloca()-allocated memory with the
structure itself.

target_to_host_ip_mreq() is used only once, inline it.

This change also properly handles TARGET_EFAULT when the address
is wrong.

Signed-off-by: Michael Tokarev 
Message-Id: <20240331100737.2724186-3-...@tls.msk.ru>
[rth: Fix braces, adjust optlen to match host structure size]
Signed-off-by: Richard Henderson 


  Commit: 166bd92e3b4dfcd058013453e4dd94ebe5e87819
  
https://github.com/qemu/qemu/commit/166bd92e3b4dfcd058013453e4dd94ebe5e87819
  Author: Michael Tokarev 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: make ip_mreq_source local to the place where it is 
used

Signed-off-by: Michael Tokarev 
Message-Id: <20240331100737.2724186-4-...@tls.msk.ru>
Signed-off-by: Richard Henderson 


  Commit: 88a722b6ad59bf6ca42c01ac806c54bd94d98642
  
https://github.com/qemu/qemu/commit/88a722b6ad59bf6ca42c01ac806c54bd94d98642
  Author: Michael Tokarev 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: do_setsockopt: eliminate goto in switch for SO_SNDTIMEO

There's identical code for SO_SNDTIMEO and SO_RCVTIMEO, currently
implemented using an ugly goto into another switch case.  Eliminate
that using arithmetic if, making code flow more natural.

Signed-off-by: Michael Tokarev 
Message-Id: <20240331100737.2724186-5-...@tls.msk.ru>
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 7048fc59ef6a9f76693db3bafede6234a3897385
  
https://github.com/qemu/qemu/commit/7048fc59ef6a9f76693db3bafede6234a3897385
  Author: Michael Vogt 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M linux-user/ioctls.h
M linux-user/syscall_defs.h
M linux-user/syscall_types.h

  Log Message:
  ---
  linux-user: Add FITRIM ioctl

Tiny patch to add the missing FITRIM ioctl.

Signed-off-by: Michael Vogt 
Message-Id: <20240403092048.16023-2-michael.v...@gmail.com>
Signed-off-by: Richard Henderson 


  Commit: 5fae5110eedba1110605c88d96cd4a5f057bfca2
  
https://github.com/qemu/qemu/commit/5fae5110eedba1110605c88d96cd4a5f057bfca2
  Author: Keith Packard 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M target/m68k/m68k-semi.c

  Log Message:
  ---
  target/m68k: Pass semihosting arg to exit

Instead of using d0 (the semihost function number), use d1 (the
provide exit status).

Signed-off-by: Keith Packard 
Reviewed-by: Peter Maydell 
Message-Id: <20230802161914.395443-2-kei...@keithp.com>
Signed-off-by: Richard Henderson 


  Commit: f161e723fdfddfc820c7f19eb6ac76ac6ba6d2a8
  
https://github.com/qemu/qemu/commit/f161e723fdfddfc820c7f19eb6ac76ac6ba6d2a8
  Author: 

[Qemu-commits] [qemu/qemu] 92360d: MAINTAINERS: Update Sriram Yagnaraman mail address

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 92360d6e624404492afe5d32ca669a33df181742
  
https://github.com/qemu/qemu/commit/92360d6e624404492afe5d32ca669a33df181742
  Author: Sriram Yagnaraman 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M .mailmap
M MAINTAINERS

  Log Message:
  ---
  MAINTAINERS: Update Sriram Yagnaraman mail address

Due to company policies, I have changed my mail address. Updating
MAINTAINERS and .mailmap to show my latest mail address.

Signed-off-by: Sriram Yagnaraman 
Message-ID: <20240228080625.2412372-1-sriram.yagnara...@ericsson.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 6c3014858c4c0024dd0560f08a6eda0f92f658d6
  
https://github.com/qemu/qemu/commit/6c3014858c4c0024dd0560f08a6eda0f92f658d6
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M .gitlab-ci.d/buildtest.yml
M .gitlab-ci.d/crossbuild-template.yml
M .gitlab-ci.d/crossbuilds.yml
M MAINTAINERS
R configs/devices/nios2-softmmu/default.mak
R configs/targets/nios2-linux-user.mak
R configs/targets/nios2-softmmu.mak
M configure
M disas/meson.build
R disas/nios2.c
M docs/about/deprecated.rst
M docs/about/emulation.rst
M docs/about/removed-features.rst
M docs/system/replay.rst
M docs/user/main.rst
M fpu/softfloat-specialize.c.inc
M hw/Kconfig
M hw/intc/Kconfig
M hw/intc/meson.build
R hw/intc/nios2_vic.c
M hw/meson.build
R hw/nios2/10m50_devboard.c
R hw/nios2/Kconfig
R hw/nios2/boot.c
R hw/nios2/boot.h
R hw/nios2/generic_nommu.c
R hw/nios2/meson.build
M include/disas/dis-asm.h
M include/exec/poison.h
M include/exec/user/abitypes.h
R include/hw/intc/nios2_vic.h
M include/sysemu/arch_init.h
M linux-user/elfload.c
R linux-user/nios2/cpu_loop.c
R linux-user/nios2/signal.c
R linux-user/nios2/sockbits.h
R linux-user/nios2/syscall_nr.h
R linux-user/nios2/target_cpu.h
R linux-user/nios2/target_elf.h
R linux-user/nios2/target_errno_defs.h
R linux-user/nios2/target_fcntl.h
R linux-user/nios2/target_mman.h
R linux-user/nios2/target_prctl.h
R linux-user/nios2/target_proc.h
R linux-user/nios2/target_resource.h
R linux-user/nios2/target_signal.h
R linux-user/nios2/target_structs.h
R linux-user/nios2/target_syscall.h
R linux-user/nios2/termbits.h
M linux-user/syscall_defs.h
M meson.build
M qapi/machine.json
M qemu-options.hx
M scripts/coverity-scan/COMPONENTS.md
M scripts/gensyscalls.sh
M scripts/probe-gdb-support.py
M target/Kconfig
M target/meson.build
R target/nios2/Kconfig
R target/nios2/cpu-param.h
R target/nios2/cpu-qom.h
R target/nios2/cpu.c
R target/nios2/cpu.h
R target/nios2/helper.c
R target/nios2/helper.h
R target/nios2/meson.build
R target/nios2/mmu.c
R target/nios2/mmu.h
R target/nios2/monitor.c
R target/nios2/nios2-semi.c
R target/nios2/op_helper.c
R target/nios2/trace-events
R target/nios2/translate.c
M tests/avocado/boot_linux_console.py
M tests/avocado/replay_kernel.py
M tests/docker/Makefile.include
R tests/docker/dockerfiles/debian-nios2-cross.d/build-toolchain.sh
M tests/qtest/machine-none-test.c
R tests/tcg/nios2/10m50-ghrd.ld
R tests/tcg/nios2/Makefile.softmmu-target
R tests/tcg/nios2/Makefile.target
R tests/tcg/nios2/boot.S
R tests/tcg/nios2/intr.S
R tests/tcg/nios2/semicall.h
R tests/tcg/nios2/test-shadow-1.S

  Log Message:
  ---
  target/nios2: Remove the deprecated Nios II target

The Nios II target is deprecated since v8.2 in commit 9997771bc1
("target/nios2: Deprecate the Nios II architecture").

Remove:
- Buildsys / CI infra
- User emulation
- System emulation (10m50-ghrd & nios2-generic-nommu machines)
- Tests

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Acked-by: Marek Vasut 
Message-Id: <20240327144806.11319-3-phi...@linaro.org>


  Commit: a60e53fa8fecb3c2449f9be0f4dfc2afe17cf39e
  
https://github.com/qemu/qemu/commit/a60e53fa8fecb3c2449f9be0f4dfc2afe17cf39e
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M hw/timer/Kconfig
R hw/timer/altera_timer.c
M hw/timer/meson.build

  Log Message:
  ---
  hw/timer: Remove the ALTERA_TIMER model

The ALTERA_TIMER was only used by Nios II machines,
which have been removed. Since it has no direct user,
remove it.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240327144806.11319-4-phi...@linaro.org>


  Commit: 1dfd42c4264bbf47415a9e73f0d6b4e6a7cd7393
  
https://github.com/qemu/qemu/commit/1dfd42c4264bbf47415a9e73f0d6b4e6a7cd7393
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M Kconfig.host
M MAINTAINERS
R 

[Qemu-commits] [qemu/qemu] 92360d: MAINTAINERS: Update Sriram Yagnaraman mail address

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 92360d6e624404492afe5d32ca669a33df181742
  
https://github.com/qemu/qemu/commit/92360d6e624404492afe5d32ca669a33df181742
  Author: Sriram Yagnaraman 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M .mailmap
M MAINTAINERS

  Log Message:
  ---
  MAINTAINERS: Update Sriram Yagnaraman mail address

Due to company policies, I have changed my mail address. Updating
MAINTAINERS and .mailmap to show my latest mail address.

Signed-off-by: Sriram Yagnaraman 
Message-ID: <20240228080625.2412372-1-sriram.yagnara...@ericsson.com>
Signed-off-by: Philippe Mathieu-Daudé 


  Commit: 6c3014858c4c0024dd0560f08a6eda0f92f658d6
  
https://github.com/qemu/qemu/commit/6c3014858c4c0024dd0560f08a6eda0f92f658d6
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M .gitlab-ci.d/buildtest.yml
M .gitlab-ci.d/crossbuild-template.yml
M .gitlab-ci.d/crossbuilds.yml
M MAINTAINERS
R configs/devices/nios2-softmmu/default.mak
R configs/targets/nios2-linux-user.mak
R configs/targets/nios2-softmmu.mak
M configure
M disas/meson.build
R disas/nios2.c
M docs/about/deprecated.rst
M docs/about/emulation.rst
M docs/about/removed-features.rst
M docs/system/replay.rst
M docs/user/main.rst
M fpu/softfloat-specialize.c.inc
M hw/Kconfig
M hw/intc/Kconfig
M hw/intc/meson.build
R hw/intc/nios2_vic.c
M hw/meson.build
R hw/nios2/10m50_devboard.c
R hw/nios2/Kconfig
R hw/nios2/boot.c
R hw/nios2/boot.h
R hw/nios2/generic_nommu.c
R hw/nios2/meson.build
M include/disas/dis-asm.h
M include/exec/poison.h
M include/exec/user/abitypes.h
R include/hw/intc/nios2_vic.h
M include/sysemu/arch_init.h
M linux-user/elfload.c
R linux-user/nios2/cpu_loop.c
R linux-user/nios2/signal.c
R linux-user/nios2/sockbits.h
R linux-user/nios2/syscall_nr.h
R linux-user/nios2/target_cpu.h
R linux-user/nios2/target_elf.h
R linux-user/nios2/target_errno_defs.h
R linux-user/nios2/target_fcntl.h
R linux-user/nios2/target_mman.h
R linux-user/nios2/target_prctl.h
R linux-user/nios2/target_proc.h
R linux-user/nios2/target_resource.h
R linux-user/nios2/target_signal.h
R linux-user/nios2/target_structs.h
R linux-user/nios2/target_syscall.h
R linux-user/nios2/termbits.h
M linux-user/syscall_defs.h
M meson.build
M qapi/machine.json
M qemu-options.hx
M scripts/coverity-scan/COMPONENTS.md
M scripts/gensyscalls.sh
M scripts/probe-gdb-support.py
M target/Kconfig
M target/meson.build
R target/nios2/Kconfig
R target/nios2/cpu-param.h
R target/nios2/cpu-qom.h
R target/nios2/cpu.c
R target/nios2/cpu.h
R target/nios2/helper.c
R target/nios2/helper.h
R target/nios2/meson.build
R target/nios2/mmu.c
R target/nios2/mmu.h
R target/nios2/monitor.c
R target/nios2/nios2-semi.c
R target/nios2/op_helper.c
R target/nios2/trace-events
R target/nios2/translate.c
M tests/avocado/boot_linux_console.py
M tests/avocado/replay_kernel.py
M tests/docker/Makefile.include
R tests/docker/dockerfiles/debian-nios2-cross.d/build-toolchain.sh
M tests/qtest/machine-none-test.c
R tests/tcg/nios2/10m50-ghrd.ld
R tests/tcg/nios2/Makefile.softmmu-target
R tests/tcg/nios2/Makefile.target
R tests/tcg/nios2/boot.S
R tests/tcg/nios2/intr.S
R tests/tcg/nios2/semicall.h
R tests/tcg/nios2/test-shadow-1.S

  Log Message:
  ---
  target/nios2: Remove the deprecated Nios II target

The Nios II target is deprecated since v8.2 in commit 9997771bc1
("target/nios2: Deprecate the Nios II architecture").

Remove:
- Buildsys / CI infra
- User emulation
- System emulation (10m50-ghrd & nios2-generic-nommu machines)
- Tests

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Acked-by: Marek Vasut 
Message-Id: <20240327144806.11319-3-phi...@linaro.org>


  Commit: a60e53fa8fecb3c2449f9be0f4dfc2afe17cf39e
  
https://github.com/qemu/qemu/commit/a60e53fa8fecb3c2449f9be0f4dfc2afe17cf39e
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M hw/timer/Kconfig
R hw/timer/altera_timer.c
M hw/timer/meson.build

  Log Message:
  ---
  hw/timer: Remove the ALTERA_TIMER model

The ALTERA_TIMER was only used by Nios II machines,
which have been removed. Since it has no direct user,
remove it.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240327144806.11319-4-phi...@linaro.org>


  Commit: 1dfd42c4264bbf47415a9e73f0d6b4e6a7cd7393
  
https://github.com/qemu/qemu/commit/1dfd42c4264bbf47415a9e73f0d6b4e6a7cd7393
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M Kconfig.host
M MAINTAINERS
R 

[Qemu-commits] [qemu/qemu] 4a1875: error: Drop superfluous #include "qapi/qmp/qerror.h"

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4a18751cf423970221d86853c6909696fae52785
  
https://github.com/qemu/qemu/commit/4a18751cf423970221d86853c6909696fae52785
  Author: Markus Armbruster 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M backends/iommufd.c
M chardev/char-fe.c
M system/rtc.c

  Log Message:
  ---
  error: Drop superfluous #include "qapi/qmp/qerror.h"

Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-2-arm...@redhat.com>


  Commit: 7f65e789abf496480be6a54ba454dd6641b45784
  
https://github.com/qemu/qemu/commit/7f65e789abf496480be6a54ba454dd6641b45784
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M hw/ppc/spapr_pci.c
M include/qapi/qmp/qerror.h
M system/qdev-monitor.c

  Log Message:
  ---
  qapi: Inline and remove QERR_BUS_NO_HOTPLUG definition

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using sed, and manual cleanup.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Cédric Le Goater 
Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-3-arm...@redhat.com>


  Commit: a95921f1712b5f3bb9f905a08984b478b89e0fa5
  
https://github.com/qemu/qemu/commit/a95921f1712b5f3bb9f905a08984b478b89e0fa5
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M block/snapshot.c
M blockdev.c
M include/qapi/qmp/qerror.h

  Log Message:
  ---
  qapi: Inline and remove QERR_DEVICE_HAS_NO_MEDIUM definition

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using sed, and manual cleanup.

Signed-off-by: Philippe Mathieu-Daudé 
Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-4-arm...@redhat.com>


  Commit: f95b25c37e34d575346fb171b2f59c162bbefb38
  
https://github.com/qemu/qemu/commit/f95b25c37e34d575346fb171b2f59c162bbefb38
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M hw/core/qdev.c
M include/qapi/qmp/qerror.h
M system/qdev-monitor.c

  Log Message:
  ---
  qapi: Inline and remove QERR_DEVICE_NO_HOTPLUG definition

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using sed, and manual cleanup.

Signed-off-by: Philippe Mathieu-Daudé 
Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-5-arm...@redhat.com>


  Commit: c6f5d406e1ace1e3d7697e085024a3c7b93d6db5
  
https://github.com/qemu/qemu/commit/c6f5d406e1ace1e3d7697e085024a3c7b93d6db5
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M include/qapi/qmp/qerror.h
M qapi/opts-visitor.c
M util/qemu-option.c

  Log Message:
  ---
  qapi: Inline and remove QERR_INVALID_PARAMETER definition

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using:

  $ sed -i -e "s/QERR_INVALID_PARAMETER,/\"Invalid parameter '%s'\",/" \
$(git grep -lw QERR_INVALID_PARAMETER)

Manually simplify qemu_opts_create(), and remove the macro definition
in include/qapi/qmp/qerror.h.

Signed-off-by: Philippe Mathieu-Daudé 
Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-6-arm...@redhat.com>


  Commit: aaeafa5090c8d006d7c39b4e11bcfb8515ef1ece
  
https://github.com/qemu/qemu/commit/aaeafa5090c8d006d7c39b4e11bcfb8515ef1ece
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M qapi/qobject-input-visitor.c
M qapi/string-input-visitor.c
M qom/object.c

  Log Message:
  ---
  qapi: Inline QERR_INVALID_PARAMETER_TYPE definition (constant value)

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using the following
coccinelle semantic patch:

@match@
expression errp;
expression param;
constant value;
@@
 error_setg(errp, QERR_INVALID_PARAMETER_TYPE, param, value);

@script:python strformat depends on match@
value << match.value;
fixedfmt; // new var
@@
fixedfmt = f'"Invalid parameter type for \'%s\', expected: {value[1:-1]}"'
coccinelle.fixedfmt = 

[Qemu-commits] [qemu/qemu] 4a1875: error: Drop superfluous #include "qapi/qmp/qerror.h"

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 4a18751cf423970221d86853c6909696fae52785
  
https://github.com/qemu/qemu/commit/4a18751cf423970221d86853c6909696fae52785
  Author: Markus Armbruster 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M backends/iommufd.c
M chardev/char-fe.c
M system/rtc.c

  Log Message:
  ---
  error: Drop superfluous #include "qapi/qmp/qerror.h"

Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-2-arm...@redhat.com>


  Commit: 7f65e789abf496480be6a54ba454dd6641b45784
  
https://github.com/qemu/qemu/commit/7f65e789abf496480be6a54ba454dd6641b45784
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M hw/ppc/spapr_pci.c
M include/qapi/qmp/qerror.h
M system/qdev-monitor.c

  Log Message:
  ---
  qapi: Inline and remove QERR_BUS_NO_HOTPLUG definition

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using sed, and manual cleanup.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Cédric Le Goater 
Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-3-arm...@redhat.com>


  Commit: a95921f1712b5f3bb9f905a08984b478b89e0fa5
  
https://github.com/qemu/qemu/commit/a95921f1712b5f3bb9f905a08984b478b89e0fa5
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M block/snapshot.c
M blockdev.c
M include/qapi/qmp/qerror.h

  Log Message:
  ---
  qapi: Inline and remove QERR_DEVICE_HAS_NO_MEDIUM definition

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using sed, and manual cleanup.

Signed-off-by: Philippe Mathieu-Daudé 
Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-4-arm...@redhat.com>


  Commit: f95b25c37e34d575346fb171b2f59c162bbefb38
  
https://github.com/qemu/qemu/commit/f95b25c37e34d575346fb171b2f59c162bbefb38
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M hw/core/qdev.c
M include/qapi/qmp/qerror.h
M system/qdev-monitor.c

  Log Message:
  ---
  qapi: Inline and remove QERR_DEVICE_NO_HOTPLUG definition

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using sed, and manual cleanup.

Signed-off-by: Philippe Mathieu-Daudé 
Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-5-arm...@redhat.com>


  Commit: c6f5d406e1ace1e3d7697e085024a3c7b93d6db5
  
https://github.com/qemu/qemu/commit/c6f5d406e1ace1e3d7697e085024a3c7b93d6db5
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M include/qapi/qmp/qerror.h
M qapi/opts-visitor.c
M util/qemu-option.c

  Log Message:
  ---
  qapi: Inline and remove QERR_INVALID_PARAMETER definition

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using:

  $ sed -i -e "s/QERR_INVALID_PARAMETER,/\"Invalid parameter '%s'\",/" \
$(git grep -lw QERR_INVALID_PARAMETER)

Manually simplify qemu_opts_create(), and remove the macro definition
in include/qapi/qmp/qerror.h.

Signed-off-by: Philippe Mathieu-Daudé 
Signed-off-by: Markus Armbruster 
Message-ID: <20240312141343.3168265-6-arm...@redhat.com>


  Commit: aaeafa5090c8d006d7c39b4e11bcfb8515ef1ece
  
https://github.com/qemu/qemu/commit/aaeafa5090c8d006d7c39b4e11bcfb8515ef1ece
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M qapi/qobject-input-visitor.c
M qapi/string-input-visitor.c
M qom/object.c

  Log Message:
  ---
  qapi: Inline QERR_INVALID_PARAMETER_TYPE definition (constant value)

Address the comment added in commit 4629ed1e98
("qerror: Finally unused, clean up"), from 2015:

  /*
   * These macros will go away, please don't use
   * in new code, and do not add new ones!
   */

Mechanical transformation using the following
coccinelle semantic patch:

@match@
expression errp;
expression param;
constant value;
@@
 error_setg(errp, QERR_INVALID_PARAMETER_TYPE, param, value);

@script:python strformat depends on match@
value << match.value;
fixedfmt; // new var
@@
fixedfmt = f'"Invalid parameter type for \'%s\', expected: {value[1:-1]}"'
coccinelle.fixedfmt = 

[Qemu-commits] [qemu/qemu] c82f57: MAINTAINERS: update email of Peter Lieven

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: c82f570e7c72683ade186a15a9f29f9008be9279
  
https://github.com/qemu/qemu/commit/c82f570e7c72683ade186a15a9f29f9008be9279
  Author: Peter Lieven 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M MAINTAINERS

  Log Message:
  ---
  MAINTAINERS: update email of Peter Lieven

I will leave KAMP in the next days. Update email to stay reachable.

Signed-off-by: Peter Lieven 
Message-ID: <20230105095039.182718-1...@kamp.de>
Signed-off-by: Thomas Huth 


  Commit: ead4c81bab556ba7f52843755183dee87c95b78a
  
https://github.com/qemu/qemu/commit/ead4c81bab556ba7f52843755183dee87c95b78a
  Author: Inès Varhol 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M tests/qtest/aspeed_fsi-test.c
M tests/qtest/cmsdk-apb-dualtimer-test.c
M tests/qtest/cmsdk-apb-watchdog-test.c
M tests/qtest/erst-test.c
M tests/qtest/ivshmem-test.c
M tests/qtest/libqos/ahci.c
M tests/qtest/microbit-test.c
M tests/qtest/sse-timer-test.c
M tests/qtest/stm32l4x5_exti-test.c
M tests/qtest/stm32l4x5_syscfg-test.c

  Log Message:
  ---
  tests/qtest : Use `g_assert_cmphex` instead of `g_assert_cmpuint`

The messages for assertions using hexadecimal numbers will be
easier to understand with `g_assert_cmphex`.

Cases changed : "cmpuint.*0x", "cmpuint.*<<"

Signed-off-by: Inès Varhol 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Ninad Palsule 
Message-ID: <20240414173349.31194-1-ines.var...@telecom-paris.fr>
Signed-off-by: Thomas Huth 


  Commit: 6842edbd741d0e06f83fefe6736acb5cdb927cf7
  
https://github.com/qemu/qemu/commit/6842edbd741d0e06f83fefe6736acb5cdb927cf7
  Author: Zhao Liu 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M docs/system/target-i386-desc.rst.inc

  Log Message:
  ---
  docs: i386: pc: Update maximum CPU numbers for PC Q35

Commit e4e98c7eebfa ("pc: q35: Bump max_cpus to 4096 vcpus") increases
the supported CPUs for PC Q35 machine.

Update maximum CPU numbers for PC Q35 in the document.

Signed-off-by: Zhao Liu 
Message-ID: <20240412085358.731560-1-zhao1@linux.intel.com>
Signed-off-by: Thomas Huth 


  Commit: 1237e8f8ed3845fc189cd169e4052bff98685b08
  
https://github.com/qemu/qemu/commit/1237e8f8ed3845fc189cd169e4052bff98685b08
  Author: Brad Smith 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M tests/vm/openbsd

  Log Message:
  ---
  tests/vm: update openbsd image to 7.5

tests/vm: update openbsd to release 7.5

Signed-off-by: Brad Smith 
Message-ID: 
Signed-off-by: Thomas Huth 


  Commit: 4e264d8a5a26f3987e513b2f3f7101efeff3d938
  
https://github.com/qemu/qemu/commit/4e264d8a5a26f3987e513b2f3f7101efeff3d938
  Author: Thomas Huth 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  Revert ".travis.yml: Cache Avocado cache"

This reverts commit c1073e44b46490133e16420e1784dec7bcd4e030.

The Avocado tests have been removed from Travis a long time ago with
commit c5008c76ee ("gitlab: add acceptance testing to system builds"),
so we don't need to cache the avocado files here anymore.

Message-ID: <20240320104144.823425-4-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: f7d55226696fa6a77f03ee370a8df63123b493b0
  
https://github.com/qemu/qemu/commit/f7d55226696fa6a77f03ee370a8df63123b493b0
  Author: Thomas Huth 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  .travis.yml: Remove the unused UNRELIABLE environment variable

This variable was used to allow jobs to fail without spoiling the
overall result. But the required "allow_failures:" hunk has been
accidentally removed in commit 9d03f5abed ("travis.yml: Remove the
"Release tarball" job"), and it was anyway only useful while we
still had the x86 jobs here around that were our main CI jobs.
Thus let's simply remove this useless variable now.

Message-ID: <20240320104144.823425-6-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: c9e2e8e8d08f9e07e8c1e24d9a9f85d6572408dd
  
https://github.com/qemu/qemu/commit/c9e2e8e8d08f9e07e8c1e24d9a9f85d6572408dd
  Author: Thomas Huth 
  Date:   2024-04-24 (Wed, 24 Apr 2024)

  Changed paths:
M .travis.yml

  Log Message:
  ---
  .travis.yml: Update the jobs to Ubuntu 22.04

According to our support policy, we'll soon drop our official support
for Ubuntu 20.04 ("Focal Fossa") in QEMU. Thus we should update the
Travis jobs now to a newer release (Ubuntu 22.04 - "Jammy Jellyfish")
for future testing. Since all jobs are using this release now, we
can drop the entries from the individual jobs and use the global
setting again.

Reviewed-by: Daniel P. Berrangé 
Message-ID: <20240418101056.302103-6-th...@redhat.com>
Signed-off-by: Thomas Huth 


  Commit: 49ba58ddd53dfa3ff58dad03bab5945813f6d086
  

[Qemu-commits] [qemu/qemu] 8c4716: tests/qtest/migration: Add 'to' object into migrat...

2024-04-24 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 8c47168cca012aa6f64dc50eebdb126ab81e360a
  
https://github.com/qemu/qemu/commit/8c47168cca012aa6f64dc50eebdb126ab81e360a
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add 'to' object into migrate_qmp()

Add the 'to' object into migrate_qmp(), so we can use
migrate_get_socket_address() inside migrate_qmp() to get
the port value. This is not applied to other migrate_qmp*
because they don't need the port.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-2-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: d1155fd485d54e55fd26804c04635404ce5da43b
  
https://github.com/qemu/qemu/commit/d1155fd485d54e55fd26804c04635404ce5da43b
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Replace connect_uri and move 
migrate_get_socket_address inside migrate_qmp

Move the calls to migrate_get_socket_address() into migrate_qmp().
Get rid of connect_uri and replace it with args->connect_uri only
because 'to' object will help to generate connect_uri with the
correct port number.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-3-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  
https://github.com/qemu/qemu/commit/4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c

  Log Message:
  ---
  tests/qtest/migration: Replace migrate_get_connect_uri inplace of 
migrate_get_socket_address

Refactor migrate_get_socket_address to internally utilize 'socket-address'
parameter, reducing redundancy in the function definition.

migrate_get_socket_address implicitly converts SocketAddress into str.
Move migrate_get_socket_address inside migrate_get_connect_uri which
should return the uri string instead.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-4-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 387dc407db6137cec479f6c6efb3851464ea9026
  
https://github.com/qemu/qemu/commit/387dc407db6137cec479f6c6efb3851464ea9026
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add channels parameter in migrate_qmp_fail

Alter migrate_qmp_fail() to allow both uri and channels
independently. For channels, convert string to a Dict.
No dealing with migrate_get_socket_address() here because
we will fail before starting the migration anyway.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-5-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  
https://github.com/qemu/qemu/commit/2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c

  Log Message:
  ---
  tests/qtest/migration: Add migrate_set_ports into migrate_qmp to update 
migration port value

migrate_get_connect_qdict gets qdict with the dst QEMU parameters.

migrate_set_ports() from list of channels reads each QDict for port,
and fills the port with correct value in case it was 0 in the test.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-6-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  
https://github.com/qemu/qemu/commit/d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add channels parameter in migrate_qmp

Alter migrate_qmp() to allow use of channels parameter, but only
fill the uri with correct port number if there are no channels.
Here we don't want to allow the wrong cases of having both or
none (ex: migrate_qmp_fail).

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-7-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  

[Qemu-commits] [qemu/qemu] 8c4716: tests/qtest/migration: Add 'to' object into migrat...

2024-04-23 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 8c47168cca012aa6f64dc50eebdb126ab81e360a
  
https://github.com/qemu/qemu/commit/8c47168cca012aa6f64dc50eebdb126ab81e360a
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add 'to' object into migrate_qmp()

Add the 'to' object into migrate_qmp(), so we can use
migrate_get_socket_address() inside migrate_qmp() to get
the port value. This is not applied to other migrate_qmp*
because they don't need the port.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-2-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: d1155fd485d54e55fd26804c04635404ce5da43b
  
https://github.com/qemu/qemu/commit/d1155fd485d54e55fd26804c04635404ce5da43b
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Replace connect_uri and move 
migrate_get_socket_address inside migrate_qmp

Move the calls to migrate_get_socket_address() into migrate_qmp().
Get rid of connect_uri and replace it with args->connect_uri only
because 'to' object will help to generate connect_uri with the
correct port number.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-3-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  
https://github.com/qemu/qemu/commit/4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c

  Log Message:
  ---
  tests/qtest/migration: Replace migrate_get_connect_uri inplace of 
migrate_get_socket_address

Refactor migrate_get_socket_address to internally utilize 'socket-address'
parameter, reducing redundancy in the function definition.

migrate_get_socket_address implicitly converts SocketAddress into str.
Move migrate_get_socket_address inside migrate_get_connect_uri which
should return the uri string instead.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-4-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 387dc407db6137cec479f6c6efb3851464ea9026
  
https://github.com/qemu/qemu/commit/387dc407db6137cec479f6c6efb3851464ea9026
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add channels parameter in migrate_qmp_fail

Alter migrate_qmp_fail() to allow both uri and channels
independently. For channels, convert string to a Dict.
No dealing with migrate_get_socket_address() here because
we will fail before starting the migration anyway.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-5-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: 2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  
https://github.com/qemu/qemu/commit/2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c

  Log Message:
  ---
  tests/qtest/migration: Add migrate_set_ports into migrate_qmp to update 
migration port value

migrate_get_connect_qdict gets qdict with the dst QEMU parameters.

migrate_set_ports() from list of channels reads each QDict for port,
and fills the port with correct value in case it was 0 in the test.

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-6-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  Commit: d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  
https://github.com/qemu/qemu/commit/d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  Author: Het Gala 
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
M tests/qtest/migration-helpers.c
M tests/qtest/migration-helpers.h
M tests/qtest/migration-test.c

  Log Message:
  ---
  tests/qtest/migration: Add channels parameter in migrate_qmp

Alter migrate_qmp() to allow use of channels parameter, but only
fill the uri with correct port number if there are no channels.
Here we don't want to allow the wrong cases of having both or
none (ex: migrate_qmp_fail).

Signed-off-by: Het Gala 
Suggested-by: Fabiano Rosas 
Reviewed-by: Fabiano Rosas 
Link: https://lore.kernel.org/r/20240312202634.63349-7-het.g...@nutanix.com
Signed-off-by: Peter Xu 


  

[Qemu-commits] [qemu/qemu] 6190fd: meson: do not link pixman automatically into all t...

2024-04-23 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 6190fd61d4d632cef58409ceac42d2b9882601c6
  
https://github.com/qemu/qemu/commit/6190fd61d4d632cef58409ceac42d2b9882601c6
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M meson.build

  Log Message:
  ---
  meson: do not link pixman automatically into all targets

The dependency on pixman is listed manually in all sourcesets that need it.
There is no need to bring into libqemuutil, since there is nothing in
util/ that needs pixman either.

Reported-by: Michael Tokarev 
Signed-off-by: Paolo Bonzini 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-2-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: d04c7e5535e97e4a1a55d05cfe632b8c66369b36
  
https://github.com/qemu/qemu/commit/d04c7e5535e97e4a1a55d05cfe632b8c66369b36
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M tests/meson.build

  Log Message:
  ---
  tests: only build plugins if TCG is enabled

There is no way to use them for testing, if all the available
accelerators use hardware virtualization.

Signed-off-by: Paolo Bonzini 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-3-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: bb23c33f9381a8986798deb896cd15c2c0932cc6
  
https://github.com/qemu/qemu/commit/bb23c33f9381a8986798deb896cd15c2c0932cc6
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M ebpf/meson.build

  Log Message:
  ---
  ebpf: Restrict to system emulation

eBPF is not used in user emulation.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-ID: <20240404194757.9343-2-phi...@linaro.org>
Signed-off-by: Paolo Bonzini 
Message-ID: <20240408155330.522792-4-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 34dca3f5be81897338176cd4bbe54fecbdd5c3af
  
https://github.com/qemu/qemu/commit/34dca3f5be81897338176cd4bbe54fecbdd5c3af
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M tests/unit/meson.build

  Log Message:
  ---
  tests/unit: match some unit tests to corresponding feature switches

Try not to test code that is not used by user mode emulation, or by the
block layer, unless they are being compiled; and fix test-timed-average
which was not compiled with --disable-system --enable-tools.

This is by no means complete, it only touches the more blatantly
wrong cases.

Signed-off-by: Paolo Bonzini 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-5-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: b9ad27a9a4040805e9bbae95853db41f33285ffa
  
https://github.com/qemu/qemu/commit/b9ad27a9a4040805e9bbae95853db41f33285ffa
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M util/meson.build

  Log Message:
  ---
  yank: only build if needed

The yank feature is not used in user emulation.

Suggested-by: Philippe Mathieu-Daudé 
Signed-off-by: Paolo Bonzini 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-6-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 3df4c28860e100011db3a51a8a331506a3fe51f0
  
https://github.com/qemu/qemu/commit/3df4c28860e100011db3a51a8a331506a3fe51f0
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M include/qemu/config-file.h
M monitor/meson.build
A monitor/qemu-config-qmp.c
M util/qemu-config.c

  Log Message:
  ---
  util/qemu-config: Extract QMP commands to qemu-config-qmp.c

QMP is irrelevant for user emulation. Extract the code
related to QMP in a different source file, which won't
be build for user emulation binaries. This avoid pulling
pointless code.

Signed-off-by: Philippe Mathieu-Daudé 
Message-ID: <20240404194757.9343-5-phi...@linaro.org>
Signed-off-by: Paolo Bonzini 
Message-ID: <20240408155330.522792-7-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 971febb8f5e810c2d167ac9cb5bd1cdaf6ca688d
  
https://github.com/qemu/qemu/commit/971febb8f5e810c2d167ac9cb5bd1cdaf6ca688d
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
R hw/core/hotplug-stubs.c
M hw/core/meson.build
A stubs/hotplug-stubs.c
M stubs/meson.build

  Log Message:
  ---
  hw/core: Move system emulation files to system_ss

hotplug.c, qdev-hotplug.c and reset.c are not used by user emulation
and need not be included in hwcore_ss.  Move them to system_ss, where
they belong, by letting the linker pull in the stubs when needed.

Signed-off-by: Paolo Bonzini 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-8-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 68621262bd4317dfcdd511d8005b8558c3ddc353
  

[Qemu-commits] [qemu/qemu] 62dbe5: Update version for v9.0.0-rc4 release

2024-04-23 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 62dbe54c24dbf77051bafe1039c31ddc8f37602d
  
https://github.com/qemu/qemu/commit/62dbe54c24dbf77051bafe1039c31ddc8f37602d
  Author: Peter Maydell 
  Date:   2024-04-16 (Tue, 16 Apr 2024)

  Changed paths:
M VERSION

  Log Message:
  ---
  Update version for v9.0.0-rc4 release

Signed-off-by: Peter Maydell 


  Commit: 6190fd61d4d632cef58409ceac42d2b9882601c6
  
https://github.com/qemu/qemu/commit/6190fd61d4d632cef58409ceac42d2b9882601c6
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M meson.build

  Log Message:
  ---
  meson: do not link pixman automatically into all targets

The dependency on pixman is listed manually in all sourcesets that need it.
There is no need to bring into libqemuutil, since there is nothing in
util/ that needs pixman either.

Reported-by: Michael Tokarev 
Signed-off-by: Paolo Bonzini 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-2-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: d04c7e5535e97e4a1a55d05cfe632b8c66369b36
  
https://github.com/qemu/qemu/commit/d04c7e5535e97e4a1a55d05cfe632b8c66369b36
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M tests/meson.build

  Log Message:
  ---
  tests: only build plugins if TCG is enabled

There is no way to use them for testing, if all the available
accelerators use hardware virtualization.

Signed-off-by: Paolo Bonzini 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-3-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: bb23c33f9381a8986798deb896cd15c2c0932cc6
  
https://github.com/qemu/qemu/commit/bb23c33f9381a8986798deb896cd15c2c0932cc6
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M ebpf/meson.build

  Log Message:
  ---
  ebpf: Restrict to system emulation

eBPF is not used in user emulation.

Signed-off-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-ID: <20240404194757.9343-2-phi...@linaro.org>
Signed-off-by: Paolo Bonzini 
Message-ID: <20240408155330.522792-4-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 34dca3f5be81897338176cd4bbe54fecbdd5c3af
  
https://github.com/qemu/qemu/commit/34dca3f5be81897338176cd4bbe54fecbdd5c3af
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M tests/unit/meson.build

  Log Message:
  ---
  tests/unit: match some unit tests to corresponding feature switches

Try not to test code that is not used by user mode emulation, or by the
block layer, unless they are being compiled; and fix test-timed-average
which was not compiled with --disable-system --enable-tools.

This is by no means complete, it only touches the more blatantly
wrong cases.

Signed-off-by: Paolo Bonzini 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-5-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: b9ad27a9a4040805e9bbae95853db41f33285ffa
  
https://github.com/qemu/qemu/commit/b9ad27a9a4040805e9bbae95853db41f33285ffa
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M util/meson.build

  Log Message:
  ---
  yank: only build if needed

The yank feature is not used in user emulation.

Suggested-by: Philippe Mathieu-Daudé 
Signed-off-by: Paolo Bonzini 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-ID: <20240408155330.522792-6-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 3df4c28860e100011db3a51a8a331506a3fe51f0
  
https://github.com/qemu/qemu/commit/3df4c28860e100011db3a51a8a331506a3fe51f0
  Author: Philippe Mathieu-Daudé 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
M include/qemu/config-file.h
M monitor/meson.build
A monitor/qemu-config-qmp.c
M util/qemu-config.c

  Log Message:
  ---
  util/qemu-config: Extract QMP commands to qemu-config-qmp.c

QMP is irrelevant for user emulation. Extract the code
related to QMP in a different source file, which won't
be build for user emulation binaries. This avoid pulling
pointless code.

Signed-off-by: Philippe Mathieu-Daudé 
Message-ID: <20240404194757.9343-5-phi...@linaro.org>
Signed-off-by: Paolo Bonzini 
Message-ID: <20240408155330.522792-7-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 971febb8f5e810c2d167ac9cb5bd1cdaf6ca688d
  
https://github.com/qemu/qemu/commit/971febb8f5e810c2d167ac9cb5bd1cdaf6ca688d
  Author: Paolo Bonzini 
  Date:   2024-04-18 (Thu, 18 Apr 2024)

  Changed paths:
R hw/core/hotplug-stubs.c
M hw/core/meson.build
A stubs/hotplug-stubs.c
M stubs/meson.build

  Log Message:
  ---
  hw/core: Move system emulation files to system_ss

hotplug.c, qdev-hotplug.c and reset.c are not used by user emulation
and need not be 

[Qemu-commits] [qemu/qemu] 6e2950: linux-user/x86_64: Handle the vsyscall page in ope...

2024-04-15 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging-8.2
  Home:   https://github.com/qemu/qemu
  Commit: 6e29509abc79dcd0adb3c9ec848c2e95a158efc4
  
https://github.com/qemu/qemu/commit/6e29509abc79dcd0adb3c9ec848c2e95a158efc4
  Author: Richard Henderson 
  Date:   2024-04-14 (Sun, 14 Apr 2024)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user/x86_64: Handle the vsyscall page in open_self_maps_{2,4}

This is the only case in which we expect to have no host memory backing
for a guest memory page, because in general linux user processes cannot
map any pages in the top half of the 64-bit address space.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2170
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 
(cherry picked from commit 4ef1f559f270c66b3ffc23f6c845ff3d008c6356)
Signed-off-by: Michael Tokarev 



To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



[Qemu-commits] [qemu/qemu] d8ad97: linux-user: xtensa: fix signal delivery in FDPIC

2023-12-14 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging-8.1
  Home:   https://github.com/qemu/qemu
  Commit: d8ad972b2d2361a369fc253505a0d2f7f2fec541
  
https://github.com/qemu/qemu/commit/d8ad972b2d2361a369fc253505a0d2f7f2fec541
  Author: Max Filippov 
  Date:   2023-11-22 (Wed, 22 Nov 2023)

  Changed paths:
M linux-user/xtensa/signal.c

  Log Message:
  ---
  linux-user: xtensa: fix signal delivery in FDPIC

In FDPIC signal handlers are passed around as FD pointers. Actual code
address and GOT pointer must be fetched from memory by the QEMU code
that implements kernel signal delivery functionality. This change is
equivalent to the following kernel change:
9c2cc74fb31e ("xtensa: fix signal delivery to FDPIC process")

Cc: qemu-sta...@nongnu.org
Fixes: d2796be69d7c ("linux-user: add support for xtensa FDPIC")
Reviewed-by: Richard Henderson 
Signed-off-by: Max Filippov 
(cherry picked from commit 1b173d06068c4a4e93fad88205399232925967a4)
Signed-off-by: Michael Tokarev 


  Commit: db8e86cc40c22be3f3938d3e1f692511ec03b371
  
https://github.com/qemu/qemu/commit/db8e86cc40c22be3f3938d3e1f692511ec03b371
  Author: Richard Henderson 
  Date:   2023-11-22 (Wed, 22 Nov 2023)

  Changed paths:
M target/arm/tcg/sme_helper.c

  Log Message:
  ---
  target/arm: Fix SME FMOPA (16-bit), BFMOPA

Perform the loop increment unconditionally, not nested
within the predication.

Cc: qemu-sta...@nongnu.org
Fixes: 3916841ac75 ("target/arm: Implement FMOPA, FMOPS (widening)")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1985
Signed-off-by: Richard Henderson 
Reviewed-by: Philippe Mathieu-Daudé 
Message-id: 20231117193135.1180657-1-richard.hender...@linaro.org
Signed-off-by: Peter Maydell 
(cherry picked from commit 3efd8495735c69b863476e9003e624877382a72d)
Signed-off-by: Michael Tokarev 


  Commit: c6c0a1888fc2339048157391eab2017cadbaf684
  
https://github.com/qemu/qemu/commit/c6c0a1888fc2339048157391eab2017cadbaf684
  Author: Niklas Cassel 
  Date:   2023-11-22 (Wed, 22 Nov 2023)

  Changed paths:
M hw/ide/ahci.c

  Log Message:
  ---
  hw/ide/ahci: fix legacy software reset

Legacy software contains a standard mechanism for generating a reset to a
Serial ATA device - setting the SRST (software reset) bit in the Device
Control register.

Serial ATA has a more robust mechanism called COMRESET, also referred to
as port reset. A port reset is the preferred mechanism for error
recovery and should be used in place of software reset.

Commit e2a5d9b3d9c3 ("hw/ide/ahci: simplify and document PxCI handling")
(mjt:  16cc9594d23d in stable-8.1 series, v8.1.1)
improved the handling of PxCI, such that PxCI gets cleared after handling
a non-NCQ, or NCQ command (instead of incorrectly clearing PxCI after
receiving anything - even a FIS that failed to parse, which should NOT
clear PxCI, so that you can see which command slot that caused an error).

However, simply clearing PxCI after a non-NCQ, or NCQ command, is not
enough, we also need to clear PxCI when receiving a SRST in the Device
Control register.

A legacy software reset is performed by the host sending two H2D FISes,
the first H2D FIS asserts SRST, and the second H2D FIS deasserts SRST.

The first H2D FIS will not get a D2H reply, and requires the FIS to have
the C bit set to one, such that the HBA itself will clear the bit in PxCI.

The second H2D FIS will get a D2H reply once the diagnostic is completed.
The clearing of the bit in PxCI for this command should ideally be done
in ahci_init_d2h() (if it was a legacy software reset that caused the
reset (a COMRESET does not use a command slot)). However, since the reset
value for PxCI is 0, modify ahci_reset_port() to actually clear PxCI to 0,
that way we can avoid complex logic in ahci_init_d2h().

This fixes an issue for FreeBSD where the device would fail to reset.
The problem was not noticed in Linux, because Linux uses a COMRESET
instead of a legacy software reset by default.

Fixes: e2a5d9b3d9c3 ("hw/ide/ahci: simplify and document PxCI handling")
Reported-by: Marcin Juszkiewicz 
Signed-off-by: Niklas Cassel 
Message-ID: <20231108222657.117984-1-...@flawful.org>
Reviewed-by: Kevin Wolf 
Tested-by: Marcin Juszkiewicz 
Signed-off-by: Kevin Wolf 
(cherry picked from commit eabb921250666501ae78714b60090200b639fcfe)
Signed-off-by: Michael Tokarev 
(mjt: mention 16cc9594d23d for stable-8.1)


  Commit: cc5124d9797b0801525bc6658af9ed22426d1eff
  
https://github.com/qemu/qemu/commit/cc5124d9797b0801525bc6658af9ed22426d1eff
  Author: Akihiko Odaki 
  Date:   2023-11-29 (Wed, 29 Nov 2023)

  Changed paths:
M hw/net/allwinner-sun8i-emac.c
M hw/net/allwinner_emac.c
M hw/net/cadence_gem.c
M hw/net/dp8393x.c
M hw/net/e1000.c
M hw/net/e1000e.c
M hw/net/eepro100.c
M hw/net/etraxfs_eth.c
M hw/net/fsl_etsec/etsec.c
M hw/net/ftgmac100.c
M hw/net/i82596.c
M hw/net/igb.c
M hw/net/imx_fec.c
M hw/net/lan9118.c
M hw/net/mcf_fec.c
M hw/net/mipsnet.c

[Qemu-commits] [qemu/qemu] 16d2ad: virtio-gpu/win32: set the destroy function on load

2023-09-20 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging-8.1
  Home:   https://github.com/qemu/qemu
  Commit: 16d2adcee36fe302fca7a3e8f2aae199580d3624
  
https://github.com/qemu/qemu/commit/16d2adcee36fe302fca7a3e8f2aae199580d3624
  Author: Marc-André Lureau 
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
M hw/display/virtio-gpu.c

  Log Message:
  ---
  virtio-gpu/win32: set the destroy function on load

Don't forget to unmap the resource memory.

Fixes: commit 9462ff469 ("virtio-gpu/win32: allocate shareable 2d 
resources/images")

Signed-off-by: Marc-André Lureau 
(cherry picked from commit 04562ee88e99d71f4e6017f64123f726dd8b41e1)
Signed-off-by: Michael Tokarev 


  Commit: 88219fd5eff84c9767df61312ba034ccba4edba6
  
https://github.com/qemu/qemu/commit/88219fd5eff84c9767df61312ba034ccba4edba6
  Author: Marc-André Lureau 
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
M ui/console.c

  Log Message:
  ---
  ui: fix crash when there are no active_console

Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
0x55888630 in dpy_ui_info_supported (con=0x0) at ../ui/console.c:812
812 return con->hw_ops->ui_info != NULL;
(gdb) bt
#0  0x55888630 in dpy_ui_info_supported (con=0x0) at ../ui/console.c:812
#1  0x558a44b1 in protocol_client_msg (vs=0x578c76c0, 
data=0x581e93f0 , len=24) at ../ui/vnc.c:2585
#2  0x558a19ac in vnc_client_read (vs=0x578c76c0) at 
../ui/vnc.c:1607
#3  0x558a1ac2 in vnc_client_io (ioc=0x581eb0e0, condition=G_IO_IN, 
opaque=0x578c76c0) at ../ui/vnc.c:1635

Fixes:
https://issues.redhat.com/browse/RHEL-2600

Signed-off-by: Marc-André Lureau 
Reviewed-by: Albert Esteve 
(cherry picked from commit 48a35e12faf90a896c5aa4755812201e00d60316)
Signed-off-by: Michael Tokarev 


  Commit: 84729ec2f357f487c8b39b53fbe7e35931d0f4e8
  
https://github.com/qemu/qemu/commit/84729ec2f357f487c8b39b53fbe7e35931d0f4e8
  Author: Janosch Frank 
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
M hw/s390x/s390-virtio-ccw.c

  Log Message:
  ---
  s390x/ap: fix missing subsystem reset registration

A subsystem reset contains a reset of AP resources which has been
missing.  Adding the AP bridge to the list of device types that need
reset fixes this issue.

Reviewed-by: Jason J. Herne 
Reviewed-by: Tony Krowiak 
Signed-off-by: Janosch Frank 
Fixes: a51b3153 ("s390x/ap: base Adjunct Processor (AP) object model")
Message-ID: <20230823142219.1046522-2-sei...@linux.ibm.com>
Signed-off-by: Thomas Huth 
(cherry picked from commit 297ec01f0b9864ea8209ca0ddc6643b4c0574bdb)
Signed-off-by: Michael Tokarev 


  Commit: bd1dd50e2c84ecdb1c1e2ba21bef7a232fc4a203
  
https://github.com/qemu/qemu/commit/bd1dd50e2c84ecdb1c1e2ba21bef7a232fc4a203
  Author: Jonathan Perkin 
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
M meson.build

  Log Message:
  ---
  meson: Fix targetos match for illumos and Solaris.

qemu 8.1.0 breaks on illumos platforms due to _XOPEN_SOURCE and others no 
longer being set correctly, leading to breakage such as:

  
https://us-central.manta.mnx.io/pkgsrc/public/reports/trunk/tools/20230908.1404/qemu-8.1.0/build.log

This is a result of meson conversion which incorrectly matches against 
'solaris' instead of 'sunos' for uname.

First time submitting a patch here, hope I did it correctly.  Thanks.

Signed-off-by: Jonathan Perkin 
Message-ID: 
Cc: qemu-sta...@nongnu.org
Signed-off-by: Paolo Bonzini 
(cherry picked from commit fb0a8b0e238277296907ffe765bf76874cfc1df6)
Signed-off-by: Michael Tokarev 
(Mjt: omit net/meson.build change before v8.1.0-279-g73258b3864, adjust context 
befor v8.1.0-288-g2fc36530de)


  Commit: 64e355f5f0e89ffdc3a63d711a6c1c96b7c8c4b4
  
https://github.com/qemu/qemu/commit/64e355f5f0e89ffdc3a63d711a6c1c96b7c8c4b4
  Author: Marc-André Lureau 
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
M backends/tpm/tpm_util.c

  Log Message:
  ---
  tpm: fix crash when FD >= 1024 and unnecessary errors due to EINTR

Replace select() with poll() to fix a crash when QEMU has a large number
of FDs. Also use RETRY_ON_EINTR to avoid unnecessary errors due to EINTR.

Cc: qemu-sta...@nongnu.org
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2020133
Fixes: 56a3c24ffc ("tpm: Probe for connected TPM 1.2 or TPM 2")
Signed-off-by: Marc-André Lureau 
Reviewed-by: Michael Tokarev 
Reviewed-by: Stefan Berger 
Signed-off-by: Stefan Berger 
(cherry picked from commit 8e32ddff69b6b4547cc00592ad816484e160817a)
Signed-off-by: Michael Tokarev 


  Commit: 48e5f093fc3cfa06914b5fb3a12babd2dcefa08b
  
https://github.com/qemu/qemu/commit/48e5f093fc3cfa06914b5fb3a12babd2dcefa08b
  Author: Richard Henderson 
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
M accel/tcg/translator.c

  Log Message:
  ---
  accel/tcg: Avoid load of icount_decr if unused

With CF_NOIRQ and without !CF_USE_ICOUNT, the load isn't used.

[Qemu-commits] [qemu/qemu] 7e5a8b: Update version for v8.1.0 release

2023-08-22 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7e5a8bb22368b3555644cb2debd3df24592f3a21
  
https://github.com/qemu/qemu/commit/7e5a8bb22368b3555644cb2debd3df24592f3a21
  Author: Richard Henderson 
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
M VERSION

  Log Message:
  ---
  Update version for v8.1.0 release

Signed-off-by: Richard Henderson 


  Commit: b0dd9a7d6dd15a6898e9c585b521e6bec79b25aa
  
https://github.com/qemu/qemu/commit/b0dd9a7d6dd15a6898e9c585b521e6bec79b25aa
  Author: Richard Henderson 
  Date:   2023-08-22 (Tue, 22 Aug 2023)

  Changed paths:
M VERSION

  Log Message:
  ---
  Open 8.2 development tree

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/0d52116fd82c...b0dd9a7d6dd1



[Qemu-commits] [qemu/qemu] 0d5211: Update version for v8.1.0-rc4 release

2023-08-15 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0d52116fd82cdd1f4a88837336af5b6290c364a4
  
https://github.com/qemu/qemu/commit/0d52116fd82cdd1f4a88837336af5b6290c364a4
  Author: Richard Henderson 
  Date:   2023-08-15 (Tue, 15 Aug 2023)

  Changed paths:
M VERSION

  Log Message:
  ---
  Update version for v8.1.0-rc4 release

Signed-off-by: Richard Henderson 





[Qemu-commits] [qemu/qemu] d3b411: tcg/i386: Output %gs prefix in tcg_out_vex_opc

2023-08-14 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d3b41127c205062ca6c29c89c9542c4112c39ca0
  
https://github.com/qemu/qemu/commit/d3b41127c205062ca6c29c89c9542c4112c39ca0
  Author: Richard Henderson 
  Date:   2023-08-12 (Sat, 12 Aug 2023)

  Changed paths:
M tcg/i386/tcg-target.c.inc

  Log Message:
  ---
  tcg/i386: Output %gs prefix in tcg_out_vex_opc

Missing the segment prefix means that user-only fails
to add guest_base for some 128-bit load/store.

Fixes: 098d0fc10d2 ("tcg/i386: Support 128-bit load/store")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1763
Signed-off-by: Richard Henderson 


  Commit: 408af44d04476c633065bfb1eca6865ea93f2984
  
https://github.com/qemu/qemu/commit/408af44d04476c633065bfb1eca6865ea93f2984
  Author: Richard Henderson 
  Date:   2023-08-14 (Mon, 14 Aug 2023)

  Changed paths:
M tcg/i386/tcg-target.c.inc

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

tcg/i386: Output %gs prefix in tcg_out_vex_opc

# -BEGIN PGP SIGNATURE-
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTa3j0dHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/8QQf8DhuMzyl5obTahtBa
# BaxC6tyuvsGrhgxnAzGLrQ/fexlLcCBXi5j61zPmNPecgMYDYWy+bwGd4XnGy/TM
# xJVjb/g5c0xXKhDYRpqbsD8L0iLWl+aWZX4pmbu8/FutWSOq9LTqU/XOHrdUVxH2
# FArIiGKdaAA4nf8MD9N1/2EfXnOhrXmPtc+qAJGQvQ1fvEWT9X7WKCXaUd8x8p9h
# gCtm0CEJ11kmOcgH/mdXGL/Uv6U6Tx/8O5NbrKarSbFcxNMT1eTNOY5fceJioa/Q
# fEkhNGMYlPXGrKeDFWeIYyf6P+5BwJRCRijKwPU5lPuXUkGKspQt24DOJyld/sWh
# jq2lHQ==
# =+LFD
# -END PGP SIGNATURE-
# gpg: Signature made Mon 14 Aug 2023 07:09:01 PM PDT
# gpg:using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:issuer "richard.hender...@linaro.org"
# gpg: Good signature from "Richard Henderson " 
[ultimate]

* tag 'pull-tcg-20230814' of https://gitlab.com/rth7680/qemu:
  tcg/i386: Output %gs prefix in tcg_out_vex_opc

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/bb5f142cb320...408af44d0447



[Qemu-commits] [qemu/qemu] d3b411: tcg/i386: Output %gs prefix in tcg_out_vex_opc

2023-08-14 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: d3b41127c205062ca6c29c89c9542c4112c39ca0
  
https://github.com/qemu/qemu/commit/d3b41127c205062ca6c29c89c9542c4112c39ca0
  Author: Richard Henderson 
  Date:   2023-08-12 (Sat, 12 Aug 2023)

  Changed paths:
M tcg/i386/tcg-target.c.inc

  Log Message:
  ---
  tcg/i386: Output %gs prefix in tcg_out_vex_opc

Missing the segment prefix means that user-only fails
to add guest_base for some 128-bit load/store.

Fixes: 098d0fc10d2 ("tcg/i386: Support 128-bit load/store")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1763
Signed-off-by: Richard Henderson 


  Commit: 408af44d04476c633065bfb1eca6865ea93f2984
  
https://github.com/qemu/qemu/commit/408af44d04476c633065bfb1eca6865ea93f2984
  Author: Richard Henderson 
  Date:   2023-08-14 (Mon, 14 Aug 2023)

  Changed paths:
M tcg/i386/tcg-target.c.inc

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

tcg/i386: Output %gs prefix in tcg_out_vex_opc

# -BEGIN PGP SIGNATURE-
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTa3j0dHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV/8QQf8DhuMzyl5obTahtBa
# BaxC6tyuvsGrhgxnAzGLrQ/fexlLcCBXi5j61zPmNPecgMYDYWy+bwGd4XnGy/TM
# xJVjb/g5c0xXKhDYRpqbsD8L0iLWl+aWZX4pmbu8/FutWSOq9LTqU/XOHrdUVxH2
# FArIiGKdaAA4nf8MD9N1/2EfXnOhrXmPtc+qAJGQvQ1fvEWT9X7WKCXaUd8x8p9h
# gCtm0CEJ11kmOcgH/mdXGL/Uv6U6Tx/8O5NbrKarSbFcxNMT1eTNOY5fceJioa/Q
# fEkhNGMYlPXGrKeDFWeIYyf6P+5BwJRCRijKwPU5lPuXUkGKspQt24DOJyld/sWh
# jq2lHQ==
# =+LFD
# -END PGP SIGNATURE-
# gpg: Signature made Mon 14 Aug 2023 07:09:01 PM PDT
# gpg:using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:issuer "richard.hender...@linaro.org"
# gpg: Good signature from "Richard Henderson " 
[ultimate]

* tag 'pull-tcg-20230814' of https://gitlab.com/rth7680/qemu:
  tcg/i386: Output %gs prefix in tcg_out_vex_opc

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/bb5f142cb320...408af44d0447



[Qemu-commits] [qemu/qemu] 136cb9: target/riscv/kvm.c: fix mvendorid size in vcpu_set...

2023-08-11 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 136cb9cc03154615609d454db40e0b3dfbb4bbf3
  
https://github.com/qemu/qemu/commit/136cb9cc03154615609d454db40e0b3dfbb4bbf3
  Author: Daniel Henrique Barboza 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M target/riscv/kvm.c

  Log Message:
  ---
  target/riscv/kvm.c: fix mvendorid size in vcpu_set_machine_ids()

cpu->cfg.mvendorid is a 32 bit field and kvm_set_one_reg() always write
a target_ulong val, i.e. a 64 bit field in a 64 bit host.

Given that we're passing a pointer to the mvendorid field, the reg is
reading 64 bits starting from mvendorid and going 32 bits in the next
field, marchid. Here's an example:

$ ./qemu-system-riscv64 -machine virt,accel=kvm -m 2G -smp 1 \
   -cpu rv64,marchid=0xab,mvendorid=0xcd,mimpid=0xef(...)

(inside the guest)
 # cat /proc/cpuinfo
processor   : 0
hart: 0
isa : rv64imafdc_zicbom_zicboz_zihintpause_zbb_sstc
mmu : sv57
mvendorid   : 0xab00cd
marchid : 0xab
mimpid  : 0xef

'mvendorid' was written as a combination of 0xab (the value from the
adjacent field, marchid) and its intended value 0xcd.

Fix it by assigning cpu->cfg.mvendorid to a target_ulong var 'reg' and
use it as input for kvm_set_one_reg(). Here's the result with this patch
applied and using the same QEMU command line:

 # cat /proc/cpuinfo
processor   : 0
hart: 0
isa : rv64imafdc_zicbom_zicboz_zihintpause_zbb_sstc
mmu : sv57
mvendorid   : 0xcd
marchid : 0xab
mimpid  : 0xef

This bug affects only the generic (rv64) CPUs when running with KVM in a
64 bit env since the 'host' CPU does not allow the machine IDs to be
changed via command line.

Fixes: 1fb5a622f7 ("target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs")
Signed-off-by: Daniel Henrique Barboza 
Acked-by: Alistair Francis 
Reviewed-by: Andrew Jones 
Message-ID: <20230802180058.281385-1-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis 


  Commit: b274c2388e9fcde75d60c6e7c7d8f74b61b7
  
https://github.com/qemu/qemu/commit/b274c2388e9fcde75d60c6e7c7d8f74b61b7
  Author: Daniel Henrique Barboza 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/riscv/virt.c

  Log Message:
  ---
  hw/riscv/virt.c: change 'aclint' TCG check

The 'aclint' property is being conditioned with tcg acceleration in
virt_machine_class_init(). But acceleration code starts later than the
class init of the board, meaning that tcg_enabled() will be always be
false during class_init(), and the option is never being declared even
when declaring TCG accel:

$ ./build/qemu-system-riscv64 -M virt,accel=tcg,aclint=on
qemu-system-riscv64: Property 'virt-machine.aclint' not found

Fix it by moving the check from class_init() to machine_init(). Tune the
description to mention that the option is TCG only.

Cc: Philippe Mathieu-Daudé 
Fixes: c0716c81b ("hw/riscv/virt: Restrict ACLINT to TCG")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1823
Signed-off-by: Daniel Henrique Barboza 
Reviewed-by: Alistair Francis 
Reviewed-by: Philippe Mathieu-Daudé 
Message-ID: <20230811160224.440697-2-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis 


  Commit: bb5f142cb320d45d3d8dee2c82dae003cad39da8
  
https://github.com/qemu/qemu/commit/bb5f142cb320d45d3d8dee2c82dae003cad39da8
  Author: Richard Henderson 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/riscv/virt.c
M target/riscv/kvm.c

  Log Message:
  ---
  Merge tag 'pull-riscv-to-apply-20230811-3' of 
https://github.com/alistair23/qemu into staging

Sixth RISC-V PR for 8.1

This is a last minute PR for RISC-V.

The main goal is to fix
https://gitlab.com/qemu-project/qemu/-/issues/1823
which is a regression that means the aclint option
cannot be enabled.

While we are here we also fixup KVM issue.

 * KVM: fix mvendorid size
 * Fixup aclint check

# -BEGIN PGP SIGNATURE-
#
# iQIzBAABCAAdFiEEaukCtqfKh31tZZKWr3yVEwxTgBMFAmTWfK0ACgkQr3yVEwxT
# gBNDTw/9EnIjXKBCwSejcL3xYpwTDbUbwou3dkkSjnEkhmxvPPM3H0pWet+xYlPg
# Lgt9b9clHZAjqGoHFxEdU8fS0MY4Jq5jDAinsS2TK6czLPBe5EEhyVjoDH5iRhTX
# AymK1XgwQ2kAuw2lhcb74GDboajkC7hNhr2Km1hLtpYV7bCW/efAUSO7adG4KBlB
# SCu06s9VdFtINW0mVN249JvRVQ1408HCQ5gwA0lLVdXhfHluVidwOjc//ELtdnQn
# SeHdX1V+e+3fiYuqmr2UHaJXp9s0ZInOyLIDBPA97SOUdaO/oy+siZYRk25yV99h
# Ec7tpNnYJjzppmc++GlzTNpUWVEBM6j+QyD7ioEj4yAGkMEjUlgLcImyGng1TT4i
# uvABg91uzJyBoUga3GhZYt/sPW00Jft4VYH3QvGOOwjarIor8K0J7sox8eIOfEs4
# JqCIYX4kas+DwK4+i8WyjMeuihWFJ5ipKR7Gwhbe5uQ5szTXFYIT4TZH/78BWozI
# dMu5HOyu5+l9yCy39NP7FjNJ6VQKBYGvlkUr5rLRS0yQWGThaK8wIBMXcuZCW96p
# hSy/pratHQYaIRr0ZiqRcNyFNsTMua/C2DMPcjQR1ci8xdj010DoriyS0Vsh88xq
# pVgC6gYn59gDUdBx0gB/ZSMu4O+F/+Z5htnucoTxvwpKxUU48Lg=
# =x8Fl
# -END PGP SIGNATURE-
# gpg: Signature made Fri 11 Aug 2023 11:23:41 AM PDT
# gpg:using RSA key 6AE902B6A7CA877D6D659296AF7C95130C538013

[Qemu-commits] [qemu/qemu] 136cb9: target/riscv/kvm.c: fix mvendorid size in vcpu_set...

2023-08-11 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 136cb9cc03154615609d454db40e0b3dfbb4bbf3
  
https://github.com/qemu/qemu/commit/136cb9cc03154615609d454db40e0b3dfbb4bbf3
  Author: Daniel Henrique Barboza 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M target/riscv/kvm.c

  Log Message:
  ---
  target/riscv/kvm.c: fix mvendorid size in vcpu_set_machine_ids()

cpu->cfg.mvendorid is a 32 bit field and kvm_set_one_reg() always write
a target_ulong val, i.e. a 64 bit field in a 64 bit host.

Given that we're passing a pointer to the mvendorid field, the reg is
reading 64 bits starting from mvendorid and going 32 bits in the next
field, marchid. Here's an example:

$ ./qemu-system-riscv64 -machine virt,accel=kvm -m 2G -smp 1 \
   -cpu rv64,marchid=0xab,mvendorid=0xcd,mimpid=0xef(...)

(inside the guest)
 # cat /proc/cpuinfo
processor   : 0
hart: 0
isa : rv64imafdc_zicbom_zicboz_zihintpause_zbb_sstc
mmu : sv57
mvendorid   : 0xab00cd
marchid : 0xab
mimpid  : 0xef

'mvendorid' was written as a combination of 0xab (the value from the
adjacent field, marchid) and its intended value 0xcd.

Fix it by assigning cpu->cfg.mvendorid to a target_ulong var 'reg' and
use it as input for kvm_set_one_reg(). Here's the result with this patch
applied and using the same QEMU command line:

 # cat /proc/cpuinfo
processor   : 0
hart: 0
isa : rv64imafdc_zicbom_zicboz_zihintpause_zbb_sstc
mmu : sv57
mvendorid   : 0xcd
marchid : 0xab
mimpid  : 0xef

This bug affects only the generic (rv64) CPUs when running with KVM in a
64 bit env since the 'host' CPU does not allow the machine IDs to be
changed via command line.

Fixes: 1fb5a622f7 ("target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs")
Signed-off-by: Daniel Henrique Barboza 
Acked-by: Alistair Francis 
Reviewed-by: Andrew Jones 
Message-ID: <20230802180058.281385-1-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis 


  Commit: b274c2388e9fcde75d60c6e7c7d8f74b61b7
  
https://github.com/qemu/qemu/commit/b274c2388e9fcde75d60c6e7c7d8f74b61b7
  Author: Daniel Henrique Barboza 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/riscv/virt.c

  Log Message:
  ---
  hw/riscv/virt.c: change 'aclint' TCG check

The 'aclint' property is being conditioned with tcg acceleration in
virt_machine_class_init(). But acceleration code starts later than the
class init of the board, meaning that tcg_enabled() will be always be
false during class_init(), and the option is never being declared even
when declaring TCG accel:

$ ./build/qemu-system-riscv64 -M virt,accel=tcg,aclint=on
qemu-system-riscv64: Property 'virt-machine.aclint' not found

Fix it by moving the check from class_init() to machine_init(). Tune the
description to mention that the option is TCG only.

Cc: Philippe Mathieu-Daudé 
Fixes: c0716c81b ("hw/riscv/virt: Restrict ACLINT to TCG")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1823
Signed-off-by: Daniel Henrique Barboza 
Reviewed-by: Alistair Francis 
Reviewed-by: Philippe Mathieu-Daudé 
Message-ID: <20230811160224.440697-2-dbarb...@ventanamicro.com>
Signed-off-by: Alistair Francis 


  Commit: bb5f142cb320d45d3d8dee2c82dae003cad39da8
  
https://github.com/qemu/qemu/commit/bb5f142cb320d45d3d8dee2c82dae003cad39da8
  Author: Richard Henderson 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/riscv/virt.c
M target/riscv/kvm.c

  Log Message:
  ---
  Merge tag 'pull-riscv-to-apply-20230811-3' of 
https://github.com/alistair23/qemu into staging

Sixth RISC-V PR for 8.1

This is a last minute PR for RISC-V.

The main goal is to fix
https://gitlab.com/qemu-project/qemu/-/issues/1823
which is a regression that means the aclint option
cannot be enabled.

While we are here we also fixup KVM issue.

 * KVM: fix mvendorid size
 * Fixup aclint check

# -BEGIN PGP SIGNATURE-
#
# iQIzBAABCAAdFiEEaukCtqfKh31tZZKWr3yVEwxTgBMFAmTWfK0ACgkQr3yVEwxT
# gBNDTw/9EnIjXKBCwSejcL3xYpwTDbUbwou3dkkSjnEkhmxvPPM3H0pWet+xYlPg
# Lgt9b9clHZAjqGoHFxEdU8fS0MY4Jq5jDAinsS2TK6czLPBe5EEhyVjoDH5iRhTX
# AymK1XgwQ2kAuw2lhcb74GDboajkC7hNhr2Km1hLtpYV7bCW/efAUSO7adG4KBlB
# SCu06s9VdFtINW0mVN249JvRVQ1408HCQ5gwA0lLVdXhfHluVidwOjc//ELtdnQn
# SeHdX1V+e+3fiYuqmr2UHaJXp9s0ZInOyLIDBPA97SOUdaO/oy+siZYRk25yV99h
# Ec7tpNnYJjzppmc++GlzTNpUWVEBM6j+QyD7ioEj4yAGkMEjUlgLcImyGng1TT4i
# uvABg91uzJyBoUga3GhZYt/sPW00Jft4VYH3QvGOOwjarIor8K0J7sox8eIOfEs4
# JqCIYX4kas+DwK4+i8WyjMeuihWFJ5ipKR7Gwhbe5uQ5szTXFYIT4TZH/78BWozI
# dMu5HOyu5+l9yCy39NP7FjNJ6VQKBYGvlkUr5rLRS0yQWGThaK8wIBMXcuZCW96p
# hSy/pratHQYaIRr0ZiqRcNyFNsTMua/C2DMPcjQR1ci8xdj010DoriyS0Vsh88xq
# pVgC6gYn59gDUdBx0gB/ZSMu4O+F/+Z5htnucoTxvwpKxUU48Lg=
# =x8Fl
# -END PGP SIGNATURE-
# gpg: Signature made Fri 11 Aug 2023 11:23:41 AM PDT
# gpg:using RSA key 

[Qemu-commits] [qemu/qemu] 3d449b: hw/pci-host: Allow extended config space access fo...

2023-08-11 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 3d449bc6030904ead784a4e4644c9640c2152796
  
https://github.com/qemu/qemu/commit/3d449bc6030904ead784a4e4644c9640c2152796
  Author: Jason Chien 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/pci-host/designware.c

  Log Message:
  ---
  hw/pci-host: Allow extended config space access for Designware PCIe host

In pcie_bus_realize(), a root bus is realized as a PCIe bus and a non-root
bus is realized as a PCIe bus if its parent bus is a PCIe bus. However,
the child bus "dw-pcie" is realized before the parent bus "pcie" which is
the root PCIe bus. Thus, the extended configuration space is not accessible
on "dw-pcie". The issue can be resolved by adding the
PCI_BUS_EXTENDED_CONFIG_SPACE flag to "pcie" before "dw-pcie" is realized.

Signed-off-by: Jason Chien 
Message-Id: <20230809102257.25121-1-jason.ch...@sifive.com>
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Michael S. Tsirkin 
Reviewed-by: Frank Chang 
Signed-off-by: Jason Chien mailto:jason.ch...@sifive.com; 
target="_blank">jason.ch...@sifive.com


  Commit: 0f936247e8ed0ab5fb7e75827dd8c8f73d5ef4b5
  
https://github.com/qemu/qemu/commit/0f936247e8ed0ab5fb7e75827dd8c8f73d5ef4b5
  Author: Guoyi Tu 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/pci/pci.c

  Log Message:
  ---
  pci: Fix the update of interrupt disable bit in PCI_COMMAND register

The PCI_COMMAND register is located at offset 4 within
the PCI configuration space and occupies 2 bytes. The
interrupt disable bit is at the 10th bit, which corresponds
to the byte at offset 5 in the PCI configuration space.

In our testing environment, the guest driver may directly
updates the byte at offset 5 in the PCI configuration space.
The backtrace looks like as following:
at hw/pci/pci.c:1442
at hw/virtio/virtio-pci.c:605
val=5, len=1) at hw/pci/pci_host.c:81

In this situation, the range_covers_byte function called
by the pci_default_write_config function will return false,
resulting in the inability to handle the interrupt disable
update event.

To fix this issue, we can use the ranges_overlap function
instead of range_covers_byte to determine whether the interrupt
bit has been updated.

Signed-off-by: Guoyi Tu 
Signed-off-by: yuanminghao 
Message-Id: 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Michael S. Tsirkin 
Fixes: b6981cb57be5 ("pci: interrupt disable bit support")


  Commit: 44e13cb441e08cb4635914ca03d95a282fb70e5c
  
https://github.com/qemu/qemu/commit/44e13cb441e08cb4635914ca03d95a282fb70e5c
  Author: Richard Henderson 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/pci-host/designware.c
M hw/pci/pci.c

  Log Message:
  ---
  Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu 
into staging

pci: last minute bugfixes

two fixes that seem very safe and important enough to sneak
in before the release.

Signed-off-by: Michael S. Tsirkin 

# -BEGIN PGP SIGNATURE-
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmTWXvIPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpe7sH/0KteOBt324LUYZ+4NR6EQE5KDsCANGiySBK
# r0B6lhcFHvNd2ej0g2hW7lL6nVVCQBkJLLzfNIR/aHkeCmOttfbhv4eF4S6Ho27d
# DpkXCPZRT6F11gY7G1swFapNS/f0P7F5LGRjq4sbuw3FpyHBz0DqCQ0GOab2Qorq
# VfuOfA01nYGNzHOKrEL7k9Io55oqPVcAe+5TaipNCQ4nW82i32ItTyFjQFdLIAay
# qY4HEwP9vPuVwWNdQjXJNfirLMO5GQfEbyKDAjap2sL25zAV2w+mgn7xg/xkTfM6
# iMX2m14lKRMy2hr8dEVh/XdLf7loAN1jSE8/Wdt+PEaexolqxCM=
# =1GLE
# -END PGP SIGNATURE-
# gpg: Signature made Fri 11 Aug 2023 09:16:50 AM PDT
# gpg:using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:issuer "m...@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin " [undefined]
# gpg: aka "Michael S. Tsirkin " [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: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#  Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu:
  pci: Fix the update of interrupt disable bit in PCI_COMMAND register
  hw/pci-host: Allow extended config space access for Designware PCIe host

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/3944e93af06f...44e13cb441e0



[Qemu-commits] [qemu/qemu] 3944e9: Update version for v8.1.0-rc3 release

2023-08-11 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 3944e93af06f06eb07316e0bef46b007573e0309
  
https://github.com/qemu/qemu/commit/3944e93af06f06eb07316e0bef46b007573e0309
  Author: Richard Henderson 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M VERSION

  Log Message:
  ---
  Update version for v8.1.0-rc3 release

Signed-off-by: Richard Henderson 


  Commit: 3d449bc6030904ead784a4e4644c9640c2152796
  
https://github.com/qemu/qemu/commit/3d449bc6030904ead784a4e4644c9640c2152796
  Author: Jason Chien 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/pci-host/designware.c

  Log Message:
  ---
  hw/pci-host: Allow extended config space access for Designware PCIe host

In pcie_bus_realize(), a root bus is realized as a PCIe bus and a non-root
bus is realized as a PCIe bus if its parent bus is a PCIe bus. However,
the child bus "dw-pcie" is realized before the parent bus "pcie" which is
the root PCIe bus. Thus, the extended configuration space is not accessible
on "dw-pcie". The issue can be resolved by adding the
PCI_BUS_EXTENDED_CONFIG_SPACE flag to "pcie" before "dw-pcie" is realized.

Signed-off-by: Jason Chien 
Message-Id: <20230809102257.25121-1-jason.ch...@sifive.com>
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Michael S. Tsirkin 
Reviewed-by: Frank Chang 
Signed-off-by: Jason Chien mailto:jason.ch...@sifive.com; 
target="_blank">jason.ch...@sifive.com


  Commit: 0f936247e8ed0ab5fb7e75827dd8c8f73d5ef4b5
  
https://github.com/qemu/qemu/commit/0f936247e8ed0ab5fb7e75827dd8c8f73d5ef4b5
  Author: Guoyi Tu 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/pci/pci.c

  Log Message:
  ---
  pci: Fix the update of interrupt disable bit in PCI_COMMAND register

The PCI_COMMAND register is located at offset 4 within
the PCI configuration space and occupies 2 bytes. The
interrupt disable bit is at the 10th bit, which corresponds
to the byte at offset 5 in the PCI configuration space.

In our testing environment, the guest driver may directly
updates the byte at offset 5 in the PCI configuration space.
The backtrace looks like as following:
at hw/pci/pci.c:1442
at hw/virtio/virtio-pci.c:605
val=5, len=1) at hw/pci/pci_host.c:81

In this situation, the range_covers_byte function called
by the pci_default_write_config function will return false,
resulting in the inability to handle the interrupt disable
update event.

To fix this issue, we can use the ranges_overlap function
instead of range_covers_byte to determine whether the interrupt
bit has been updated.

Signed-off-by: Guoyi Tu 
Signed-off-by: yuanminghao 
Message-Id: 
Reviewed-by: Michael S. Tsirkin 
Signed-off-by: Michael S. Tsirkin 
Fixes: b6981cb57be5 ("pci: interrupt disable bit support")


  Commit: 44e13cb441e08cb4635914ca03d95a282fb70e5c
  
https://github.com/qemu/qemu/commit/44e13cb441e08cb4635914ca03d95a282fb70e5c
  Author: Richard Henderson 
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
M hw/pci-host/designware.c
M hw/pci/pci.c

  Log Message:
  ---
  Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu 
into staging

pci: last minute bugfixes

two fixes that seem very safe and important enough to sneak
in before the release.

Signed-off-by: Michael S. Tsirkin 

# -BEGIN PGP SIGNATURE-
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmTWXvIPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpe7sH/0KteOBt324LUYZ+4NR6EQE5KDsCANGiySBK
# r0B6lhcFHvNd2ej0g2hW7lL6nVVCQBkJLLzfNIR/aHkeCmOttfbhv4eF4S6Ho27d
# DpkXCPZRT6F11gY7G1swFapNS/f0P7F5LGRjq4sbuw3FpyHBz0DqCQ0GOab2Qorq
# VfuOfA01nYGNzHOKrEL7k9Io55oqPVcAe+5TaipNCQ4nW82i32ItTyFjQFdLIAay
# qY4HEwP9vPuVwWNdQjXJNfirLMO5GQfEbyKDAjap2sL25zAV2w+mgn7xg/xkTfM6
# iMX2m14lKRMy2hr8dEVh/XdLf7loAN1jSE8/Wdt+PEaexolqxCM=
# =1GLE
# -END PGP SIGNATURE-
# gpg: Signature made Fri 11 Aug 2023 09:16:50 AM PDT
# gpg:using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:issuer "m...@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin " [undefined]
# gpg: aka "Michael S. Tsirkin " [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: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#  Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu:
  pci: Fix the update of interrupt disable bit in PCI_COMMAND register
  hw/pci-host: Allow extended config space access for Designware PCIe host

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/70b73990d5e2...44e13cb441e0



[Qemu-commits] [qemu/qemu] 3944e9: Update version for v8.1.0-rc3 release

2023-08-10 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 3944e93af06f06eb07316e0bef46b007573e0309
  
https://github.com/qemu/qemu/commit/3944e93af06f06eb07316e0bef46b007573e0309
  Author: Richard Henderson 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M VERSION

  Log Message:
  ---
  Update version for v8.1.0-rc3 release

Signed-off-by: Richard Henderson 





[Qemu-commits] [qemu/qemu] 6a2c23: accel/tcg: Avoid reading too much in load_atom_{2, 4}

2023-08-10 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 6a2c23ddeb5bc8883c227ce1a3ff22e9978291af
  
https://github.com/qemu/qemu/commit/6a2c23ddeb5bc8883c227ce1a3ff22e9978291af
  Author: Richard Henderson 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M accel/tcg/ldst_atomicity.c.inc
M tests/tcg/aarch64/Makefile.target
A tests/tcg/aarch64/lse2-fault.c

  Log Message:
  ---
  accel/tcg: Avoid reading too much in load_atom_{2,4}

When load_atom_extract_al16_or_al8 is inexpensive, we want to use
it early, in order to avoid the overhead of required_atomicity.
However, we must not read past the end of the page.

If there are more than 8 bytes remaining, then both the "aligned 16"
and "aligned 8" paths align down so that the read has at least
16 bytes remaining on the page.

Reviewed-by: Peter Maydell 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: dad1036f43b55c68eb76e73ef771b252ec764b14
  
https://github.com/qemu/qemu/commit/dad1036f43b55c68eb76e73ef771b252ec764b14
  Author: Alex Bennée 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M tests/guest-debug/run-test.py

  Log Message:
  ---
  tests/tcg: ensure system-mode gdb tests start stopped

Without -S we run into potential races with tests starting before the
gdbstub attaches. We don't need to worry about user-mode as enabling
the gdbstub implies we wait for the initial connection.

Signed-off-by: Alex Bennée 
Reviewed-by: Richard Henderson 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20230810153640.1879717-7-alex.ben...@linaro.org>
Signed-off-by: Richard Henderson 


  Commit: 3869eb7eee6f6c00d51e8ce8fd71a769f3e0bf3e
  
https://github.com/qemu/qemu/commit/3869eb7eee6f6c00d51e8ce8fd71a769f3e0bf3e
  Author: Alex Bennée 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M gdbstub/gdbstub.c
M gdbstub/trace-events

  Log Message:
  ---
  gdbstub: more fixes for client Ctrl-C handling

The original fix caused problems with spurious characters on other
system emulation. So:

  - instead of spamming output make the warning a trace point
  - ensure we only allow a stop reply if it was 0x3

Suggested-by: Matheus Tavares Bernardino 
Signed-off-by: Alex Bennée 
Message-Id: 
<456ed3318421dd7946bdfb5ceda7e05332da368c.1690910333.git.quic_mathb...@quicinc.com>
Reviewed-by: Richard Henderson 
Tested-by: Richard Henderson 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20230810153640.1879717-8-alex.ben...@linaro.org>
Signed-off-by: Richard Henderson 


  Commit: f1b0f894c8c25f7ed24197ff130c7acb6b9fd6e7
  
https://github.com/qemu/qemu/commit/f1b0f894c8c25f7ed24197ff130c7acb6b9fd6e7
  Author: Alex Bennée 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M gdbstub/gdbstub.c

  Log Message:
  ---
  gdbstub: don't complain about preemptive ACK chars

When starting a remote connection GDB sends an '+':

  /* Ack any packet which the remote side has already sent.  */
  remote_serial_write ("+", 1);

which gets flagged as a garbage character in the gdbstub state
machine. As gdb does send it out lets be permissive about the handling
so we can better see real issues.

Signed-off-by: Alex Bennée 
Cc: gdb-patc...@sourceware.org
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20230810153640.1879717-9-alex.ben...@linaro.org>
Signed-off-by: Richard Henderson 


  Commit: 70b73990d5e2e8e1ce63274b6b85888bef2957aa
  
https://github.com/qemu/qemu/commit/70b73990d5e2e8e1ce63274b6b85888bef2957aa
  Author: Richard Henderson 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M accel/tcg/ldst_atomicity.c.inc
M gdbstub/gdbstub.c
M gdbstub/trace-events
M tests/guest-debug/run-test.py
M tests/tcg/aarch64/Makefile.target
A tests/tcg/aarch64/lse2-fault.c

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

accel/tcg: Avoid reading too much in load_atom_{2,4}
tests/tcg: ensure system-mode gdb tests start stopped
gdbstub: more fixes for client Ctrl-C handling

# -BEGIN PGP SIGNATURE-
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTVJ4EdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+/iAf9EUojONGO1FQCUokR
# +8kfHFaGH5R5U4v6Zd6xlwHt94iagW8s+DdpM/YdmgZFxQ5jglCCsLOXQYtJ/HPu
# McKRv86Yr264ysrwYzTuyOLIC585UU0KzYbGBQvjCSeQ43Au5bR/3ec35Lwgm7OO
# eukLdpmuD4QoSgBmVgkbziKH1zaX8NjgPoWGfFqxfzzWUZBfU4VfyLgGKw2gtqoz
# fMTORiqbnzSvQfYINNJ0qBTyXWm0YmydDzaK6zfBrsCzdMk3JYksxgneItvqgRar
# A5UAYUPhBPftIyTAnI3PQo+siyuaDhFRU9BwHb25a/pkuOUg8PBFO2HruseLmmdl
# bPcnhQ==
# =7c0w
# -END PGP SIGNATURE-
# gpg: Signature made Thu 10 Aug 2023 11:08:01 AM PDT
# gpg:using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:issuer "richard.hender...@linaro.org"
# gpg: Good signature from "Richard Henderson " 
[ultimate]

* tag 'pull-tcg-20230810' of https://gitlab.com/rth7680/qemu:
  gdbstub: don't 

[Qemu-commits] [qemu/qemu] 6a2c23: accel/tcg: Avoid reading too much in load_atom_{2, 4}

2023-08-10 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 6a2c23ddeb5bc8883c227ce1a3ff22e9978291af
  
https://github.com/qemu/qemu/commit/6a2c23ddeb5bc8883c227ce1a3ff22e9978291af
  Author: Richard Henderson 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M accel/tcg/ldst_atomicity.c.inc
M tests/tcg/aarch64/Makefile.target
A tests/tcg/aarch64/lse2-fault.c

  Log Message:
  ---
  accel/tcg: Avoid reading too much in load_atom_{2,4}

When load_atom_extract_al16_or_al8 is inexpensive, we want to use
it early, in order to avoid the overhead of required_atomicity.
However, we must not read past the end of the page.

If there are more than 8 bytes remaining, then both the "aligned 16"
and "aligned 8" paths align down so that the read has at least
16 bytes remaining on the page.

Reviewed-by: Peter Maydell 
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: dad1036f43b55c68eb76e73ef771b252ec764b14
  
https://github.com/qemu/qemu/commit/dad1036f43b55c68eb76e73ef771b252ec764b14
  Author: Alex Bennée 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M tests/guest-debug/run-test.py

  Log Message:
  ---
  tests/tcg: ensure system-mode gdb tests start stopped

Without -S we run into potential races with tests starting before the
gdbstub attaches. We don't need to worry about user-mode as enabling
the gdbstub implies we wait for the initial connection.

Signed-off-by: Alex Bennée 
Reviewed-by: Richard Henderson 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20230810153640.1879717-7-alex.ben...@linaro.org>
Signed-off-by: Richard Henderson 


  Commit: 3869eb7eee6f6c00d51e8ce8fd71a769f3e0bf3e
  
https://github.com/qemu/qemu/commit/3869eb7eee6f6c00d51e8ce8fd71a769f3e0bf3e
  Author: Alex Bennée 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M gdbstub/gdbstub.c
M gdbstub/trace-events

  Log Message:
  ---
  gdbstub: more fixes for client Ctrl-C handling

The original fix caused problems with spurious characters on other
system emulation. So:

  - instead of spamming output make the warning a trace point
  - ensure we only allow a stop reply if it was 0x3

Suggested-by: Matheus Tavares Bernardino 
Signed-off-by: Alex Bennée 
Message-Id: 
<456ed3318421dd7946bdfb5ceda7e05332da368c.1690910333.git.quic_mathb...@quicinc.com>
Reviewed-by: Richard Henderson 
Tested-by: Richard Henderson 
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20230810153640.1879717-8-alex.ben...@linaro.org>
Signed-off-by: Richard Henderson 


  Commit: f1b0f894c8c25f7ed24197ff130c7acb6b9fd6e7
  
https://github.com/qemu/qemu/commit/f1b0f894c8c25f7ed24197ff130c7acb6b9fd6e7
  Author: Alex Bennée 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M gdbstub/gdbstub.c

  Log Message:
  ---
  gdbstub: don't complain about preemptive ACK chars

When starting a remote connection GDB sends an '+':

  /* Ack any packet which the remote side has already sent.  */
  remote_serial_write ("+", 1);

which gets flagged as a garbage character in the gdbstub state
machine. As gdb does send it out lets be permissive about the handling
so we can better see real issues.

Signed-off-by: Alex Bennée 
Cc: gdb-patc...@sourceware.org
Reviewed-by: Philippe Mathieu-Daudé 
Message-Id: <20230810153640.1879717-9-alex.ben...@linaro.org>
Signed-off-by: Richard Henderson 


  Commit: 70b73990d5e2e8e1ce63274b6b85888bef2957aa
  
https://github.com/qemu/qemu/commit/70b73990d5e2e8e1ce63274b6b85888bef2957aa
  Author: Richard Henderson 
  Date:   2023-08-10 (Thu, 10 Aug 2023)

  Changed paths:
M accel/tcg/ldst_atomicity.c.inc
M gdbstub/gdbstub.c
M gdbstub/trace-events
M tests/guest-debug/run-test.py
M tests/tcg/aarch64/Makefile.target
A tests/tcg/aarch64/lse2-fault.c

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

accel/tcg: Avoid reading too much in load_atom_{2,4}
tests/tcg: ensure system-mode gdb tests start stopped
gdbstub: more fixes for client Ctrl-C handling

# -BEGIN PGP SIGNATURE-
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTVJ4EdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+/iAf9EUojONGO1FQCUokR
# +8kfHFaGH5R5U4v6Zd6xlwHt94iagW8s+DdpM/YdmgZFxQ5jglCCsLOXQYtJ/HPu
# McKRv86Yr264ysrwYzTuyOLIC585UU0KzYbGBQvjCSeQ43Au5bR/3ec35Lwgm7OO
# eukLdpmuD4QoSgBmVgkbziKH1zaX8NjgPoWGfFqxfzzWUZBfU4VfyLgGKw2gtqoz
# fMTORiqbnzSvQfYINNJ0qBTyXWm0YmydDzaK6zfBrsCzdMk3JYksxgneItvqgRar
# A5UAYUPhBPftIyTAnI3PQo+siyuaDhFRU9BwHb25a/pkuOUg8PBFO2HruseLmmdl
# bPcnhQ==
# =7c0w
# -END PGP SIGNATURE-
# gpg: Signature made Thu 10 Aug 2023 11:08:01 AM PDT
# gpg:using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:issuer "richard.hender...@linaro.org"
# gpg: Good signature from "Richard Henderson " 
[ultimate]

* tag 'pull-tcg-20230810' of https://gitlab.com/rth7680/qemu:
  gdbstub: don't 

[Qemu-commits] [qemu/qemu] 765fdc: target/openrisc: Set EPCR to next PC on FPE except...

2023-08-09 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 765fdc1e8355d4bae563b3b185c5f9d079384164
  
https://github.com/qemu/qemu/commit/765fdc1e8355d4bae563b3b185c5f9d079384164
  Author: Stafford Horne 
  Date:   2023-07-31 (Mon, 31 Jul 2023)

  Changed paths:
M target/openrisc/interrupt.c

  Log Message:
  ---
  target/openrisc: Set EPCR to next PC on FPE exceptions

The architecture specification calls for the EPCR to be set to "Address
of next not executed instruction" when there is a floating point
exception (FPE).  This was not being done, so fix it by using the same
pattern as syscall.  Also, we move this logic down to be done for
instructions not in the delay slot as called for by the architecture
manual.

Without this patch FPU exceptions will loop, as the exception handling
will always return back to the failed floating point instruction.

This was not noticed in earlier testing because:

 1. The compiler usually generates code which clobbers the input operand
such as:

  lf.div.s r19,r17,r19

 2. The target will store the operation output before to the register
before handling the exception.  So an operation such as:

  float a = 100.0f;
  float b = 0.0f;
  float c = a / b;/* lf.div.s r19,r17,r19 */

Will first execute:

  100 / 0-> Store inf to c (r19)
 -> triggering divide by zero exception
 -> handle and return

Then it will execute:

  100 / inf  -> Store 0 to c  (no exception)

To confirm the looping behavior and the fix I used the following:

float fpu_div(float a, float b) {
float c;
asm volatile("lf.div.s %0, %1, %2"
  : "+r" (c)
  : "r" (a), "r" (b));
return c;
}

Reviewed-by: Richard Henderson 
Signed-off-by: Stafford Horne 


  Commit: 64d3be986f9e2379bc688bf1d0aca0557e0035ca
  
https://github.com/qemu/qemu/commit/64d3be986f9e2379bc688bf1d0aca0557e0035ca
  Author: Richard Henderson 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M target/openrisc/interrupt.c

  Log Message:
  ---
  Merge tag 'or1k-pull-request-20230809' of https://github.com/stffrdhrn/qemu 
into staging

OpenRISC FPU Fix for 8.1

A patch to pass the correct exception address when handling floating
point exceptions.

# -BEGIN PGP SIGNATURE-
#
# iQIzBAABCAAdFiEE2cRzVK74bBA6Je/xw7McLV5mJ+QFAmTT95sACgkQw7McLV5m
# J+TV2g/8CTpOm2bvyFF0YmRhmTBit0kqyDcX1Shi8/2SMO4++CCpIp1mlaxdHZKe
# swdOqIqJeCl3+v+z4xN3ubNMis1Gac8DmXVpVmnUoocDS6m0zM3ly9kETKjYy2vn
# +GLGzOJ+GnPeQ2oApWwOyCqdCwSx2ZuIYK+FRKIx8T1pRm4Nb1gGP6nRKYAy0+C9
# aINdaQEZrFMKl8mlEuGcNmw5YDVvT6M9+KAMaNG0AzG8N9oMCo8VZpeY4z0qkZVp
# forksGucRoWVZ5JWl6kzcPAxxAf49olRx0njfbbUcUlyXtsVQpNhPPsdDGAE5gLu
# 8kHqtRG5OIJUvsZUaedHmJW9BsISnKqIhB7keG72xeBCYPqsKkzpWotq79I50hWY
# arTvAbyEwNCPEi1kpevveuGokoKsHKr/6yJRsA2VXM5AFhIy54DkLNz6Zh8W1OGA
# Nst45kSt7tQsTwxXHTHWGO6gRK/7ZtSr/afsEYZCz9vRUnb4UMeBBAuM9u0W+WYZ
# +hEZivQI7AEVuFbfzCTpw96jAPg4tpJ0JzC0o3Vh/EKIZahrPdzvmBlsV15geu4/
# xa5PBWRFpySLEO/6/I9XrIux8wjQ1NHOTC6NtJkH33tu9tJ9pfmyRs+jdUiNwWyd
# mMz0jvDUhjGaqUYSbXDvBLcSAIKbpXpnay2StSt0S/Enr08KU+o=
# =yZi9
# -END PGP SIGNATURE-
# gpg: Signature made Wed 09 Aug 2023 01:31:23 PM PDT
# gpg:using RSA key D9C47354AEF86C103A25EFF1C3B31C2D5E6627E4
# gpg: Good signature from "Stafford Horne " [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: D9C4 7354 AEF8 6C10 3A25  EFF1 C3B3 1C2D 5E66 27E4

* tag 'or1k-pull-request-20230809' of https://github.com/stffrdhrn/qemu:
  target/openrisc: Set EPCR to next PC on FPE exceptions

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/e53e2e2a1bfe...64d3be986f9e



[Qemu-commits] [qemu/qemu] 765fdc: target/openrisc: Set EPCR to next PC on FPE except...

2023-08-09 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 765fdc1e8355d4bae563b3b185c5f9d079384164
  
https://github.com/qemu/qemu/commit/765fdc1e8355d4bae563b3b185c5f9d079384164
  Author: Stafford Horne 
  Date:   2023-07-31 (Mon, 31 Jul 2023)

  Changed paths:
M target/openrisc/interrupt.c

  Log Message:
  ---
  target/openrisc: Set EPCR to next PC on FPE exceptions

The architecture specification calls for the EPCR to be set to "Address
of next not executed instruction" when there is a floating point
exception (FPE).  This was not being done, so fix it by using the same
pattern as syscall.  Also, we move this logic down to be done for
instructions not in the delay slot as called for by the architecture
manual.

Without this patch FPU exceptions will loop, as the exception handling
will always return back to the failed floating point instruction.

This was not noticed in earlier testing because:

 1. The compiler usually generates code which clobbers the input operand
such as:

  lf.div.s r19,r17,r19

 2. The target will store the operation output before to the register
before handling the exception.  So an operation such as:

  float a = 100.0f;
  float b = 0.0f;
  float c = a / b;/* lf.div.s r19,r17,r19 */

Will first execute:

  100 / 0-> Store inf to c (r19)
 -> triggering divide by zero exception
 -> handle and return

Then it will execute:

  100 / inf  -> Store 0 to c  (no exception)

To confirm the looping behavior and the fix I used the following:

float fpu_div(float a, float b) {
float c;
asm volatile("lf.div.s %0, %1, %2"
  : "+r" (c)
  : "r" (a), "r" (b));
return c;
}

Reviewed-by: Richard Henderson 
Signed-off-by: Stafford Horne 


  Commit: 64d3be986f9e2379bc688bf1d0aca0557e0035ca
  
https://github.com/qemu/qemu/commit/64d3be986f9e2379bc688bf1d0aca0557e0035ca
  Author: Richard Henderson 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M target/openrisc/interrupt.c

  Log Message:
  ---
  Merge tag 'or1k-pull-request-20230809' of https://github.com/stffrdhrn/qemu 
into staging

OpenRISC FPU Fix for 8.1

A patch to pass the correct exception address when handling floating
point exceptions.

# -BEGIN PGP SIGNATURE-
#
# iQIzBAABCAAdFiEE2cRzVK74bBA6Je/xw7McLV5mJ+QFAmTT95sACgkQw7McLV5m
# J+TV2g/8CTpOm2bvyFF0YmRhmTBit0kqyDcX1Shi8/2SMO4++CCpIp1mlaxdHZKe
# swdOqIqJeCl3+v+z4xN3ubNMis1Gac8DmXVpVmnUoocDS6m0zM3ly9kETKjYy2vn
# +GLGzOJ+GnPeQ2oApWwOyCqdCwSx2ZuIYK+FRKIx8T1pRm4Nb1gGP6nRKYAy0+C9
# aINdaQEZrFMKl8mlEuGcNmw5YDVvT6M9+KAMaNG0AzG8N9oMCo8VZpeY4z0qkZVp
# forksGucRoWVZ5JWl6kzcPAxxAf49olRx0njfbbUcUlyXtsVQpNhPPsdDGAE5gLu
# 8kHqtRG5OIJUvsZUaedHmJW9BsISnKqIhB7keG72xeBCYPqsKkzpWotq79I50hWY
# arTvAbyEwNCPEi1kpevveuGokoKsHKr/6yJRsA2VXM5AFhIy54DkLNz6Zh8W1OGA
# Nst45kSt7tQsTwxXHTHWGO6gRK/7ZtSr/afsEYZCz9vRUnb4UMeBBAuM9u0W+WYZ
# +hEZivQI7AEVuFbfzCTpw96jAPg4tpJ0JzC0o3Vh/EKIZahrPdzvmBlsV15geu4/
# xa5PBWRFpySLEO/6/I9XrIux8wjQ1NHOTC6NtJkH33tu9tJ9pfmyRs+jdUiNwWyd
# mMz0jvDUhjGaqUYSbXDvBLcSAIKbpXpnay2StSt0S/Enr08KU+o=
# =yZi9
# -END PGP SIGNATURE-
# gpg: Signature made Wed 09 Aug 2023 01:31:23 PM PDT
# gpg:using RSA key D9C47354AEF86C103A25EFF1C3B31C2D5E6627E4
# gpg: Good signature from "Stafford Horne " [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: D9C4 7354 AEF8 6C10 3A25  EFF1 C3B3 1C2D 5E66 27E4

* tag 'or1k-pull-request-20230809' of https://github.com/stffrdhrn/qemu:
  target/openrisc: Set EPCR to next PC on FPE exceptions

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/e53e2e2a1bfe...64d3be986f9e



[Qemu-commits] [qemu/qemu] c42e77: qemu/osdep: Remove fallback for MAP_FIXED_NOREPLACE

2023-08-09 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c42e77a90d9244c8caf76fe0e54f84200430a4e1
  
https://github.com/qemu/qemu/commit/c42e77a90d9244c8caf76fe0e54f84200430a4e1
  Author: Richard Henderson 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M include/qemu/osdep.h

  Log Message:
  ---
  qemu/osdep: Remove fallback for MAP_FIXED_NOREPLACE

In order for our emulation of MAP_FIXED_NOREPLACE to succeed within
linux-user target_mmap, we require a non-zero value.  This does not
require host kernel support, merely the bit being defined.

MAP_FIXED_NOREPLACE was added with glibc 2.28.  From repology.org:

  Fedora 36: 2.35
  CentOS 8 (RHEL-8): 2.28
  Debian 11: 2.31
 OpenSUSE Leap 15.4: 2.31
   Ubuntu LTS 20.04: 2.31

Reported-by: Akihiko Odaki 
Reviewed-by: Akihiko Odaki 
Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 
Message-Id: <20230808164418.69989-1-richard.hender...@linaro.org>


  Commit: 6c8f8456cb0b239812dee5211881426496da7b98
  
https://github.com/qemu/qemu/commit/6c8f8456cb0b239812dee5211881426496da7b98
  Author: Klaus Jensen 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c

  Log Message:
  ---
  hw/nvme: fix null pointer access in directive receive

nvme_directive_receive() does not check if an endurance group has been
configured (set) prior to testing if flexible data placement is enabled
or not.

Fix this.

Cc: qemu-sta...@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1815
Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation")
Reviewed-by: Jesper Wendel Devantier 
Signed-off-by: Klaus Jensen 


  Commit: 3439ba9c5da943d96f7a3c86e0a7eb2ff48de41c
  
https://github.com/qemu/qemu/commit/3439ba9c5da943d96f7a3c86e0a7eb2ff48de41c
  Author: Klaus Jensen 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c

  Log Message:
  ---
  hw/nvme: fix null pointer access in ruh update

The Reclaim Unit Update operation in I/O Management Receive does not
verify the presence of a configured endurance group prior to accessing
it.

Fix this.

Cc: qemu-sta...@nongnu.org
Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation")
Reviewed-by: Jesper Wendel Devantier 
Signed-off-by: Klaus Jensen 


  Commit: 9ab8d0714964abce6f5b8bcac49d6239c548ed12
  
https://github.com/qemu/qemu/commit/9ab8d0714964abce6f5b8bcac49d6239c548ed12
  Author: Richard Henderson 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: Split out do_mmap

New function that rejects unsupported map types and flags.
In 4b840f96 we should not have accepted MAP_SHARED_VALIDATE
without actually validating the rest of the flags.

Fixes: 4b840f96 ("linux-user: Populate more bits in mmap_flags_tbl")
Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 


  Commit: a05cee93f4052179c036789c5a246948dcc362f0
  
https://github.com/qemu/qemu/commit/a05cee93f4052179c036789c5a246948dcc362f0
  Author: Richard Henderson 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M bsd-user/syscall_defs.h
M include/exec/user/thunk.h
M linux-user/syscall.c
M linux-user/thunk.c

  Log Message:
  ---
  linux-user: Use ARRAY_SIZE with bitmask_transtbl

Rather than using a zero tuple to end the table, use a macro
to apply ARRAY_SIZE and pass that on to the convert functions.

This fixes two bugs in which the conversion functions required
that both the target and host masks be non-zero in order to
continue, rather than require both target and host masks be
zero in order to terminate.

This affected mmap_flags_tbl when the host does not support
all of the flags we wish to convert (e.g. MAP_UNINITIALIZED).
Mapping these flags to zero is good enough, and matches how
the kernel ignores bits that are unknown.

Fixes: 4b840f96 ("linux-user: Populate more bits in mmap_flags_tbl")
Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 


  Commit: 1b65895ddd9bb3898458ec622f5550173f9a8550
  
https://github.com/qemu/qemu/commit/1b65895ddd9bb3898458ec622f5550173f9a8550
  Author: Richard Henderson 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M tests/tcg/multiarch/gdbstub/test-proc-mappings.py

  Log Message:
  ---
  tests/tcg: Disable filename test for info proc mappings

This test fails when host page size != guest page size,
because qemu may not be able to directly map the file.

Fixes: a6341482695 ("tests/tcg: Add a test for info proc mappings")
Acked-by: Ilya Leoshkevich 
Signed-off-by: Richard Henderson 


  Commit: 47d1e982318a0d97c557ce349ea9e2b601554055
  
https://github.com/qemu/qemu/commit/47d1e982318a0d97c557ce349ea9e2b601554055
  Author: Helge Deller 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M util/interval-tree.c

  Log Message:
  ---
  

[Qemu-commits] [qemu/qemu] c42e77: qemu/osdep: Remove fallback for MAP_FIXED_NOREPLACE

2023-08-09 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: c42e77a90d9244c8caf76fe0e54f84200430a4e1
  
https://github.com/qemu/qemu/commit/c42e77a90d9244c8caf76fe0e54f84200430a4e1
  Author: Richard Henderson 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M include/qemu/osdep.h

  Log Message:
  ---
  qemu/osdep: Remove fallback for MAP_FIXED_NOREPLACE

In order for our emulation of MAP_FIXED_NOREPLACE to succeed within
linux-user target_mmap, we require a non-zero value.  This does not
require host kernel support, merely the bit being defined.

MAP_FIXED_NOREPLACE was added with glibc 2.28.  From repology.org:

  Fedora 36: 2.35
  CentOS 8 (RHEL-8): 2.28
  Debian 11: 2.31
 OpenSUSE Leap 15.4: 2.31
   Ubuntu LTS 20.04: 2.31

Reported-by: Akihiko Odaki 
Reviewed-by: Akihiko Odaki 
Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 
Message-Id: <20230808164418.69989-1-richard.hender...@linaro.org>


  Commit: 6c8f8456cb0b239812dee5211881426496da7b98
  
https://github.com/qemu/qemu/commit/6c8f8456cb0b239812dee5211881426496da7b98
  Author: Klaus Jensen 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c

  Log Message:
  ---
  hw/nvme: fix null pointer access in directive receive

nvme_directive_receive() does not check if an endurance group has been
configured (set) prior to testing if flexible data placement is enabled
or not.

Fix this.

Cc: qemu-sta...@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1815
Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation")
Reviewed-by: Jesper Wendel Devantier 
Signed-off-by: Klaus Jensen 


  Commit: 3439ba9c5da943d96f7a3c86e0a7eb2ff48de41c
  
https://github.com/qemu/qemu/commit/3439ba9c5da943d96f7a3c86e0a7eb2ff48de41c
  Author: Klaus Jensen 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c

  Log Message:
  ---
  hw/nvme: fix null pointer access in ruh update

The Reclaim Unit Update operation in I/O Management Receive does not
verify the presence of a configured endurance group prior to accessing
it.

Fix this.

Cc: qemu-sta...@nongnu.org
Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation")
Reviewed-by: Jesper Wendel Devantier 
Signed-off-by: Klaus Jensen 


  Commit: 9ab8d0714964abce6f5b8bcac49d6239c548ed12
  
https://github.com/qemu/qemu/commit/9ab8d0714964abce6f5b8bcac49d6239c548ed12
  Author: Richard Henderson 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M linux-user/syscall.c

  Log Message:
  ---
  linux-user: Split out do_mmap

New function that rejects unsupported map types and flags.
In 4b840f96 we should not have accepted MAP_SHARED_VALIDATE
without actually validating the rest of the flags.

Fixes: 4b840f96 ("linux-user: Populate more bits in mmap_flags_tbl")
Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 


  Commit: a05cee93f4052179c036789c5a246948dcc362f0
  
https://github.com/qemu/qemu/commit/a05cee93f4052179c036789c5a246948dcc362f0
  Author: Richard Henderson 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M bsd-user/syscall_defs.h
M include/exec/user/thunk.h
M linux-user/syscall.c
M linux-user/thunk.c

  Log Message:
  ---
  linux-user: Use ARRAY_SIZE with bitmask_transtbl

Rather than using a zero tuple to end the table, use a macro
to apply ARRAY_SIZE and pass that on to the convert functions.

This fixes two bugs in which the conversion functions required
that both the target and host masks be non-zero in order to
continue, rather than require both target and host masks be
zero in order to terminate.

This affected mmap_flags_tbl when the host does not support
all of the flags we wish to convert (e.g. MAP_UNINITIALIZED).
Mapping these flags to zero is good enough, and matches how
the kernel ignores bits that are unknown.

Fixes: 4b840f96 ("linux-user: Populate more bits in mmap_flags_tbl")
Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 


  Commit: 1b65895ddd9bb3898458ec622f5550173f9a8550
  
https://github.com/qemu/qemu/commit/1b65895ddd9bb3898458ec622f5550173f9a8550
  Author: Richard Henderson 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M tests/tcg/multiarch/gdbstub/test-proc-mappings.py

  Log Message:
  ---
  tests/tcg: Disable filename test for info proc mappings

This test fails when host page size != guest page size,
because qemu may not be able to directly map the file.

Fixes: a6341482695 ("tests/tcg: Add a test for info proc mappings")
Acked-by: Ilya Leoshkevich 
Signed-off-by: Richard Henderson 


  Commit: 47d1e982318a0d97c557ce349ea9e2b601554055
  
https://github.com/qemu/qemu/commit/47d1e982318a0d97c557ce349ea9e2b601554055
  Author: Helge Deller 
  Date:   2023-08-09 (Wed, 09 Aug 2023)

  Changed paths:
M util/interval-tree.c

  Log Message:
  ---
  

[Qemu-commits] [qemu/qemu] dbdb13: hw/nvme: fix CRC64 for guard tag

2023-08-08 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: dbdb13f931d7cf2d3c3ca662e751bb1551e9eab6
  
https://github.com/qemu/qemu/commit/dbdb13f931d7cf2d3c3ca662e751bb1551e9eab6
  Author: Ankit Kumar 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M hw/nvme/dif.c

  Log Message:
  ---
  hw/nvme: fix CRC64 for guard tag

The nvme CRC64 generator expects the caller to pass inverted seed value.
Pass inverted crc value for metadata buffer.

Cc: qemu-sta...@nongnu.org
Fixes: 44219b6029fc ("hw/nvme: 64-bit pi support")
Signed-off-by: Ankit Kumar 
Signed-off-by: Klaus Jensen 


  Commit: ec5a138ce63ce460575a44cf9ec3172c33eb0fd6
  
https://github.com/qemu/qemu/commit/ec5a138ce63ce460575a44cf9ec3172c33eb0fd6
  Author: Ankit Kumar 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M docs/system/devices/nvme.rst

  Log Message:
  ---
  docs: update hw/nvme documentation for protection information

Add missing entry for pif ("protection information format").
Protection information size can be 8 or 16 bytes, Update the pil entry
as per the NVM command set specification.

Signed-off-by: Ankit Kumar 
Signed-off-by: Klaus Jensen 


  Commit: a8fc5165aab02f328ccd148aafec1e59fd1426eb
  
https://github.com/qemu/qemu/commit/a8fc5165aab02f328ccd148aafec1e59fd1426eb
  Author: Richard Henderson 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M docs/system/devices/nvme.rst
M hw/nvme/dif.c

  Log Message:
  ---
  Merge tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu into 
staging

hw/nvme fixes

- fix for invalid protection information calculation

# -BEGIN PGP SIGNATURE-
#
# iQEzBAABCgAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmTSREoACgkQTeGvMW1P
# DekH6Qf/e3gi0KloAUpbTQvGmBA6XmkJFAtOdZn7IJXVCowjYTIKU84DrdPyT1c1
# rofL4w0klKG5c4Or/Cs4dH/ASxTWaQZRlFAYxsTW3nUX74MnaFDRZcN2geb30ws7
# ryejVEKeHNWH/YYY4Ny55wO3tmy2ILAKnbiadiXhj4dQfCK1GzZnrx10PWxLNlkZ
# KRhiXLNBHpPnDlrLq7/nLs+/0cMrrqEz6ISm/Ju4iUczAH/wmqEbR/yD3pAwmH07
# PCaSeegOpwscovI5TWRelOJlzIXb6D8Xk9d3dGL5x/eeN7GlkgERX4MAcNYKwe8T
# JNR8y2ErTEj2nLU/juES1EpiR2gYKw==
# =vJlA
# -END PGP SIGNATURE-
# gpg: Signature made Tue 08 Aug 2023 06:34:02 AM PDT
# gpg:using RSA key 522833AA75E2DCE6A24766C04DE1AF316D4F0DE9
# gpg: Good signature from "Klaus Jensen " [unknown]
# gpg: aka "Klaus Jensen " [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: DDCA 4D9C 9EF9 31CC 3468  4272 63D5 6FC5 E55D A838
#  Subkey fingerprint: 5228 33AA 75E2 DCE6 A247  66C0 4DE1 AF31 6D4F 0DE9

* tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu:
  docs: update hw/nvme documentation for protection information
  hw/nvme: fix CRC64 for guard tag

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/32e07fddc6d9...a8fc5165aab0



[Qemu-commits] [qemu/qemu] dbdb13: hw/nvme: fix CRC64 for guard tag

2023-08-08 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: dbdb13f931d7cf2d3c3ca662e751bb1551e9eab6
  
https://github.com/qemu/qemu/commit/dbdb13f931d7cf2d3c3ca662e751bb1551e9eab6
  Author: Ankit Kumar 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M hw/nvme/dif.c

  Log Message:
  ---
  hw/nvme: fix CRC64 for guard tag

The nvme CRC64 generator expects the caller to pass inverted seed value.
Pass inverted crc value for metadata buffer.

Cc: qemu-sta...@nongnu.org
Fixes: 44219b6029fc ("hw/nvme: 64-bit pi support")
Signed-off-by: Ankit Kumar 
Signed-off-by: Klaus Jensen 


  Commit: ec5a138ce63ce460575a44cf9ec3172c33eb0fd6
  
https://github.com/qemu/qemu/commit/ec5a138ce63ce460575a44cf9ec3172c33eb0fd6
  Author: Ankit Kumar 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M docs/system/devices/nvme.rst

  Log Message:
  ---
  docs: update hw/nvme documentation for protection information

Add missing entry for pif ("protection information format").
Protection information size can be 8 or 16 bytes, Update the pil entry
as per the NVM command set specification.

Signed-off-by: Ankit Kumar 
Signed-off-by: Klaus Jensen 


  Commit: a8fc5165aab02f328ccd148aafec1e59fd1426eb
  
https://github.com/qemu/qemu/commit/a8fc5165aab02f328ccd148aafec1e59fd1426eb
  Author: Richard Henderson 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M docs/system/devices/nvme.rst
M hw/nvme/dif.c

  Log Message:
  ---
  Merge tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu into 
staging

hw/nvme fixes

- fix for invalid protection information calculation

# -BEGIN PGP SIGNATURE-
#
# iQEzBAABCgAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmTSREoACgkQTeGvMW1P
# DekH6Qf/e3gi0KloAUpbTQvGmBA6XmkJFAtOdZn7IJXVCowjYTIKU84DrdPyT1c1
# rofL4w0klKG5c4Or/Cs4dH/ASxTWaQZRlFAYxsTW3nUX74MnaFDRZcN2geb30ws7
# ryejVEKeHNWH/YYY4Ny55wO3tmy2ILAKnbiadiXhj4dQfCK1GzZnrx10PWxLNlkZ
# KRhiXLNBHpPnDlrLq7/nLs+/0cMrrqEz6ISm/Ju4iUczAH/wmqEbR/yD3pAwmH07
# PCaSeegOpwscovI5TWRelOJlzIXb6D8Xk9d3dGL5x/eeN7GlkgERX4MAcNYKwe8T
# JNR8y2ErTEj2nLU/juES1EpiR2gYKw==
# =vJlA
# -END PGP SIGNATURE-
# gpg: Signature made Tue 08 Aug 2023 06:34:02 AM PDT
# gpg:using RSA key 522833AA75E2DCE6A24766C04DE1AF316D4F0DE9
# gpg: Good signature from "Klaus Jensen " [unknown]
# gpg: aka "Klaus Jensen " [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: DDCA 4D9C 9EF9 31CC 3468  4272 63D5 6FC5 E55D A838
#  Subkey fingerprint: 5228 33AA 75E2 DCE6 A247  66C0 4DE1 AF31 6D4F 0DE9

* tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu:
  docs: update hw/nvme documentation for protection information
  hw/nvme: fix CRC64 for guard tag

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/32e07fddc6d9...a8fc5165aab0



[Qemu-commits] [qemu/qemu] f14082: configure: fix detection for x32 linux-user

2023-08-08 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: f140823c5644807d850d01a3f5b61a0fe5ef53f2
  
https://github.com/qemu/qemu/commit/f140823c5644807d850d01a3f5b61a0fe5ef53f2
  Author: Paolo Bonzini 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M configure
R linux-user/include/host/x32/host-signal.h

  Log Message:
  ---
  configure: fix detection for x32 linux-user

x32 uses the same signal handling fragments as x86_64, since host_arch
is set to x86_64 when Meson runs.  Remove the unnecessary forwarder and
set the host_arch variable properly in configure.

Reviewed-by: Richard Henderson 
Acked-by: Ilya Leoshkevich 
Reviewed-by: Michael Tokarev 
Tested-by: Ilya Leoshkevich 
Tested-by: Michael Tokarev 
Message-ID: <20230808120303.585509-2-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 50a001222737ca04feb77f9117a623b91d61f2cd
  
https://github.com/qemu/qemu/commit/50a001222737ca04feb77f9117a623b91d61f2cd
  Author: Paolo Bonzini 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
R linux-user/include/host/alpha/host-signal.h
R linux-user/include/host/s390/host-signal.h
M linux-user/include/host/s390x/host-signal.h

  Log Message:
  ---
  linux-user: cleanup unused linux-user/include/host directories

Alpha and 31-bit s390 lack the assembly fragment to handle signals
occurring at the same time as system calls, so they cannot run
linux-user emulation anymore.  Drop the host-signal.h files for
them.

Signed-off-by: Paolo Bonzini 
Acked-by: Ilya Leoshkevich 
Reviewed-by: Michael Tokarev 
Tested-by: Ilya Leoshkevich 
Tested-by: Michael Tokarev 
Message-ID: <20230808120303.585509-3-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 971fac2731e60f2143f35648b14fd2f1b5b2c1af
  
https://github.com/qemu/qemu/commit/971fac2731e60f2143f35648b14fd2f1b5b2c1af
  Author: Paolo Bonzini 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M configure

  Log Message:
  ---
  configure: unify case statements for CPU canonicalization

The CPU model has to be canonicalized to what Meson wants in the cross
file, to what Linux uses for its asm-$ARCH directories, and to what
QEMU uses for its user-mode emulation host/$ARCH directories.  Do
all three in a single case statement, and check that the Linux and
QEMU directories actually exist.

At a small cost in repeated lines, this ensures that there are no hidden
ordering requirements between the case statements.  In particular, commit
89e5b7935e9 ("configure: Fix linux-user host detection for riscv64",
2023-08-06) broke ppc64le because it assigned host_arch based on a
non-canonicalized version of $cpu.

Reported-by: Joel Stanley 
Fixes: 89e5b7935e9 ("configure: Fix linux-user host detection for riscv64", 
2023-08-06)
Reviewed-by: Richard Henderson 
Acked-by: Ilya Leoshkevich 
Reviewed-by: Michael Tokarev 
Tested-by: Ilya Leoshkevich 
Tested-by: Michael Tokarev 
Message-ID: <20230808120303.585509-4-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: c8fb5cf97da11af11def1e910920c9ead03c304a
  
https://github.com/qemu/qemu/commit/c8fb5cf97da11af11def1e910920c9ead03c304a
  Author: Richard Henderson 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M linux-user/main.c
M linux-user/mmap.c
M linux-user/user-mmap.h

  Log Message:
  ---
  linux-user: Adjust task_unmapped_base for reserved_va

Ensure that the chosen values for mmap_next_start and
task_unmapped_base are within the guest address space.

Tested-by: Helge Deller 
Reviewed-by: Akihiko Odaki 
Signed-off-by: Richard Henderson 


  Commit: 2d708164e0475064e0e2167bd73e8570e22df1e0
  
https://github.com/qemu/qemu/commit/2d708164e0475064e0e2167bd73e8570e22df1e0
  Author: Richard Henderson 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M linux-user/aarch64/target_mman.h
M linux-user/alpha/target_mman.h
M linux-user/arm/target_mman.h
M linux-user/cris/target_mman.h
M linux-user/hexagon/target_mman.h
M linux-user/hppa/target_mman.h
M linux-user/i386/target_mman.h
M linux-user/loongarch64/target_mman.h
M linux-user/m68k/target_mman.h
M linux-user/microblaze/target_mman.h
M linux-user/mips/target_mman.h
M linux-user/nios2/target_mman.h
M linux-user/openrisc/target_mman.h
M linux-user/ppc/target_mman.h
M linux-user/riscv/target_mman.h
M linux-user/s390x/target_mman.h
M linux-user/sh4/target_mman.h
M linux-user/sparc/target_mman.h
M linux-user/user-mmap.h
M linux-user/x86_64/target_mman.h
M linux-user/xtensa/target_mman.h

  Log Message:
  ---
  linux-user: Define TASK_UNMAPPED_BASE in $guest/target_mman.h

Provide default values that are as close as possible to the
values used by the guest's kernel.

Tested-by: Helge Deller 
Reviewed-by: Helge Deller 
Reviewed-by: Akihiko Odaki 
Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 


  Commit: 

[Qemu-commits] [qemu/qemu] f14082: configure: fix detection for x32 linux-user

2023-08-08 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f140823c5644807d850d01a3f5b61a0fe5ef53f2
  
https://github.com/qemu/qemu/commit/f140823c5644807d850d01a3f5b61a0fe5ef53f2
  Author: Paolo Bonzini 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M configure
R linux-user/include/host/x32/host-signal.h

  Log Message:
  ---
  configure: fix detection for x32 linux-user

x32 uses the same signal handling fragments as x86_64, since host_arch
is set to x86_64 when Meson runs.  Remove the unnecessary forwarder and
set the host_arch variable properly in configure.

Reviewed-by: Richard Henderson 
Acked-by: Ilya Leoshkevich 
Reviewed-by: Michael Tokarev 
Tested-by: Ilya Leoshkevich 
Tested-by: Michael Tokarev 
Message-ID: <20230808120303.585509-2-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 50a001222737ca04feb77f9117a623b91d61f2cd
  
https://github.com/qemu/qemu/commit/50a001222737ca04feb77f9117a623b91d61f2cd
  Author: Paolo Bonzini 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
R linux-user/include/host/alpha/host-signal.h
R linux-user/include/host/s390/host-signal.h
M linux-user/include/host/s390x/host-signal.h

  Log Message:
  ---
  linux-user: cleanup unused linux-user/include/host directories

Alpha and 31-bit s390 lack the assembly fragment to handle signals
occurring at the same time as system calls, so they cannot run
linux-user emulation anymore.  Drop the host-signal.h files for
them.

Signed-off-by: Paolo Bonzini 
Acked-by: Ilya Leoshkevich 
Reviewed-by: Michael Tokarev 
Tested-by: Ilya Leoshkevich 
Tested-by: Michael Tokarev 
Message-ID: <20230808120303.585509-3-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: 971fac2731e60f2143f35648b14fd2f1b5b2c1af
  
https://github.com/qemu/qemu/commit/971fac2731e60f2143f35648b14fd2f1b5b2c1af
  Author: Paolo Bonzini 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M configure

  Log Message:
  ---
  configure: unify case statements for CPU canonicalization

The CPU model has to be canonicalized to what Meson wants in the cross
file, to what Linux uses for its asm-$ARCH directories, and to what
QEMU uses for its user-mode emulation host/$ARCH directories.  Do
all three in a single case statement, and check that the Linux and
QEMU directories actually exist.

At a small cost in repeated lines, this ensures that there are no hidden
ordering requirements between the case statements.  In particular, commit
89e5b7935e9 ("configure: Fix linux-user host detection for riscv64",
2023-08-06) broke ppc64le because it assigned host_arch based on a
non-canonicalized version of $cpu.

Reported-by: Joel Stanley 
Fixes: 89e5b7935e9 ("configure: Fix linux-user host detection for riscv64", 
2023-08-06)
Reviewed-by: Richard Henderson 
Acked-by: Ilya Leoshkevich 
Reviewed-by: Michael Tokarev 
Tested-by: Ilya Leoshkevich 
Tested-by: Michael Tokarev 
Message-ID: <20230808120303.585509-4-pbonz...@redhat.com>
Signed-off-by: Paolo Bonzini 


  Commit: c8fb5cf97da11af11def1e910920c9ead03c304a
  
https://github.com/qemu/qemu/commit/c8fb5cf97da11af11def1e910920c9ead03c304a
  Author: Richard Henderson 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M linux-user/main.c
M linux-user/mmap.c
M linux-user/user-mmap.h

  Log Message:
  ---
  linux-user: Adjust task_unmapped_base for reserved_va

Ensure that the chosen values for mmap_next_start and
task_unmapped_base are within the guest address space.

Tested-by: Helge Deller 
Reviewed-by: Akihiko Odaki 
Signed-off-by: Richard Henderson 


  Commit: 2d708164e0475064e0e2167bd73e8570e22df1e0
  
https://github.com/qemu/qemu/commit/2d708164e0475064e0e2167bd73e8570e22df1e0
  Author: Richard Henderson 
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
M linux-user/aarch64/target_mman.h
M linux-user/alpha/target_mman.h
M linux-user/arm/target_mman.h
M linux-user/cris/target_mman.h
M linux-user/hexagon/target_mman.h
M linux-user/hppa/target_mman.h
M linux-user/i386/target_mman.h
M linux-user/loongarch64/target_mman.h
M linux-user/m68k/target_mman.h
M linux-user/microblaze/target_mman.h
M linux-user/mips/target_mman.h
M linux-user/nios2/target_mman.h
M linux-user/openrisc/target_mman.h
M linux-user/ppc/target_mman.h
M linux-user/riscv/target_mman.h
M linux-user/s390x/target_mman.h
M linux-user/sh4/target_mman.h
M linux-user/sparc/target_mman.h
M linux-user/user-mmap.h
M linux-user/x86_64/target_mman.h
M linux-user/xtensa/target_mman.h

  Log Message:
  ---
  linux-user: Define TASK_UNMAPPED_BASE in $guest/target_mman.h

Provide default values that are as close as possible to the
values used by the guest's kernel.

Tested-by: Helge Deller 
Reviewed-by: Helge Deller 
Reviewed-by: Akihiko Odaki 
Reviewed-by: Alex Bennée 
Signed-off-by: Richard Henderson 


  Commit: 

[Qemu-commits] [qemu/qemu] 8ada21: hw/i2c: Fix bitbang_i2c_data trace event

2023-08-07 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 8ada214a902225c90583b644cabd85bc89bf188c
  
https://github.com/qemu/qemu/commit/8ada214a902225c90583b644cabd85bc89bf188c
  Author: BALATON Zoltan 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/i2c/bitbang_i2c.c
M hw/i2c/trace-events

  Log Message:
  ---
  hw/i2c: Fix bitbang_i2c_data trace event

The clock and data values were logged swapped. Correct the trace event
text to match what is logged. Also fix a typo in a comment nearby.

Signed-off-by: BALATON Zoltan 
Signed-off-by: Michael Tokarev 


  Commit: beb1a91781f127c863740c94f865fa55a22e5c81
  
https://github.com/qemu/qemu/commit/beb1a91781f127c863740c94f865fa55a22e5c81
  Author: Michael Tokarev 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M stubs/colo.c

  Log Message:
  ---
  stubs/colo.c: spelling

Signed-off-by: Michael Tokarev 


  Commit: 6ee960823da8fd780ae9912c4327b7e85e80d846
  
https://github.com/qemu/qemu/commit/6ee960823da8fd780ae9912c4327b7e85e80d846
  Author: Luca Bonissi 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M include/exec/user/abitypes.h

  Log Message:
  ---
  Fixed incorrect LLONG alignment for openrisc and cris

OpenRISC (or1k) has long long alignment to 4 bytes, but currently not
defined in abitypes.h. This lead to incorrect packing of /epoll_event/
structure and eventually infinite loop while waiting for file
descriptor[s] event[s].

Fixed also CRIS alignments (1 byte for all types).

Signed-off-by: Luca Bonissi 
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1770
Reviewed-by: Thomas Huth 
Signed-off-by: Michael Tokarev 


  Commit: 81cd34a359a36656d2f6542226235bd318ff8873
  
https://github.com/qemu/qemu/commit/81cd34a359a36656d2f6542226235bd318ff8873
  Author: Marc-André Lureau 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M chardev/char-socket.c

  Log Message:
  ---
  chardev: report the handshake error

This can help to debug connection issues.

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=2196182

Signed-off-by: Marc-André Lureau 
Reviewed-by: Daniel P. Berrangé 
Message-Id: <20230510072531.3937189-1-marcandre.lur...@redhat.com>


  Commit: 957d77863e4564454eb97f8f371096843daf4678
  
https://github.com/qemu/qemu/commit/957d77863e4564454eb97f8f371096843daf4678
  Author: Marc-André Lureau 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/display/virtio-gpu-base.c
M hw/display/virtio-gpu.c
M include/hw/virtio/virtio-gpu.h

  Log Message:
  ---
  virtio-gpu: free BHs, by implementing unrealize

Acked-by: Dongwon Kim 
Signed-off-by: Marc-André Lureau 
Message-Id: <20230726173929.690601-2-marcandre.lur...@redhat.com>


  Commit: a41e2d97f92b48552988b3cc62dce79d62f60dcc
  
https://github.com/qemu/qemu/commit/a41e2d97f92b48552988b3cc62dce79d62f60dcc
  Author: Marc-André Lureau 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/display/virtio-gpu.c
M include/hw/virtio/virtio-gpu.h

  Log Message:
  ---
  virtio-gpu: reset gfx resources in main thread

Calling OpenGL from different threads can have bad consequences if not
carefully reviewed. It's not generally supported. In my case, I was
debugging a crash in glDeleteTextures from OPENGL32.DLL, where I asked
qemu for gl=es, and thus ANGLE implementation was expected. libepoxy did
resolution of the global pointer for glGenTexture to the GLES version
from the main thread. But it resolved glDeleteTextures to the GL
version, because it was done from a different thread without correct
context. Oops.

Let's stick to the main thread for GL calls by using a BH.

Note: I didn't use atomics for reset_finished check, assuming the BQL
will provide enough of sync, but I might be wrong.

Acked-by: Dongwon Kim 
Signed-off-by: Marc-André Lureau 
Message-Id: <20230726173929.690601-3-marcandre.lur...@redhat.com>


  Commit: 8a64609eea8cb2bac015968c4b62da5bce266e22
  
https://github.com/qemu/qemu/commit/8a64609eea8cb2bac015968c4b62da5bce266e22
  Author: Dongli Zhang 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M dump/dump.c

  Log Message:
  ---
  dump: kdump-zlib data pages not dumped with pvtime/aarch64

The kdump-zlib data pages are not dumped from aarch64 host when the
'pvtime' is involved, that is, when the block->target_end is not aligned to
page_size. In the below example, it is expected to dump two blocks.

(qemu) info mtree -f
... ...
  090a-090a0fff (prio 0, ram): pvtime KVM
... ...
  4000-0001bfff (prio 0, ram): mach-virt.ram KVM
... ...

However, there is an issue with get_next_page() so that the pages for
"mach-virt.ram" will not be dumped.

At line 1296, although we have reached at the end of the 'pvtime' block,
since it is not aligned to the page_size (e.g., 0x1), it will not break
at line 1298.

1255 static bool 

[Qemu-commits] [qemu/qemu] 8ada21: hw/i2c: Fix bitbang_i2c_data trace event

2023-08-07 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 8ada214a902225c90583b644cabd85bc89bf188c
  
https://github.com/qemu/qemu/commit/8ada214a902225c90583b644cabd85bc89bf188c
  Author: BALATON Zoltan 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/i2c/bitbang_i2c.c
M hw/i2c/trace-events

  Log Message:
  ---
  hw/i2c: Fix bitbang_i2c_data trace event

The clock and data values were logged swapped. Correct the trace event
text to match what is logged. Also fix a typo in a comment nearby.

Signed-off-by: BALATON Zoltan 
Signed-off-by: Michael Tokarev 


  Commit: beb1a91781f127c863740c94f865fa55a22e5c81
  
https://github.com/qemu/qemu/commit/beb1a91781f127c863740c94f865fa55a22e5c81
  Author: Michael Tokarev 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M stubs/colo.c

  Log Message:
  ---
  stubs/colo.c: spelling

Signed-off-by: Michael Tokarev 


  Commit: 6ee960823da8fd780ae9912c4327b7e85e80d846
  
https://github.com/qemu/qemu/commit/6ee960823da8fd780ae9912c4327b7e85e80d846
  Author: Luca Bonissi 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M include/exec/user/abitypes.h

  Log Message:
  ---
  Fixed incorrect LLONG alignment for openrisc and cris

OpenRISC (or1k) has long long alignment to 4 bytes, but currently not
defined in abitypes.h. This lead to incorrect packing of /epoll_event/
structure and eventually infinite loop while waiting for file
descriptor[s] event[s].

Fixed also CRIS alignments (1 byte for all types).

Signed-off-by: Luca Bonissi 
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1770
Reviewed-by: Thomas Huth 
Signed-off-by: Michael Tokarev 


  Commit: 81cd34a359a36656d2f6542226235bd318ff8873
  
https://github.com/qemu/qemu/commit/81cd34a359a36656d2f6542226235bd318ff8873
  Author: Marc-André Lureau 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M chardev/char-socket.c

  Log Message:
  ---
  chardev: report the handshake error

This can help to debug connection issues.

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=2196182

Signed-off-by: Marc-André Lureau 
Reviewed-by: Daniel P. Berrangé 
Message-Id: <20230510072531.3937189-1-marcandre.lur...@redhat.com>


  Commit: 957d77863e4564454eb97f8f371096843daf4678
  
https://github.com/qemu/qemu/commit/957d77863e4564454eb97f8f371096843daf4678
  Author: Marc-André Lureau 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/display/virtio-gpu-base.c
M hw/display/virtio-gpu.c
M include/hw/virtio/virtio-gpu.h

  Log Message:
  ---
  virtio-gpu: free BHs, by implementing unrealize

Acked-by: Dongwon Kim 
Signed-off-by: Marc-André Lureau 
Message-Id: <20230726173929.690601-2-marcandre.lur...@redhat.com>


  Commit: a41e2d97f92b48552988b3cc62dce79d62f60dcc
  
https://github.com/qemu/qemu/commit/a41e2d97f92b48552988b3cc62dce79d62f60dcc
  Author: Marc-André Lureau 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/display/virtio-gpu.c
M include/hw/virtio/virtio-gpu.h

  Log Message:
  ---
  virtio-gpu: reset gfx resources in main thread

Calling OpenGL from different threads can have bad consequences if not
carefully reviewed. It's not generally supported. In my case, I was
debugging a crash in glDeleteTextures from OPENGL32.DLL, where I asked
qemu for gl=es, and thus ANGLE implementation was expected. libepoxy did
resolution of the global pointer for glGenTexture to the GLES version
from the main thread. But it resolved glDeleteTextures to the GL
version, because it was done from a different thread without correct
context. Oops.

Let's stick to the main thread for GL calls by using a BH.

Note: I didn't use atomics for reset_finished check, assuming the BQL
will provide enough of sync, but I might be wrong.

Acked-by: Dongwon Kim 
Signed-off-by: Marc-André Lureau 
Message-Id: <20230726173929.690601-3-marcandre.lur...@redhat.com>


  Commit: 8a64609eea8cb2bac015968c4b62da5bce266e22
  
https://github.com/qemu/qemu/commit/8a64609eea8cb2bac015968c4b62da5bce266e22
  Author: Dongli Zhang 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M dump/dump.c

  Log Message:
  ---
  dump: kdump-zlib data pages not dumped with pvtime/aarch64

The kdump-zlib data pages are not dumped from aarch64 host when the
'pvtime' is involved, that is, when the block->target_end is not aligned to
page_size. In the below example, it is expected to dump two blocks.

(qemu) info mtree -f
... ...
  090a-090a0fff (prio 0, ram): pvtime KVM
... ...
  4000-0001bfff (prio 0, ram): mach-virt.ram KVM
... ...

However, there is an issue with get_next_page() so that the pages for
"mach-virt.ram" will not be dumped.

At line 1296, although we have reached at the end of the 'pvtime' block,
since it is not aligned to the page_size (e.g., 0x1), it will not break
at line 1298.

1255 static bool 

[Qemu-commits] [qemu/qemu] ecb1b7: hw/nvme: fix oob memory read in fdp events log

2023-08-07 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ecb1b7b082d3b7dceff0e486a114502fc52c0fdf
  
https://github.com/qemu/qemu/commit/ecb1b7b082d3b7dceff0e486a114502fc52c0fdf
  Author: Klaus Jensen 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c

  Log Message:
  ---
  hw/nvme: fix oob memory read in fdp events log

As reported by Trend Micro's Zero Day Initiative, an oob memory read
vulnerability exists in nvme_fdp_events(). The host-provided offset is
not verified.

Fix this.

This is only exploitable when Flexible Data Placement mode (fdp=on) is
enabled.

Fixes: CVE-2023-4135
Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation")
Reported-by: Trend Micro's Zero Day Initiative
Signed-off-by: Klaus Jensen 


  Commit: 6a33f2e920ec0b489a77200888e3692664077f2d
  
https://github.com/qemu/qemu/commit/6a33f2e920ec0b489a77200888e3692664077f2d
  Author: Klaus Jensen 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c
M hw/nvme/nvme.h
M hw/nvme/trace-events

  Log Message:
  ---
  hw/nvme: fix compliance issue wrt. iosqes/iocqes

As of prior to this patch, the controller checks the value of CC.IOCQES
and CC.IOSQES prior to enabling the controller. As reported by Ben in
GitLab issue #1691, this is not spec compliant. The controller should
only check these values when queues are created.

This patch moves these checks to nvme_create_cq(). We do not need to
check it in nvme_create_sq() since that will error out if the completion
queue is not already created.

Also, since the controller exclusively supports SQEs of size 64 bytes
and CQEs of size 16 bytes, hard code that.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1691
Signed-off-by: Klaus Jensen 


  Commit: e0e5dca517a5964d407f48bdfccbea88113b2736
  
https://github.com/qemu/qemu/commit/e0e5dca517a5964d407f48bdfccbea88113b2736
  Author: Richard Henderson 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c
M hw/nvme/nvme.h
M hw/nvme/trace-events

  Log Message:
  ---
  Merge tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu into 
staging

hw/nvme fixes

- two fixes for hw/nvme

# -BEGIN PGP SIGNATURE-
#
# iQEzBAABCgAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmTQ2y4ACgkQTeGvMW1P
# DenpWQf/WFgEljzgTcgxlfZhCyzWGwVNgKqRxlTuF6ELqm8BajCuCeA5ias6AXOr
# x/gZ0VqrL91L5tRIH5Q0sdC+HBFC1yMs66jopdzc1oL1eYu1HTrLIqMDtkXp/K/P
# PyGah2t4qEMtacSkad+hmB68ViUkkmhkxrWYIeufUQTfLNF5pBqNvB1kQON3jmXE
# a1jI/PabYxi8Km0rfFJD6SUGmL9+m7MY/SyZAy+4EZZ1OEnp5jb3o9lbdwbhIU5e
# dRX4NW4BEDiOJeIcNVDiQkXv2/Lna1B51RVMvM4owpk0eRvRXMSqs2DQ5/jp/nGb
# 8uChUJ0QW68I4e9ptTfxmBsr4pSktg==
# =0nwp
# -END PGP SIGNATURE-
# gpg: Signature made Mon 07 Aug 2023 04:53:18 AM PDT
# gpg:using RSA key 522833AA75E2DCE6A24766C04DE1AF316D4F0DE9
# gpg: Good signature from "Klaus Jensen " [unknown]
# gpg: aka "Klaus Jensen " [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: DDCA 4D9C 9EF9 31CC 3468  4272 63D5 6FC5 E55D A838
#  Subkey fingerprint: 5228 33AA 75E2 DCE6 A247  66C0 4DE1 AF31 6D4F 0DE9

* tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu:
  hw/nvme: fix compliance issue wrt. iosqes/iocqes
  hw/nvme: fix oob memory read in fdp events log

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/9400601a689a...e0e5dca517a5



[Qemu-commits] [qemu/qemu] ecb1b7: hw/nvme: fix oob memory read in fdp events log

2023-08-07 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: ecb1b7b082d3b7dceff0e486a114502fc52c0fdf
  
https://github.com/qemu/qemu/commit/ecb1b7b082d3b7dceff0e486a114502fc52c0fdf
  Author: Klaus Jensen 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c

  Log Message:
  ---
  hw/nvme: fix oob memory read in fdp events log

As reported by Trend Micro's Zero Day Initiative, an oob memory read
vulnerability exists in nvme_fdp_events(). The host-provided offset is
not verified.

Fix this.

This is only exploitable when Flexible Data Placement mode (fdp=on) is
enabled.

Fixes: CVE-2023-4135
Fixes: 73064edfb864 ("hw/nvme: flexible data placement emulation")
Reported-by: Trend Micro's Zero Day Initiative
Signed-off-by: Klaus Jensen 


  Commit: 6a33f2e920ec0b489a77200888e3692664077f2d
  
https://github.com/qemu/qemu/commit/6a33f2e920ec0b489a77200888e3692664077f2d
  Author: Klaus Jensen 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c
M hw/nvme/nvme.h
M hw/nvme/trace-events

  Log Message:
  ---
  hw/nvme: fix compliance issue wrt. iosqes/iocqes

As of prior to this patch, the controller checks the value of CC.IOCQES
and CC.IOSQES prior to enabling the controller. As reported by Ben in
GitLab issue #1691, this is not spec compliant. The controller should
only check these values when queues are created.

This patch moves these checks to nvme_create_cq(). We do not need to
check it in nvme_create_sq() since that will error out if the completion
queue is not already created.

Also, since the controller exclusively supports SQEs of size 64 bytes
and CQEs of size 16 bytes, hard code that.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1691
Signed-off-by: Klaus Jensen 


  Commit: e0e5dca517a5964d407f48bdfccbea88113b2736
  
https://github.com/qemu/qemu/commit/e0e5dca517a5964d407f48bdfccbea88113b2736
  Author: Richard Henderson 
  Date:   2023-08-07 (Mon, 07 Aug 2023)

  Changed paths:
M hw/nvme/ctrl.c
M hw/nvme/nvme.h
M hw/nvme/trace-events

  Log Message:
  ---
  Merge tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu into 
staging

hw/nvme fixes

- two fixes for hw/nvme

# -BEGIN PGP SIGNATURE-
#
# iQEzBAABCgAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmTQ2y4ACgkQTeGvMW1P
# DenpWQf/WFgEljzgTcgxlfZhCyzWGwVNgKqRxlTuF6ELqm8BajCuCeA5ias6AXOr
# x/gZ0VqrL91L5tRIH5Q0sdC+HBFC1yMs66jopdzc1oL1eYu1HTrLIqMDtkXp/K/P
# PyGah2t4qEMtacSkad+hmB68ViUkkmhkxrWYIeufUQTfLNF5pBqNvB1kQON3jmXE
# a1jI/PabYxi8Km0rfFJD6SUGmL9+m7MY/SyZAy+4EZZ1OEnp5jb3o9lbdwbhIU5e
# dRX4NW4BEDiOJeIcNVDiQkXv2/Lna1B51RVMvM4owpk0eRvRXMSqs2DQ5/jp/nGb
# 8uChUJ0QW68I4e9ptTfxmBsr4pSktg==
# =0nwp
# -END PGP SIGNATURE-
# gpg: Signature made Mon 07 Aug 2023 04:53:18 AM PDT
# gpg:using RSA key 522833AA75E2DCE6A24766C04DE1AF316D4F0DE9
# gpg: Good signature from "Klaus Jensen " [unknown]
# gpg: aka "Klaus Jensen " [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: DDCA 4D9C 9EF9 31CC 3468  4272 63D5 6FC5 E55D A838
#  Subkey fingerprint: 5228 33AA 75E2 DCE6 A247  66C0 4DE1 AF31 6D4F 0DE9

* tag 'nvme-next-pull-request' of https://gitlab.com/birkelund/qemu:
  hw/nvme: fix compliance issue wrt. iosqes/iocqes
  hw/nvme: fix oob memory read in fdp events log

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/d7ebbfc5dbda...e0e5dca517a5



[Qemu-commits] [qemu/qemu] 196685: accel/tcg: Adjust parameters and locking with do_{...

2023-08-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1966855e567686e6547b058d8664aefd0e969a0f
  
https://github.com/qemu/qemu/commit/1966855e567686e6547b058d8664aefd0e969a0f
  Author: Richard Henderson 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c

  Log Message:
  ---
  accel/tcg: Adjust parameters and locking with do_{ld,st}_mmio_*

Replace MMULookupPageData* with CPUTLBEntryFull, addr, size.
Move QEMU_IOTHREAD_LOCK_GUARD to the caller.

This simplifies the usage from do_ld16_beN and do_st16_leN, where
we weren't locking the entire operation, and required hoop jumping
for passing addr and size.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 190aba803fbcac30b29bdab25f454b1284a96201
  
https://github.com/qemu/qemu/commit/190aba803fbcac30b29bdab25f454b1284a96201
  Author: Richard Henderson 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c

  Log Message:
  ---
  accel/tcg: Issue wider aligned i/o in do_{ld,st}_mmio_*

If the address and size are aligned, send larger chunks
to the memory subsystem.  This will be required to make
more use of these helpers.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: f7eaf9d702efdd02481d5f1c25f7d8e0ffb64c6e
  
https://github.com/qemu/qemu/commit/f7eaf9d702efdd02481d5f1c25f7d8e0ffb64c6e
  Author: Richard Henderson 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c

  Log Message:
  ---
  accel/tcg: Do not issue misaligned i/o

In the single-page case we were issuing misaligned i/o to
the memory subsystem, which does not handle it properly.
Split such accesses via do_{ld,st}_mmio_*.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1800
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: c30d0b861cea8539ee0acb55a1a949ed4b5ec82a
  
https://github.com/qemu/qemu/commit/c30d0b861cea8539ee0acb55a1a949ed4b5ec82a
  Author: Mikhail Tyutin 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c

  Log Message:
  ---
  accel/tcg: Call save_iotlb_data from io_readx as well

Apply save_iotlb_data() to io_readx() as well as to io_writex().
This fixes SEGFAULT on qemu_plugin_hwaddr_phys_addr() call plugins
for addresses inside of MMIO region.

Signed-off-by: Dmitriy Solovev 
Signed-off-by: Mikhail Tyutin 
Reviewed-by: Richard Henderson 
Message-Id: <20230804110903.19968-1-m.tyu...@yadro.com>
Signed-off-by: Richard Henderson 


  Commit: 6c78de6eb6f986b2e06e95fabad62731a44aaafd
  
https://github.com/qemu/qemu/commit/6c78de6eb6f986b2e06e95fabad62731a44aaafd
  Author: Matheus Tavares Bernardino 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M gdbstub/gdbstub.c

  Log Message:
  ---
  gdbstub: use 0 ("any process") on packets with no PID

Previously, qemu-user would always report PID 1 to GDB. This was changed
at dc14a7a6e9 (gdbstub: Report the actual qemu-user pid, 2023-06-30),
but read_thread_id() still considers GDB packets with "no PID" as "PID
1", which is not the qemu-user PID. Fix that by parsing "no PID" as "0",
which the GDB Remote Protocol defines as "any process".

Note that this should have no effect for system emulation as, in this
case, gdb_create_default_process() will assign PID 1 for the first
process and that is what the gdbstub uses for GDB requests with no PID,
or PID 0.

This issue was found with hexagon-lldb, which sends a "Hg" packet with
only the thread-id, but no process-id, leading to the invalid usage of
"PID 1" by qemu-hexagon and a subsequent "E22" reply.

Signed-off-by: Matheus Tavares Bernardino 
Acked-by: Ilya Leoshkevich 
Message-Id: 
<78a3b06f6ab90a7ff8e73ae14a996eb27ec76c85.1690904195.git.quic_mathb...@quicinc.com>
Reviewed-by: Richard Henderson 
Signed-off-by: Richard Henderson 


  Commit: 89e5b7935e92af6f3b4e4cdb19dfddef4e9dde36
  
https://github.com/qemu/qemu/commit/89e5b7935e92af6f3b4e4cdb19dfddef4e9dde36
  Author: Richard Henderson 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M configure

  Log Message:
  ---
  configure: Fix linux-user host detection for riscv64

Mirror the host_arch variable from meson.build, so that we
probe for the correct linux-user/include/host/ directory.

Fixes: e3e477c3bca0 ("configure: Fix cross-building for RISCV host")
Signed-off-by: Richard Henderson 


  Commit: 4333f0924c2f2ca8efaebaed8c24f55f77d8b013
  
https://github.com/qemu/qemu/commit/4333f0924c2f2ca8efaebaed8c24f55f77d8b013
  Author: Nathan Egge 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M linux-user/elfload.c

  Log Message:
  ---
  linux-user/elfload: Set V in ELF_HWCAP for RISC-V

Set V bit for hwcap if misa is set.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1793
Signed-off-by: Nathan Egge 
Reviewed-by: Daniel Henrique Barboza 
Tested-by: Daniel 

[Qemu-commits] [qemu/qemu] 5c2b00: linux-user: Properly set image_info.brk in flatload

2023-08-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 5c2b0099ffa061ad1141c57a7b4ff902381f07a3
  
https://github.com/qemu/qemu/commit/5c2b0099ffa061ad1141c57a7b4ff902381f07a3
  Author: Richard Henderson 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M linux-user/flatload.c
M linux-user/main.c
M linux-user/qemu.h

  Log Message:
  ---
  linux-user: Properly set image_info.brk in flatload

The heap starts at "brk" not "start_brk".  With this fixed,
image_info.start_brk is unused and may be removed.

Tested-by: Helge Deller 
Reviewed-by: Helge Deller 
Reviewed-by: Akihiko Odaki 
Signed-off-by: Richard Henderson 


  Commit: 3252f22cfd6b0059cc5de9a5a3d424722931d4a0
  
https://github.com/qemu/qemu/commit/3252f22cfd6b0059cc5de9a5a3d424722931d4a0
  Author: Richard Henderson 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M linux-user/mmap.c
M linux-user/user-mmap.h

  Log Message:
  ---
  linux-user: Remove last_brk

This variable is unused.

Reviewed-by: Helge Deller 
Reviewed-by: Akihiko Odaki 
Signed-off-by: Richard Henderson 


  Commit: f0ef27225118c9284119199d7341802ca15e2834
  
https://github.com/qemu/qemu/commit/f0ef27225118c9284119199d7341802ca15e2834
  Author: Richard Henderson 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M bsd-user/mmap.c
M bsd-user/qemu.h

  Log Message:
  ---
  bsd-user: Remove last_brk

This variable is unused.

Signed-off-by: Richard Henderson 


  Commit: d7ebbfc5dbdadaab389ef2817dcea35467923384
  
https://github.com/qemu/qemu/commit/d7ebbfc5dbdadaab389ef2817dcea35467923384
  Author: Richard Henderson 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c
M bsd-user/mmap.c
M bsd-user/qemu.h
M configure
M gdbstub/gdbstub.c
M linux-user/elfload.c
M linux-user/flatload.c
M linux-user/main.c
M linux-user/mmap.c
M linux-user/qemu.h
M linux-user/syscall.c
M linux-user/user-mmap.h

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

accel/tcg: Do not issue misaligned i/o
accel/tcg: Call save_iotlb_data from io_readx
gdbstub: use 0 ("any process") on packets with no PID
linux-user: Fixes for MAP_FIXED_NOREPLACE
linux-user: Fixes for brk
linux-user: Set V in ELF_HWCAP for RISC-V
*-user: Remove last_brk as unused

# -BEGIN PGP SIGNATURE-
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmTP/ygdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+YIAf+OGaSuBJgVIT12VIX
# ZRVOAUMNnHBPYFiOgv8m7oS3ZgbCXMga0rLyumLaXnI4/bp8ifbLCE7rcZOMUb2G
# aRRllcppYku0Qp19kiPJoYl5iWCaNq7S5kO/8ysh4sC7+/t98YLYBDtZBKcR21mv
# bYtJ7qrhmlXPpv2LEOTPbWh0NKO+zkwZArnqrBUWM+tCxOcjHzXx6MVpp8PaZTal
# iXU5L20YcjqdRxpDHPT+rshf8yFPbQpmuNpj1JdRQ/LxXWgsY/jNVeJXbLbQ+zvx
# nFE94GWeKg/KhqzoXiqmmFgmDsQUzeoUM8OTubJlvBNIrabDZp2RGMgABLAciGKM
# 5Uj7xQ==
# =+mjA
# -END PGP SIGNATURE-
# gpg: Signature made Sun 06 Aug 2023 01:14:32 PM PDT
# gpg:using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:issuer "richard.hender...@linaro.org"
# gpg: Good signature from "Richard Henderson " 
[ultimate]

* tag 'pull-tcg-20230806' of https://gitlab.com/rth7680/qemu:
  bsd-user: Remove last_brk
  linux-user: Remove last_brk
  linux-user: Properly set image_info.brk in flatload
  linux-user: Do not align brk with host page size
  linux-user: Do nothing if too small brk is specified
  linux-user: Use MAP_FIXED_NOREPLACE for do_brk()
  linux-user: Do not call get_errno() in do_brk()
  linux-user: Fix MAP_FIXED_NOREPLACE on old kernels
  linux-user: Unset MAP_FIXED_NOREPLACE for host
  linux-user/elfload: Set V in ELF_HWCAP for RISC-V
  configure: Fix linux-user host detection for riscv64
  gdbstub: use 0 ("any process") on packets with no PID
  accel/tcg: Call save_iotlb_data from io_readx as well
  accel/tcg: Do not issue misaligned i/o
  accel/tcg: Issue wider aligned i/o in do_{ld,st}_mmio_*
  accel/tcg: Adjust parameters and locking with do_{ld,st}_mmio_*

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/82c7e7d6eb19...d7ebbfc5dbda



[Qemu-commits] [qemu/qemu] c30d0b: accel/tcg: Call save_iotlb_data from io_readx as well

2023-08-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: c30d0b861cea8539ee0acb55a1a949ed4b5ec82a
  
https://github.com/qemu/qemu/commit/c30d0b861cea8539ee0acb55a1a949ed4b5ec82a
  Author: Mikhail Tyutin 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c

  Log Message:
  ---
  accel/tcg: Call save_iotlb_data from io_readx as well

Apply save_iotlb_data() to io_readx() as well as to io_writex().
This fixes SEGFAULT on qemu_plugin_hwaddr_phys_addr() call plugins
for addresses inside of MMIO region.

Signed-off-by: Dmitriy Solovev 
Signed-off-by: Mikhail Tyutin 
Reviewed-by: Richard Henderson 
Message-Id: <20230804110903.19968-1-m.tyu...@yadro.com>
Signed-off-by: Richard Henderson 


  Commit: 6c78de6eb6f986b2e06e95fabad62731a44aaafd
  
https://github.com/qemu/qemu/commit/6c78de6eb6f986b2e06e95fabad62731a44aaafd
  Author: Matheus Tavares Bernardino 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M gdbstub/gdbstub.c

  Log Message:
  ---
  gdbstub: use 0 ("any process") on packets with no PID

Previously, qemu-user would always report PID 1 to GDB. This was changed
at dc14a7a6e9 (gdbstub: Report the actual qemu-user pid, 2023-06-30),
but read_thread_id() still considers GDB packets with "no PID" as "PID
1", which is not the qemu-user PID. Fix that by parsing "no PID" as "0",
which the GDB Remote Protocol defines as "any process".

Note that this should have no effect for system emulation as, in this
case, gdb_create_default_process() will assign PID 1 for the first
process and that is what the gdbstub uses for GDB requests with no PID,
or PID 0.

This issue was found with hexagon-lldb, which sends a "Hg" packet with
only the thread-id, but no process-id, leading to the invalid usage of
"PID 1" by qemu-hexagon and a subsequent "E22" reply.

Signed-off-by: Matheus Tavares Bernardino 
Acked-by: Ilya Leoshkevich 
Message-Id: 
<78a3b06f6ab90a7ff8e73ae14a996eb27ec76c85.1690904195.git.quic_mathb...@quicinc.com>
Reviewed-by: Richard Henderson 
Signed-off-by: Richard Henderson 


  Commit: 89e5b7935e92af6f3b4e4cdb19dfddef4e9dde36
  
https://github.com/qemu/qemu/commit/89e5b7935e92af6f3b4e4cdb19dfddef4e9dde36
  Author: Richard Henderson 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M configure

  Log Message:
  ---
  configure: Fix linux-user host detection for riscv64

Mirror the host_arch variable from meson.build, so that we
probe for the correct linux-user/include/host/ directory.

Fixes: e3e477c3bca0 ("configure: Fix cross-building for RISCV host")
Signed-off-by: Richard Henderson 


  Commit: 4333f0924c2f2ca8efaebaed8c24f55f77d8b013
  
https://github.com/qemu/qemu/commit/4333f0924c2f2ca8efaebaed8c24f55f77d8b013
  Author: Nathan Egge 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M linux-user/elfload.c

  Log Message:
  ---
  linux-user/elfload: Set V in ELF_HWCAP for RISC-V

Set V bit for hwcap if misa is set.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1793
Signed-off-by: Nathan Egge 
Reviewed-by: Daniel Henrique Barboza 
Tested-by: Daniel Henrique Barboza 
Message-Id: <20230803131424.40744-1-ne...@xiph.org>
Signed-off-by: Richard Henderson 


  Commit: c3dd50da0f4d00fffe8ea5e211c2c189fe6ad4fb
  
https://github.com/qemu/qemu/commit/c3dd50da0f4d00fffe8ea5e211c2c189fe6ad4fb
  Author: Akihiko Odaki 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M linux-user/mmap.c

  Log Message:
  ---
  linux-user: Unset MAP_FIXED_NOREPLACE for host

Passing MAP_FIXED_NOREPLACE to host will fail for reserved_va because
the address space is reserved with mmap.  Replace it with MAP_FIXED
in that case.

Signed-off-by: Akihiko Odaki 
Message-Id: <20230802071754.14876-2-akihiko.od...@daynix.com>
[rth: Expand inline commentary.]
Reviewed-by: Richard Henderson 
Signed-off-by: Richard Henderson 


  Commit: ddcdd8c48fc48b2d528756fc98f1ce0ec3d7b617
  
https://github.com/qemu/qemu/commit/ddcdd8c48fc48b2d528756fc98f1ce0ec3d7b617
  Author: Akihiko Odaki 
  Date:   2023-08-06 (Sun, 06 Aug 2023)

  Changed paths:
M linux-user/mmap.c

  Log Message:
  ---
  linux-user: Fix MAP_FIXED_NOREPLACE on old kernels

The man page states:
> Note that older kernels which do not recognize the MAP_FIXED_NOREPLACE
> flag will typically (upon detecting a collision with a preexisting
> mapping) fall back to a “non-MAP_FIXED” type of behavior: they will
> return an address that is different from the requested address.
> Therefore, backward-compatible software should check the returned
> address against the requested address.
https://man7.org/linux/man-pages/man2/mmap.2.html

Signed-off-by: Akihiko Odaki 
Message-Id: <20230802071754.14876-3-akihiko.od...@daynix.com>
Reviewed-by: Richard Henderson 
Signed-off-by: Richard Henderson 


  Commit: 0692f689747d5f0acf3245607771f79110a50309
  

[Qemu-commits] [qemu/qemu] 196685: accel/tcg: Adjust parameters and locking with do_{...

2023-08-05 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 1966855e567686e6547b058d8664aefd0e969a0f
  
https://github.com/qemu/qemu/commit/1966855e567686e6547b058d8664aefd0e969a0f
  Author: Richard Henderson 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c

  Log Message:
  ---
  accel/tcg: Adjust parameters and locking with do_{ld,st}_mmio_*

Replace MMULookupPageData* with CPUTLBEntryFull, addr, size.
Move QEMU_IOTHREAD_LOCK_GUARD to the caller.

This simplifies the usage from do_ld16_beN and do_st16_leN, where
we weren't locking the entire operation, and required hoop jumping
for passing addr and size.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 190aba803fbcac30b29bdab25f454b1284a96201
  
https://github.com/qemu/qemu/commit/190aba803fbcac30b29bdab25f454b1284a96201
  Author: Richard Henderson 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c

  Log Message:
  ---
  accel/tcg: Issue wider aligned i/o in do_{ld,st}_mmio_*

If the address and size are aligned, send larger chunks
to the memory subsystem.  This will be required to make
more use of these helpers.

Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: f7eaf9d702efdd02481d5f1c25f7d8e0ffb64c6e
  
https://github.com/qemu/qemu/commit/f7eaf9d702efdd02481d5f1c25f7d8e0ffb64c6e
  Author: Richard Henderson 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M accel/tcg/cputlb.c

  Log Message:
  ---
  accel/tcg: Do not issue misaligned i/o

In the single-page case we were issuing misaligned i/o to
the memory subsystem, which does not handle it properly.
Split such accesses via do_{ld,st}_mmio_*.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1800
Reviewed-by: Philippe Mathieu-Daudé 
Signed-off-by: Richard Henderson 


  Commit: 4be4be8cd627daf97f857e80f7c51c280cd090d8
  
https://github.com/qemu/qemu/commit/4be4be8cd627daf97f857e80f7c51c280cd090d8
  Author: Matheus Tavares Bernardino 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M gdbstub/gdbstub.c

  Log Message:
  ---
  gdbstub: use 0 ("any process") on packets with no PID

Previously, qemu-user would always report PID 1 to GDB. This was changed
at dc14a7a6e9 (gdbstub: Report the actual qemu-user pid, 2023-06-30),
but read_thread_id() still considers GDB packets with "no PID" as "PID
1", which is not the qemu-user PID. Fix that by parsing "no PID" as "0",
which the GDB Remote Protocol defines as "any process".

Note that this should have no effect for system emulation as, in this
case, gdb_create_default_process() will assign PID 1 for the first
process and that is what the gdbstub uses for GDB requests with no PID,
or PID 0.

This issue was found with hexagon-lldb, which sends a "Hg" packet with
only the thread-id, but no process-id, leading to the invalid usage of
"PID 1" by qemu-hexagon and a subsequent "E22" reply.

Signed-off-by: Matheus Tavares Bernardino 
Acked-by: Ilya Leoshkevich 
Message-Id: 
<78a3b06f6ab90a7ff8e73ae14a996eb27ec76c85.1690904195.git.quic_mathb...@quicinc.com>
Reviewed-by: Richard Henderson 
Signed-off-by: Richard Henderson 


  Commit: 298a89cfb0ee3a1cc0acc36a1e21e49556de0d5e
  
https://github.com/qemu/qemu/commit/298a89cfb0ee3a1cc0acc36a1e21e49556de0d5e
  Author: Akihiko Odaki 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M linux-user/mmap.c

  Log Message:
  ---
  linux-user: Unset MAP_FIXED_NOREPLACE for host

Passing MAP_FIXED_NOREPLACE to host will fail for reserved_va because
the address space is reserved with mmap.  Replace it with MAP_FIXED
in that case.

Signed-off-by: Akihiko Odaki 
Message-Id: <20230802071754.14876-2-akihiko.od...@daynix.com>
[rth: Expand inline commentary.]
Reviewed-by: Richard Henderson 
Signed-off-by: Richard Henderson 


  Commit: c4317725fe004b38d2aab35f778320c093464706
  
https://github.com/qemu/qemu/commit/c4317725fe004b38d2aab35f778320c093464706
  Author: Akihiko Odaki 
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
M linux-user/mmap.c

  Log Message:
  ---
  linux-user: Fix MAP_FIXED_NOREPLACE on old kernels

The man page states:
> Note that older kernels which do not recognize the MAP_FIXED_NOREPLACE
> flag will typically (upon detecting a collision with a preexisting
> mapping) fall back to a “non-MAP_FIXED” type of behavior: they will
> return an address that is different from the requested address.
> Therefore, backward-compatible software should check the returned
> address against the requested address.
https://man7.org/linux/man-pages/man2/mmap.2.html

Signed-off-by: Akihiko Odaki 
Message-Id: <20230802071754.14876-3-akihiko.od...@daynix.com>
Reviewed-by: Richard Henderson 
Signed-off-by: Richard Henderson 


  Commit: 3fea7a7dd24ea38ad589ae1dd8549e64e33e4e54
  

[Qemu-commits] [qemu/qemu] b2ea64: target/i386: Check CR0.TS before enter_mmx

2023-08-05 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b2ea6450d8e1336a33eb958ccc64604bc35a43dd
  
https://github.com/qemu/qemu/commit/b2ea6450d8e1336a33eb958ccc64604bc35a43dd
  Author: Matt Borgerson 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M target/i386/tcg/decode-new.c.inc

  Log Message:
  ---
  target/i386: Check CR0.TS before enter_mmx

When CR0.TS=1, execution of x87 FPU, MMX, and some SSE instructions will
cause a Device Not Available (DNA) exception (#NM). System software uses
this exception event to lazily context switch FPU state.

Before this patch, enter_mmx helpers may be generated just before #NM
generation, prematurely resetting FPU state before the guest has a
chance to save it.

Signed-off-by: Matt Borgerson 
Message-ID: 
Cc: qemu-sta...@nongnu.org
Signed-off-by: Paolo Bonzini 


  Commit: d9ab1f1f4d79683b2db00b0995fa65530c535972
  
https://github.com/qemu/qemu/commit/d9ab1f1f4d79683b2db00b0995fa65530c535972
  Author: Paolo Bonzini 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M .gitlab-ci.d/cirrus/kvm-build.yml

  Log Message:
  ---
  ci: install meson in CirrusCI KVM build environment

scripts/archive-source.sh needs meson in order to download the subprojects,
therefore meson needs to be part of the host environment in which VM-based
build jobs run.

Fixes: 2019cabfee0 ("meson: subprojects: replace submodules with wrap files", 
2023-06-06)
Reported-by: Daniel P. Berrangé 
Signed-off-by: Paolo Bonzini 


  Commit: 6db03ccc7f4ca33c99debaac290066f4500a2dfb
  
https://github.com/qemu/qemu/commit/6db03ccc7f4ca33c99debaac290066f4500a2dfb
  Author: Richard Henderson 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M .gitlab-ci.d/cirrus/kvm-build.yml
M target/i386/tcg/decode-new.c.inc

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

* fix VM build jobs on CirrusCI
* fix MMX instructions clobbering x87 state before raising #NM

# -BEGIN PGP SIGNATURE-
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmTM6KwUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOpMAf/TcfaZt5bffmcnvGmrOBGQfvt1KNM
# QYhsNMZr3fyWoI7DpNgWg60P1iQ/2YgcTOjrH1yoKWnvxZqut4ZKyfxIbdnK84ns
# J4Q5YfUmzrd7cf+HyfPaiMdfcuZE1wGxMpLWNFtNOWutr5Dq95rOUnuiWaja05bH
# XUxwud3Jl1LWxmDIJaFs8fC+7q4s0le9S0Ws1KjejMiKs2epcTZW+5kS0jfRuLcB
# Sxx4oABWEhGA4CY+W+rf59SOrgsb7ySkRZjoQyj30pD61O+UJ3unhWDgLMQau6oT
# 2cP0Cv08PwhJQNByfOc6N+RH7CbPxsIBcainJ2Mf/b5oPoV5m/Kdlx5PzA==
# =+Im7
# -END PGP SIGNATURE-
# gpg: Signature made Fri 04 Aug 2023 05:01:48 AM PDT
# gpg:using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:issuer "pbonz...@redhat.com"
# gpg: Good signature from "Paolo Bonzini " [undefined]
# gpg: aka "Paolo Bonzini " [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: 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:
  ci: install meson in CirrusCI KVM build environment
  target/i386: Check CR0.TS before enter_mmx

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/71934cf6bf87...6db03ccc7f4c



[Qemu-commits] [qemu/qemu] b2ea64: target/i386: Check CR0.TS before enter_mmx

2023-08-04 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: b2ea6450d8e1336a33eb958ccc64604bc35a43dd
  
https://github.com/qemu/qemu/commit/b2ea6450d8e1336a33eb958ccc64604bc35a43dd
  Author: Matt Borgerson 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M target/i386/tcg/decode-new.c.inc

  Log Message:
  ---
  target/i386: Check CR0.TS before enter_mmx

When CR0.TS=1, execution of x87 FPU, MMX, and some SSE instructions will
cause a Device Not Available (DNA) exception (#NM). System software uses
this exception event to lazily context switch FPU state.

Before this patch, enter_mmx helpers may be generated just before #NM
generation, prematurely resetting FPU state before the guest has a
chance to save it.

Signed-off-by: Matt Borgerson 
Message-ID: 
Cc: qemu-sta...@nongnu.org
Signed-off-by: Paolo Bonzini 


  Commit: d9ab1f1f4d79683b2db00b0995fa65530c535972
  
https://github.com/qemu/qemu/commit/d9ab1f1f4d79683b2db00b0995fa65530c535972
  Author: Paolo Bonzini 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M .gitlab-ci.d/cirrus/kvm-build.yml

  Log Message:
  ---
  ci: install meson in CirrusCI KVM build environment

scripts/archive-source.sh needs meson in order to download the subprojects,
therefore meson needs to be part of the host environment in which VM-based
build jobs run.

Fixes: 2019cabfee0 ("meson: subprojects: replace submodules with wrap files", 
2023-06-06)
Reported-by: Daniel P. Berrangé 
Signed-off-by: Paolo Bonzini 


  Commit: 6db03ccc7f4ca33c99debaac290066f4500a2dfb
  
https://github.com/qemu/qemu/commit/6db03ccc7f4ca33c99debaac290066f4500a2dfb
  Author: Richard Henderson 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M .gitlab-ci.d/cirrus/kvm-build.yml
M target/i386/tcg/decode-new.c.inc

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

* fix VM build jobs on CirrusCI
* fix MMX instructions clobbering x87 state before raising #NM

# -BEGIN PGP SIGNATURE-
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmTM6KwUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOpMAf/TcfaZt5bffmcnvGmrOBGQfvt1KNM
# QYhsNMZr3fyWoI7DpNgWg60P1iQ/2YgcTOjrH1yoKWnvxZqut4ZKyfxIbdnK84ns
# J4Q5YfUmzrd7cf+HyfPaiMdfcuZE1wGxMpLWNFtNOWutr5Dq95rOUnuiWaja05bH
# XUxwud3Jl1LWxmDIJaFs8fC+7q4s0le9S0Ws1KjejMiKs2epcTZW+5kS0jfRuLcB
# Sxx4oABWEhGA4CY+W+rf59SOrgsb7ySkRZjoQyj30pD61O+UJ3unhWDgLMQau6oT
# 2cP0Cv08PwhJQNByfOc6N+RH7CbPxsIBcainJ2Mf/b5oPoV5m/Kdlx5PzA==
# =+Im7
# -END PGP SIGNATURE-
# gpg: Signature made Fri 04 Aug 2023 05:01:48 AM PDT
# gpg:using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:issuer "pbonz...@redhat.com"
# gpg: Good signature from "Paolo Bonzini " [undefined]
# gpg: aka "Paolo Bonzini " [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: 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:
  ci: install meson in CirrusCI KVM build environment
  target/i386: Check CR0.TS before enter_mmx

Signed-off-by: Richard Henderson 


Compare: https://github.com/qemu/qemu/compare/71934cf6bf87...6db03ccc7f4c



[Qemu-commits] [qemu/qemu] 19ac7b: ppc/pegasos2: Fix reset state of USB functions

2023-08-04 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 19ac7b29f81196dc20c9d97cf36f9004fa7e60c4
  
https://github.com/qemu/qemu/commit/19ac7b29f81196dc20c9d97cf36f9004fa7e60c4
  Author: BALATON Zoltan 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M hw/ppc/pegasos2.c

  Log Message:
  ---
  ppc/pegasos2: Fix reset state of USB functions

The original non-free board firmware sets the command register of the
USB functions to 7 and some guests rely on this for working USB. Match
what the board firmware does when using VOF instead.

Signed-off-by: BALATON Zoltan 
Reviewed-by: Daniel Henrique Barboza 
Message-ID: 
<06a2b864431425f23d1f2b5abf0c027819ac11c6.1689725688.git.bala...@eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza 


  Commit: aa1133475e0fdea0ab7d994c0a62b74d575cfcce
  
https://github.com/qemu/qemu/commit/aa1133475e0fdea0ab7d994c0a62b74d575cfcce
  Author: BALATON Zoltan 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M hw/ppc/pegasos2.c

  Log Message:
  ---
  ppc/pegasos2: Fix reg property of ROM BARs

The register offset of the ROM BAR is 0x30 not 0x28. This fixes the
reg property entry of the ROM region in the device tree.

Signed-off-by: BALATON Zoltan 
Reviewed-by: Daniel Henrique Barboza 
Message-ID: 
<6abd73b1211f9d0776dfa5d71d6294f17eecb426.1689725688.git.bala...@eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 889dd6c525852e341c737aaca273a92fae05886f
  
https://github.com/qemu/qemu/commit/889dd6c525852e341c737aaca273a92fae05886f
  Author: BALATON Zoltan 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M hw/ppc/pegasos2.c

  Log Message:
  ---
  ppc/pegasos2: Fix naming of device tree nodes

The board firmware names devices by their class so match that for
common devices. Also make sure the /rtas node has a name. This is
needed because VOF otherwise does not include it in results got by
nextprop which is how AmigaOS queries it and fails if no name property
is found.

Signed-off-by: BALATON Zoltan 
Reviewed-by: Daniel Henrique Barboza 
Message-ID: 
<808ade37aa141563d1ee349254151672bf7a5d59.1689725688.git.bala...@eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 6b6d4c1a0116c51098975131c16ecf7cefe68e79
  
https://github.com/qemu/qemu/commit/6b6d4c1a0116c51098975131c16ecf7cefe68e79
  Author: BALATON Zoltan 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M hw/ppc/pegasos2.c

  Log Message:
  ---
  ppc/pegasos2: Fix reg property of 64 bit BARs in device tree

The board firmware handles this correctly following the Open Firmware
standard which we missed. This fixes 64 bit BARs when using VOF.

Signed-off-by: BALATON Zoltan 
Reviewed-by: Daniel Henrique Barboza 
Message-ID: <20230721221320.1311e745...@zero.eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 9201af096962a1967ce5d0b270ed16ae4edd3db6
  
https://github.com/qemu/qemu/commit/9201af096962a1967ce5d0b270ed16ae4edd3db6
  Author: Nicholas Piggin 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M target/ppc/mmu-hash64.c

  Log Message:
  ---
  target/ppc: Implement ASDR register for ISA v3.0 for HPT

The ASDR register was introduced in ISA v3.0. It has not been
implemented for HPT. With HPT, ASDR is the format of the slbmte RS
operand (containing VSID), which matches the ppc_slb_t field.

Fixes: 3367c62f522b ("target/ppc: Support for POWER9 native hash")
Signed-off-by: Nicholas Piggin 
Reviewed-by: Cédric Le Goater 
Message-ID: <20230726182230.433945-2-npig...@gmail.com>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 9915dac4847f3cc5ffd36e4c374a4eec83fe09b5
  
https://github.com/qemu/qemu/commit/9915dac4847f3cc5ffd36e4c374a4eec83fe09b5
  Author: Nicholas Piggin 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M target/ppc/excp_helper.c

  Log Message:
  ---
  target/ppc: Fix pending HDEC when entering PM state

HDEC is defined to not wake from PM state. There is a check in the HDEC
timer to avoid setting the interrupt if we are in a PM state, but no
check on PM entry to lower HDEC if it already fired. This can cause a
HDECR wake up and  QEMU abort with unsupported exception in Power Save
mode.

Fixes: 4b236b621bf ("ppc: Initial HDEC support")
Signed-off-by: Nicholas Piggin 
Reviewed-by: Cédric Le Goater 
Message-ID: <20230726182230.433945-4-npig...@gmail.com>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 0e2a3ec36885f6d79a96230f582d4455878c6373
  
https://github.com/qemu/qemu/commit/0e2a3ec36885f6d79a96230f582d4455878c6373
  Author: Nicholas Piggin 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M target/ppc/mmu-hash64.c
M target/ppc/mmu-hash64.h

  Log Message:
  ---
  target/ppc: Fix VRMA page size for ISA v3.0

Until v2.07s, the VRMA page size (L||LP) was encoded in LPCR[VRMASD].
In v3.0 that moved to the partition table PS field.

The powernv machine can now run KVM HPT guests 

[Qemu-commits] [qemu/qemu] 19ac7b: ppc/pegasos2: Fix reset state of USB functions

2023-08-04 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 19ac7b29f81196dc20c9d97cf36f9004fa7e60c4
  
https://github.com/qemu/qemu/commit/19ac7b29f81196dc20c9d97cf36f9004fa7e60c4
  Author: BALATON Zoltan 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M hw/ppc/pegasos2.c

  Log Message:
  ---
  ppc/pegasos2: Fix reset state of USB functions

The original non-free board firmware sets the command register of the
USB functions to 7 and some guests rely on this for working USB. Match
what the board firmware does when using VOF instead.

Signed-off-by: BALATON Zoltan 
Reviewed-by: Daniel Henrique Barboza 
Message-ID: 
<06a2b864431425f23d1f2b5abf0c027819ac11c6.1689725688.git.bala...@eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza 


  Commit: aa1133475e0fdea0ab7d994c0a62b74d575cfcce
  
https://github.com/qemu/qemu/commit/aa1133475e0fdea0ab7d994c0a62b74d575cfcce
  Author: BALATON Zoltan 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M hw/ppc/pegasos2.c

  Log Message:
  ---
  ppc/pegasos2: Fix reg property of ROM BARs

The register offset of the ROM BAR is 0x30 not 0x28. This fixes the
reg property entry of the ROM region in the device tree.

Signed-off-by: BALATON Zoltan 
Reviewed-by: Daniel Henrique Barboza 
Message-ID: 
<6abd73b1211f9d0776dfa5d71d6294f17eecb426.1689725688.git.bala...@eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 889dd6c525852e341c737aaca273a92fae05886f
  
https://github.com/qemu/qemu/commit/889dd6c525852e341c737aaca273a92fae05886f
  Author: BALATON Zoltan 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M hw/ppc/pegasos2.c

  Log Message:
  ---
  ppc/pegasos2: Fix naming of device tree nodes

The board firmware names devices by their class so match that for
common devices. Also make sure the /rtas node has a name. This is
needed because VOF otherwise does not include it in results got by
nextprop which is how AmigaOS queries it and fails if no name property
is found.

Signed-off-by: BALATON Zoltan 
Reviewed-by: Daniel Henrique Barboza 
Message-ID: 
<808ade37aa141563d1ee349254151672bf7a5d59.1689725688.git.bala...@eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 6b6d4c1a0116c51098975131c16ecf7cefe68e79
  
https://github.com/qemu/qemu/commit/6b6d4c1a0116c51098975131c16ecf7cefe68e79
  Author: BALATON Zoltan 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M hw/ppc/pegasos2.c

  Log Message:
  ---
  ppc/pegasos2: Fix reg property of 64 bit BARs in device tree

The board firmware handles this correctly following the Open Firmware
standard which we missed. This fixes 64 bit BARs when using VOF.

Signed-off-by: BALATON Zoltan 
Reviewed-by: Daniel Henrique Barboza 
Message-ID: <20230721221320.1311e745...@zero.eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 9201af096962a1967ce5d0b270ed16ae4edd3db6
  
https://github.com/qemu/qemu/commit/9201af096962a1967ce5d0b270ed16ae4edd3db6
  Author: Nicholas Piggin 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M target/ppc/mmu-hash64.c

  Log Message:
  ---
  target/ppc: Implement ASDR register for ISA v3.0 for HPT

The ASDR register was introduced in ISA v3.0. It has not been
implemented for HPT. With HPT, ASDR is the format of the slbmte RS
operand (containing VSID), which matches the ppc_slb_t field.

Fixes: 3367c62f522b ("target/ppc: Support for POWER9 native hash")
Signed-off-by: Nicholas Piggin 
Reviewed-by: Cédric Le Goater 
Message-ID: <20230726182230.433945-2-npig...@gmail.com>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 9915dac4847f3cc5ffd36e4c374a4eec83fe09b5
  
https://github.com/qemu/qemu/commit/9915dac4847f3cc5ffd36e4c374a4eec83fe09b5
  Author: Nicholas Piggin 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M target/ppc/excp_helper.c

  Log Message:
  ---
  target/ppc: Fix pending HDEC when entering PM state

HDEC is defined to not wake from PM state. There is a check in the HDEC
timer to avoid setting the interrupt if we are in a PM state, but no
check on PM entry to lower HDEC if it already fired. This can cause a
HDECR wake up and  QEMU abort with unsupported exception in Power Save
mode.

Fixes: 4b236b621bf ("ppc: Initial HDEC support")
Signed-off-by: Nicholas Piggin 
Reviewed-by: Cédric Le Goater 
Message-ID: <20230726182230.433945-4-npig...@gmail.com>
Signed-off-by: Daniel Henrique Barboza 


  Commit: 0e2a3ec36885f6d79a96230f582d4455878c6373
  
https://github.com/qemu/qemu/commit/0e2a3ec36885f6d79a96230f582d4455878c6373
  Author: Nicholas Piggin 
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
M target/ppc/mmu-hash64.c
M target/ppc/mmu-hash64.h

  Log Message:
  ---
  target/ppc: Fix VRMA page size for ISA v3.0

Until v2.07s, the VRMA page size (L||LP) was encoded in LPCR[VRMASD].
In v3.0 that moved to the partition table PS field.

The powernv machine can now run KVM HPT 

  1   2   3   4   5   6   7   8   9   10   >