]> git.ipfire.org Git - thirdparty/qemu.git/log
thirdparty/qemu.git
3 months agolinux-user: make syscall emulation interruptible
Florian Hofhammer [Thu, 5 Mar 2026 10:06:01 +0000 (11:06 +0100)] 
linux-user: make syscall emulation interruptible

The syscall emulation code previously wasn't interruptible via
cpu_loop_exit(), as this construct relies on a longjmp target that is not
live anymore in the syscall handling code. Consequently, longjmp() would
operate on a (potentially overwritten) stale jump buffer. This patch adds an additional
setjmp and the necessary handling around it to make longjmp() (and by
proxy cpu_loop_exit() safe to call even within a syscall context.

Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Florian Hofhammer <florian.hofhammer@epfl.ch>
Link: https://lore.kernel.org/qemu-devel/20260305-setpc-v5-v7-3-4c3adba52403@epfl.ch
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
3 months agoplugins: add flag to specify whether PC is rw
Florian Hofhammer [Thu, 5 Mar 2026 10:06:00 +0000 (11:06 +0100)] 
plugins: add flag to specify whether PC is rw

In addition to the flags specifying whether general-purpose registers
are read-write (rw) during a plugin callback, we add an additional flag
explicitly stating whether the PC is writable. This is in preparation of
a patch that allows to explicitly set the PC to divert control flow from
within a plugin callback, which is currently not possible.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Florian Hofhammer <florian.hofhammer@epfl.ch>
Link: https://lore.kernel.org/qemu-devel/20260305-setpc-v5-v7-2-4c3adba52403@epfl.ch
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
3 months agoplugins/core: clamp syscall arguments if target is 32-bit
Pierrick Bouvier [Thu, 5 Mar 2026 10:05:59 +0000 (11:05 +0100)] 
plugins/core: clamp syscall arguments if target is 32-bit

Syscall arguments are abi_long in user code, and plugin syscall
interface works with uint64_t only.

According to C integer promotion rules, the value is sign extended
before becoming unsigned, thus setting high bits when only 32-bit lower
ones should have a significant value.

As a result, we need to clamp values we receive from user-code
accordingly.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260305-setpc-v5-v7-1-4c3adba52403@epfl.ch
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
3 months agoMerge tag 'next-pr-pull-request' of https://gitlab.com/berrange/qemu into staging
Peter Maydell [Thu, 5 Mar 2026 17:49:14 +0000 (17:49 +0000)] 
Merge tag 'next-pr-pull-request' of https://gitlab.com/berrange/qemu into staging

* Increase pre-alloc max thread count to 32
* Fix checkpatch warning for new/removed files with --terse
* Detect more GPL boilerplate in checkpatch
* Fix lean of data in TLS/websock GSource cancellation
* Tweak CPU docs for DiamondRapids
* Unconditionally enable thread naming
* Fix race setting thread naming on Win32
* Add API docs for logging APIs
* Fix interleaved error/trace output
* Fix missing error prefixes with warn_report
* Add detailed error reporting for VNC passworrd changes
* Refactoring of error_vprintf & related funcs

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE2vOm/bJrYpEtDo4/vobrtBUQT98FAmmpwaAACgkQvobrtBUQ
# T98nOg/8C+KQIoe02C6PkVIaH/maDuyAsWYMPkVySgL5Zt+lKR8hS+voyP56ON7S
# UltpZq+NHHQkrjh6O1jfJ7io1inEgXPKxbzKMi9SR0q6+Qva7Js2MJR8RSip8QTX
# lVGiRyCTGdgdDiXa+5t+N7zKwShdSVJ7lDh8G/Y/zWGeSzhOUs3BLTYCc8jVwvM/
# Frnvwk7XVX0SjZlI2xqIPYclzKNScM9QYwmAKDDvBgbxBPUq17NxprOyObSsR8Nc
# ajP6SckaZr2w8JgZ9wPRrGkEnts+MTk/6O/qTwuljbxj+GzaAuT7beJ6uVQMTAhj
# wvXC9ZCe+WnH4KBvOfb789M9wRD0VQLO3d4ejYm7z7dxjgpO/YTbMIFGcG/GO8Np
# /rS9EVpXlNX37x4pR4U7i/SkMtl/a5XyIdd8toSSfrmOODc7pzqmE+YM0F1nj+/U
# Hb/Zkl2A72OW7NRRZ0h2UL1qJ10NYc0WUb3YOE4/zLjSSt1LVDDH4a8qiRR/ooF4
# 7W3Xp9BZAhxO/fvWOdrv4oC73udJcxN38yRkSx8tO4oZiwMhAnNtZNMVNcib6XpL
# 1QQQDVEAvjnOElStYlFqbetaoknGkQ+QmIkr2SXDwpKaoFn1H6IWi0rvR5/2FjWV
# Ps7sLmGVtgZixLLNZYNp9F3CZ69UpXLE0jUxnA75VOfm8wKQJIU=
# =BVE/
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Mar  5 17:47:12 2026 GMT
# gpg:                using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full]
# gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>" [full]
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* tag 'next-pr-pull-request' of https://gitlab.com/berrange/qemu: (27 commits)
  util/oslib-posix: increase memprealloc thread count to 32
  scripts/checkpatch: Fix MAINTAINERS update warning with --terse
  util: fix interleaving of error prefixes
  util: don't skip error prefixes when QMP is active
  util: fix interleaving of error & trace output
  monitor: move error_vprintf back to error-report.c
  monitor: refactor error_vprintf()
  monitor: remove redundant error_[v]printf_unless_qmp
  ui: remove redundant use of error_printf_unless_qmp()
  ui: add proper error reporting for password changes
  util/log: add missing error reporting in qemu_log_trylock_with_err
  util: avoid repeated prefix on incremental qemu_log calls
  util: introduce some API docs for logging APIs
  util: add API to fetch the current thread name
  util: set the name for the 'main' thread on Windows
  audio: make jackaudio use qemu_thread_set_name
  util: expose qemu_thread_set_name
  util: fix race setting thread name on Win32
  system: unconditionally enable thread naming
  monitor: initialize global data from a constructor
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agotests/functional/aarch64/test_aspeed_ast2700fc: Update test ASPEED OpenBMC SDK v11.01
Jamin Lin [Tue, 3 Mar 2026 06:39:46 +0000 (06:39 +0000)] 
tests/functional/aarch64/test_aspeed_ast2700fc: Update test ASPEED OpenBMC SDK v11.01

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-11-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/aarch64/test_aspeed_ast2700a2: Update test ASPEED OpenBMC SDK v11.01
Jamin Lin [Tue, 3 Mar 2026 06:39:45 +0000 (06:39 +0000)] 
tests/functional/aarch64/test_aspeed_ast2700a2: Update test ASPEED OpenBMC SDK v11.01

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-10-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/aarch64/test_aspeed_ast2700a1: Update test ASPEED OpenBMC SDK v11.01
Jamin Lin [Tue, 3 Mar 2026 06:39:43 +0000 (06:39 +0000)] 
tests/functional/aarch64/test_aspeed_ast2700a1: Update test ASPEED OpenBMC SDK v11.01

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-9-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/arm/test_aspeed_ast2600_sdk_515: Update test ASPEED OpenBMC SDK...
Jamin Lin [Tue, 3 Mar 2026 06:39:42 +0000 (06:39 +0000)] 
tests/functional/arm/test_aspeed_ast2600_sdk_515: Update test ASPEED OpenBMC SDK v11.01

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/arm/test_aspeed_ast2600_sdk_otp: Update test ASPEED OpenBMC SDK...
Jamin Lin [Tue, 3 Mar 2026 06:39:41 +0000 (06:39 +0000)] 
tests/functional/arm/test_aspeed_ast2600_sdk_otp: Update test ASPEED OpenBMC SDK v11.01

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-7-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/arm/test_aspeed_ast2600_sdk: Update test ASPEED OpenBMC SDK v11.01
Jamin Lin [Tue, 3 Mar 2026 06:39:39 +0000 (06:39 +0000)] 
tests/functional/arm/test_aspeed_ast2600_sdk: Update test ASPEED OpenBMC SDK v11.01

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/arm/test_aspeed_ast2500_sdk_515: Update test ASPEED OpenBMC SDK...
Jamin Lin [Tue, 3 Mar 2026 06:39:38 +0000 (06:39 +0000)] 
tests/functional/arm/test_aspeed_ast2500_sdk_515: Update test ASPEED OpenBMC SDK v11.01

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/arm/test_aspeed_ast2500_sdk: Update test ASPEED OpenBMC SDK v11.01
Jamin Lin [Tue, 3 Mar 2026 06:39:36 +0000 (06:39 +0000)] 
tests/functional/arm/test_aspeed_ast2500_sdk: Update test ASPEED OpenBMC SDK v11.01

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/arm/test_aspeed_ast1060: Update test aspeed-zephyr-project v03.05
Jamin Lin [Tue, 3 Mar 2026 06:39:35 +0000 (06:39 +0000)] 
tests/functional/arm/test_aspeed_ast1060: Update test aspeed-zephyr-project v03.05

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/arm/test_aspeed_ast1030: Update test ASPEED Zephyr SDK v03.06
Jamin Lin [Tue, 3 Mar 2026 06:39:33 +0000 (06:39 +0000)] 
tests/functional/arm/test_aspeed_ast1030: Update test ASPEED Zephyr SDK v03.06

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260303063930.2878300-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/mock-i3c-target: Simplify GETMRL byte extraction logic
Jamin Lin [Tue, 3 Mar 2026 01:33:29 +0000 (01:33 +0000)] 
hw/i3c/mock-i3c-target: Simplify GETMRL byte extraction logic

The GETMRL handling logic extracted MSB/LSB bytes from
s->cfg.buf_size using a mask-and-shift expression:

  (buf_size & (0xff00 >> (offset * 8))) >>
  (8 - (offset * 8))

While functionally correct, the expression is difficult to read
and obscures the intent, which is simply to return a 16-bit value
in MSB-first order.

Replace the mask/shift formula with explicit MSB/LSB extraction:

  offset == 0 -> buf_size >> 8
  offset == 1 -> buf_size & 0xff

This makes the code clearer and easier to review without altering
behavior or data ordering.

No functional change.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260303013322.1297499-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/core: Initialize num_sent in i3c_send_byte()
Jamin Lin [Tue, 3 Mar 2026 01:33:28 +0000 (01:33 +0000)] 
hw/i3c/core: Initialize num_sent in i3c_send_byte()

i3c_send_byte() declared num_sent without initializing it before
passing its address to i3c_send().

Although i3c_send_byte() itself ignores num_sent after the call,
i3c_send() forwards it to trace_i3c_send(). If the target send
callback does not set *num_sent, the trace may print an
uninitialized value, leading to misleading or garbage output.

Example concern from review:
  trace_i3c_send(*num_sent, num_to_send, ret == 0);

If *num_sent is not written by the callback, this trace can report
an incorrect number of transmitted bytes.

Initialize num_sent to 0 to ensure deterministic and predictable
trace output, even if the callback fails to update it.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260303013322.1297499-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/mock-i3c-target: Set num_sent in TX callback to fix trace reporting
Jamin Lin [Tue, 3 Mar 2026 01:33:26 +0000 (01:33 +0000)] 
hw/i3c/mock-i3c-target: Set num_sent in TX callback to fix trace reporting

mock_i3c_target_tx() did not update *num_sent before returning.

Although some callers may not directly use this value, i3c_send()
passes num_sent to trace_i3c_send(). If the target TX callback does
not initialize *num_sent, the trace output may report an incorrect
or uninitialized value, leading to confusing debugging information.

For example, the following trace was observed:

  mock_i3c_target_tx I3C mock target write 0x12
  i3c_send I3C send 0/1 bytes, ack=1    (expected 1/1 bytes)

This happens because *num_sent was never set by the TX callback.

Fix this by setting *num_sent in all return paths,
including the IBI magic handling case, to accurately reflect
the number of bytes consumed.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260303013322.1297499-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Use ROUND_UP() for RX buffer allocation alignment
Jamin Lin [Tue, 3 Mar 2026 01:33:24 +0000 (01:33 +0000)] 
hw/i3c/dw-i3c: Use ROUND_UP() for RX buffer allocation alignment

The RX temporary buffer allocation manually aligned the size using:

    num + (4 - (num & 0x03))

Replace this with ROUND_UP(num, 4) for better readability and
consistency with common QEMU coding style.

No functional change.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260303013322.1297499-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c: Fix array bounds and storage in i3c_addr_is_rsvd()
Cédric Le Goater [Mon, 2 Mar 2026 19:39:31 +0000 (20:39 +0100)] 
hw/i3c: Fix array bounds and storage in i3c_addr_is_rsvd()

The size of the is_rsvd lookup table in i3c_addr_is_rsvd() is 255 but
should be 256 to cover all possible uint8_t address values and avoid
potential out-of-bounds access.

The array should be static too as it's a constant lookup table.

Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Nabih Estefan <nabihestefan@google.com>
Link: https://lore.kernel.org/qemu-devel/20260302193931.382228-1-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agoMAINTAINERS: Add I3C maintainers and reviewer
Jamin Lin [Wed, 25 Feb 2026 02:12:40 +0000 (02:12 +0000)] 
MAINTAINERS: Add I3C maintainers and reviewer

Add a new I3C section to the MAINTAINERS file.

List Joe Komlodi, Cédric Le Goater and Jamin Lin
as maintainers, and Nabih Estefan as the reviewer,
covering the I3C core and related files under hw/i3c/
and include/hw/i3c/.

Signed-off-by: Nabih Estefan <nabihestefan@google.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-23-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agotests/functional/arm/test_aspeed_ast2600_sdk: Add i3c functional test
Jamin Lin [Wed, 25 Feb 2026 02:12:38 +0000 (02:12 +0000)] 
tests/functional/arm/test_aspeed_ast2600_sdk: Add i3c functional test

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-22-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c: Add hotplug support
Jamin Lin [Wed, 25 Feb 2026 02:12:36 +0000 (02:12 +0000)] 
hw/i3c: Add hotplug support

This adds support for hotplugging in I3C.
Conceptually this can be thought of as an I3C target being physically
socketed onto a board.
It is then the target's responsibility to go through the hot-join and
DAA process so it can participate on the bus.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-21-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/arm/aspeed: Build with I3C_DEVICES
Jamin Lin [Wed, 25 Feb 2026 02:12:34 +0000 (02:12 +0000)] 
hw/arm/aspeed: Build with I3C_DEVICES

Allows us to attach the mock I3C target

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-20-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c: Add Mock target
Jamin Lin [Wed, 25 Feb 2026 02:12:33 +0000 (02:12 +0000)] 
hw/i3c: Add Mock target

Adds a simple i3c device to be used for testing in lieu of a real
device.

The mock target supports the following features:
- A buffer that users can read and write to.
- CCC support for commonly used CCCs when probing devices on an I3C bus.
- IBI sending upon receiving a user-defined byte.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-19-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/aspeed: Add I3C bus get function
Jamin Lin [Wed, 25 Feb 2026 02:12:31 +0000 (02:12 +0000)] 
hw/i3c/aspeed: Add I3C bus get function

To retrieve the I3C bus object normally, the order is Aspeed I3C -> DW
I3C[n] -> bus object, so make a nice wrapper for people to use.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-18-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Add controller resets
Jamin Lin [Wed, 25 Feb 2026 02:12:29 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Add controller resets

Adds behavior to the device reset register.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Stephen Longfield <slongfield@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-17-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Add ctrl MMIO handling
Jamin Lin [Wed, 25 Feb 2026 02:12:27 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Add ctrl MMIO handling

Adds functionality to the CTRL register.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-16-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Add IBI handling
Jamin Lin [Wed, 25 Feb 2026 02:12:25 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Add IBI handling

Adds handling for different IBI events that the controller can receive.
This includes:
- Handling a hot-join from a target
- Handling a secondary controller on the bus requesting to be the
  primary bus controller
- Handling an interrupt request from a target.

When receiving an IBI, the controller sets an interrupt to notify
software about what happened.
When the IBI is finished being serviced, the controller pushes the
result of the IBI and any data received from the target into the IBI
queue.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Stephen Longfield <slongfield@google.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-15-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Add data TX and RX
Jamin Lin [Wed, 25 Feb 2026 02:12:23 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Add data TX and RX

This adds data and CCC transmission, reception, and the associated
queues required for data transmission and reception to happen.

The I3C controller transmits data by the user writing into a command
queue. When the queue has a command and an argument in it, the
controller starts executing the command.

The controller can execute 1 of 3 ways:
1. A larger data transfer that involves using the TX and RX queues. This
   is the most common way the controller does transactions.

2. A small data transfer that involves sending a couple bytes passed
   into the command queue argument.

3. An address assignment command. This is how the controller does
   ENTDAA. When ENTDAA succeeds in assigning an address to a target, it
   updates the controller's char table with the target's PID, BCR, and
   DCR.

The controller determines what addresses to send by looking at the index
in the device address table specified by the argument in the command
queue. ENTDAA also uses these addresses to assign to targets on the bus.

When the controller is done executing a command, it puts a response in
the response queue indicating how command execution went.

In order for the user to send and receive data to/from the controller,
the user reads/writes to a bidirectional TX/RX port.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Stephen Longfield <slongfield@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-14-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Add IRQ MMIO behavior
Jamin Lin [Wed, 25 Feb 2026 02:12:21 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Add IRQ MMIO behavior

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-13-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Use 32 bits on MMIO writes
Jamin Lin [Wed, 25 Feb 2026 02:12:19 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Use 32 bits on MMIO writes

The registers are only 32 bits wide, so we should cast the 64-bit value
passed in to only be 32 bits wide.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-12-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Treat more registers as read-as-zero
Jamin Lin [Wed, 25 Feb 2026 02:12:17 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Treat more registers as read-as-zero

RESET_CTRL and INTR_FORCE are write-only.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-11-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Add register RO field masks
Jamin Lin [Wed, 25 Feb 2026 02:12:15 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Add register RO field masks

Adds read-only register masks for the DwC I3C controller.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-10-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/aspeed_i3c: Add register RO field masks
Jamin Lin [Wed, 25 Feb 2026 02:12:13 +0000 (02:12 +0000)] 
hw/i3c/aspeed_i3c: Add register RO field masks

Adds read-only register masks for the Aspeed I3C controller registers.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-9-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Add more reset values
Jamin Lin [Wed, 25 Feb 2026 02:12:12 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Add more reset values

Adds reset values for the new registers added.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-8-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/aspeed_i3c: Add more register fields
Jamin Lin [Wed, 25 Feb 2026 02:12:10 +0000 (02:12 +0000)] 
hw/i3c/aspeed_i3c: Add more register fields

Adds the rest of the Aspeed I3C controller register fields.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-7-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/dw-i3c: Add more register fields
Jamin Lin [Wed, 25 Feb 2026 02:12:08 +0000 (02:12 +0000)] 
hw/i3c/dw-i3c: Add more register fields

Adds the rest of the Designware register fields.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-6-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c: Split DesignWare I3C out of Aspeed I3C
Jamin Lin [Wed, 25 Feb 2026 02:12:06 +0000 (02:12 +0000)] 
hw/i3c: Split DesignWare I3C out of Aspeed I3C

The Aspeed I3C IP block is technically an Aspeed IP block that manages
6 DW I3C controllers.

To help reflect this better and to make it easier for other SoCs to use
the DW I3C model, we'll split out the DW portion from the Aspeed
portion.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-5-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c: Add bus support
Jamin Lin [Wed, 25 Feb 2026 02:12:04 +0000 (02:12 +0000)] 
hw/i3c: Add bus support

Adds an I3C bus and a target class.
The bus supports:
- I3C data transmission and reception
- CCCs (including ENTDAA)
- IBIs
- legacy I2C transactions

General usage of the bus is similar to I2C. Users are expected to
initialize a bus via i3c_init_bus, and use the bus returned from the
init function to do transactions on the bus.

In order to handle IBIs, the controller provides callbacks to handle
receiving an IBI from a target, receiving (optional) additional IBI
bytes from a target, and handling when a target is done with its IBI.

Similarly, target creation is done via i3c_target_create_simple and
users use the provided I3CTarget to handle transactions.
The target has functions provided that it can use to invoke an IBI and
send additional bytes.

Along with the send, recv, and event callbacks that are expected of an
I3C target, which are similar to I2C, there is a separate callback for
CCC handling.
This is to help encapsulate CCC handling and keep it separate from
target-specific read/write functionality.

To avoid repition for required CCCs among I3C targets, there is some
class-level CCC handling added. The CCC is then passed to the target in
case it needs to handle it in some way.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-4-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i3c/aspeed_i3c: Switch to DEFINE_TYPES() and align parent_obj naming
Jamin Lin [Wed, 25 Feb 2026 02:12:02 +0000 (02:12 +0000)] 
hw/i3c/aspeed_i3c: Switch to DEFINE_TYPES() and align parent_obj naming

Following review feedback, update the Aspeed I3C device to use the
DEFINE_TYPES() macro instead of an explicit type registration function.

DEFINE_TYPES() is the currently recommended approach in QEMU for
registering multiple TypeInfo entries and avoids boilerplate
type_init() code.

Additionally, rename embedded SysBusDevice fields from "parent" to
"parent_obj" to comply with the QEMU coding style guidelines for QOM
objects.

No functional change.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-3-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/misc/aspeed_i3c: Move to i3c directory
Jamin Lin [Wed, 25 Feb 2026 02:12:01 +0000 (02:12 +0000)] 
hw/misc/aspeed_i3c: Move to i3c directory

Moves the Aspeed I3C model and traces into hw/i3c and creates I3C build
files.

Signed-off-by: Joe Komlodi <komlodi@google.com>
Reviewed-by: Patrick Venture <venture@google.com>
Reviewed-by: Titus Rwantare <titusr@google.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Tested-by: Jithu Joseph <jithu.joseph@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20260225021158.1586584-2-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agohw/i2c/aspeed_i2c: Fix DMA64 address handling
Jamin Lin [Tue, 24 Feb 2026 07:32:09 +0000 (07:32 +0000)] 
hw/i2c/aspeed_i2c: Fix DMA64 address handling

The current code updates the upper 32 bits of dma_dram_offset only when
aic->has_dma64 is false, which is incorrect.

If aic->has_dma64 is true, the controller supports 64-bit DMA addressing
and the upper 32-bit DMA address register must be used to update the
dma_dram_offset accordingly.

Fix the condition so that the upper 32 bits are updated only when
64-bit DMA is supported.

Fixes: efea7ddb4689a1ac4bce63a9ddb32887c7f3ac50 ("hw/i2c/aspeed_i2c: Fix DMA moving data into incorrect address")
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260224073207.985162-1-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
3 months agoutil/oslib-posix: increase memprealloc thread count to 32
Jon Kohler [Thu, 6 Nov 2025 16:31:43 +0000 (09:31 -0700)] 
util/oslib-posix: increase memprealloc thread count to 32

Increase MAX_MEM_PREALLOC_THREAD_COUNT from 16 to 32. This was last
touched in 2017 [1] and, since then, physical machine sizes and VMs
therein have continue to get even bigger, both on average and on the
extremes.

For very large VMs, using 16 threads to preallocate memory can be a
non-trivial bottleneck during VM start-up and migration. Increasing
this limit to 32 threads reduces the time taken for these operations.

Test results from quad socket Intel 8490H (4x 60 cores) show a fairly
linear gain of 50% with the 2x thread count increase.

---------------------------------------------
Idle Guest w/ 2M HugePages   | Start-up time
---------------------------------------------
240 vCPU, 7.5TB (16 threads) | 2m41.955s
---------------------------------------------
240 vCPU, 7.5TB (32 threads) | 1m19.404s
---------------------------------------------

Note: Going above 32 threads appears to have diminishing returns at
the point where the memory bandwidth and context switching costs
appear to be a limiting factor to linear scaling. For posterity, on
the same system as above:
- 32 threads: 1m19s
- 48 threads: 1m4s
- 64 threads: 59s
- 240 threads: 50s

Additional thread counts also get less interesting as the amount of
memory is to be preallocated is smaller. Putting that all together,
32 threads appears to be a sane number with a solid speedup on fairly
modern hardware. To go faster, we'd either need to improve the hardware
(CPU/memory) itself or improve clear_pages_*() on the kernel side to
be more efficient.

[1] 1e356fc14bea ("mem-prealloc: reduce large guest start-up and migration time.")

Signed-off-by: Jon Kohler <jon@nutanix.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoscripts/checkpatch: Fix MAINTAINERS update warning with --terse
Markus Armbruster [Fri, 9 Jan 2026 07:12:17 +0000 (08:12 +0100)] 
scripts/checkpatch: Fix MAINTAINERS update warning with --terse

We recently improved the MAINTAINERS update warning to show the files
that trigger it.  Example:

    WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
    #105:
    deleted file mode 100644

improved to

    WARNING: added, moved or deleted file(s):

      migration/threadinfo.h
      migration/threadinfo.c

    Does MAINTAINERS need updating?

Unfortunately, this made things worse with --terse, as only the first
line of each warning is shown then.

    WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?

became

    WARNING: added, moved or deleted file(s):

Adjust the warning text to

    WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
      migration/threadinfo.h
      migration/threadinfo.c

so we get the exact same warning as we used to with --terse.

Fixes: 1d745e6d9635 (scripts/checkpatch: use new hook for MAINTAINERS update check)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
[DB: fix typo with missing string concat operator]
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: fix interleaving of error prefixes
Daniel P. Berrangé [Wed, 24 Sep 2025 17:55:21 +0000 (18:55 +0100)] 
util: fix interleaving of error prefixes

The vreport() function will optionally emit an prefix for error
messages which is output to stderr incrementally. In the event
that two vreport() calls execute concurrently, there is a risk
that the prefix output will interleave. To address this it is
required to take a lock on 'stderr' when outputting errors.

Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: don't skip error prefixes when QMP is active
Daniel P. Berrangé [Wed, 10 Sep 2025 16:25:59 +0000 (17:25 +0100)] 
util: don't skip error prefixes when QMP is active

The vreport() function will print to HMP if available, otherwise
to stderr. In the event that vreport() is called during execution
of a QMP command, it will print to stderr, but mistakenly omit the
message prefixes (timestamp, guest name, program name).

This new usage of monitor_is_cur_qmp() from vreport() requires that
we add a stub to satisfy linking of non-system emulator binaries.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: fix interleaving of error & trace output
Daniel P. Berrangé [Wed, 10 Sep 2025 16:32:37 +0000 (17:32 +0100)] 
util: fix interleaving of error & trace output

The monitor_cur_hmp() function will acquire/release mutex locks, which
will trigger trace probes, which can in turn trigger qemu_log() calls.
vreport() calls monitor_cur() multiple times through its execution
both directly and indirectly via error_vprintf().

The result is that the prefix information printed by vreport() gets
interleaved with qemu_log() output, when run outside the context of
an HMP command dispatcher. This can be seen with:

 $ qemu-system-x86_64 \
     -msg timestamp=on,guest-name=on \
     -display none \
     -object tls-creds-x509,id=f,dir=fish \
     -name fish \
     -d trace:qemu_mutex*
   2025-09-10T16:30:42.514374Z qemu_mutex_unlock released mutex 0x560b0339b4c0 (/var/home/berrange/src/virt/qemu/include/qemu/lockable.h:56)
   2025-09-10T16:30:42.514400Z qemu_mutex_lock waiting on mutex 0x560b033983e0 (/var/home/berrange/src/virt/qemu/include/qemu/lockable.h:56)
   2025-09-10T16:30:42.514402Z qemu_mutex_locked taken mutex 0x560b033983e0 (/var/home/berrange/src/virt/qemu/include/qemu/lockable.h:56)
   2025-09-10T16:30:42.514404Z qemu_mutex_unlock released mutex 0x560b033983e0 (/var/home/berrange/src/virt/qemu/include/qemu/lockable.h:56)
   2025-09-10T16:30:42.516716Z qemu_mutex_lock waiting on mutex 0x560b03398560 (../monitor/monitor.c:91)
   2025-09-10T16:30:42.516723Z qemu_mutex_locked taken mutex 0x560b03398560 (../monitor/monitor.c:91)
   2025-09-10T16:30:42.516726Z qemu_mutex_unlock released mutex 0x560b03398560 (../monitor/monitor.c:96)
   2025-09-10T16:30:42.516728Z qemu_mutex_lock waiting on mutex 0x560b03398560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842057Z qemu_mutex_locked taken mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842058Z qemu_mutex_unlock released mutex 0x564f5e401560 (../monitor/monitor.c:96)
   2025-09-10T16:31:04.842055Z 2025-09-10T16:31:04.842060Z qemu_mutex_lock waiting on mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842061Z qemu_mutex_locked taken mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842062Z qemu_mutex_unlock released mutex 0x564f5e401560 (../monitor/monitor.c:96)
   2025-09-10T16:31:04.842064Z qemu_mutex_lock waiting on mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842065Z qemu_mutex_locked taken mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842066Z qemu_mutex_unlock released mutex 0x564f5e401560 (../monitor/monitor.c:96)
   fish 2025-09-10T16:31:04.842068Z qemu_mutex_lock waiting on mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842069Z qemu_mutex_locked taken mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842070Z qemu_mutex_unlock released mutex 0x564f5e401560 (../monitor/monitor.c:96)
   2025-09-10T16:31:04.842072Z qemu_mutex_lock waiting on mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842097Z qemu_mutex_locked taken mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842099Z qemu_mutex_unlock released mutex 0x564f5e401560 (../monitor/monitor.c:96)
   qemu-system-x86_64:2025-09-10T16:31:04.842100Z qemu_mutex_lock waiting on mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842102Z qemu_mutex_locked taken mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842103Z qemu_mutex_unlock released mutex 0x564f5e401560 (../monitor/monitor.c:96)
    2025-09-10T16:31:04.842105Z qemu_mutex_lock waiting on mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842106Z qemu_mutex_locked taken mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842107Z qemu_mutex_unlock released mutex 0x564f5e401560 (../monitor/monitor.c:96)
   Unable to access credentials fish/ca-cert.pem: No such file or directory2025-09-10T16:31:04.842109Z qemu_mutex_lock waiting on mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842110Z qemu_mutex_locked taken mutex 0x564f5e401560 (../monitor/monitor.c:91)
   2025-09-10T16:31:04.842111Z qemu_mutex_unlock released mutex 0x564f5e401560 (../monitor/monitor.c:96)

To avoid this interleaving (as well as reduce the huge number of
mutex lock/unlock calls) we need to ensure that monitor_cur_is_hmp()
is only called once at the start of vreport(), and if no HMP is
present, no further monitor APIs can be called.

This implies error_[v]printf() cannot be called from vreport().
Instead we must introduce error_[v]printf_mon() which accept a
pre-acquired Monitor object. In some cases, however, fprintf
can be called directly as output will never be directed to the
monitor.

 $ qemu-system-x86_64 \
     -msg timestamp=on,guest-name=on \
     -display none \
     -object tls-creds-x509,id=f,dir=fish \
     -name fish \
     -d trace:qemu_mutex*
   2025-09-10T16:31:22.701691Z qemu_mutex_unlock released mutex 0x5626fd3b84c0 (/var/home/berrange/src/virt/qemu/include/qemu/lockable.h:56)
   2025-09-10T16:31:22.701728Z qemu_mutex_lock waiting on mutex 0x5626fd3b53e0 (/var/home/berrange/src/virt/qemu/include/qemu/lockable.h:56)
   2025-09-10T16:31:22.701730Z qemu_mutex_locked taken mutex 0x5626fd3b53e0 (/var/home/berrange/src/virt/qemu/include/qemu/lockable.h:56)
   2025-09-10T16:31:22.701732Z qemu_mutex_unlock released mutex 0x5626fd3b53e0 (/var/home/berrange/src/virt/qemu/include/qemu/lockable.h:56)
   2025-09-10T16:31:22.703989Z qemu_mutex_lock waiting on mutex 0x5626fd3b5560 (../monitor/monitor.c:91)
   2025-09-10T16:31:22.703996Z qemu_mutex_locked taken mutex 0x5626fd3b5560 (../monitor/monitor.c:91)
   2025-09-10T16:31:22.703999Z qemu_mutex_unlock released mutex 0x5626fd3b5560 (../monitor/monitor.c:96)
   2025-09-10T16:31:22.704000Z fish qemu-system-x86_64: Unable to access credentials fish/ca-cert.pem: No such file or directory

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agomonitor: move error_vprintf back to error-report.c
Daniel P. Berrangé [Wed, 24 Sep 2025 15:25:45 +0000 (16:25 +0100)] 
monitor: move error_vprintf back to error-report.c

The current unit tests rely on monitor.o not being linked, such
that the monitor stubs get linked instead. Since error_vprintf
is in monitor.o this allows a stub error_vprintf impl to be used
that calls g_test_message.

This takes a different approach, with error_vprintf moving
back to error-report.c such that it is always linked into the
tests. The monitor_vprintf() stub is then changed to use
g_test_message if QTEST_SILENT_ERRORS is set, otherwise it will
return -1 and trigger error_vprintf to call vfprintf.

The end result is functionally equivalent for the purposes of
the unit tests.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agomonitor: refactor error_vprintf()
Daniel P. Berrangé [Wed, 24 Sep 2025 15:12:41 +0000 (16:12 +0100)] 
monitor: refactor error_vprintf()

The monitor_vprintf() code will return -1 if either the monitor
is NULL, or the monitor is QMP. The error_vprintf() code can
take advantage of this to avoid having to duplicate the same
checks, and instead simply look at the return value.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agomonitor: remove redundant error_[v]printf_unless_qmp
Daniel P. Berrangé [Wed, 10 Sep 2025 15:29:31 +0000 (16:29 +0100)] 
monitor: remove redundant error_[v]printf_unless_qmp

The only callers of these functions have been removed. Adding any
new usage of them is highly undesirable, so they should be entirely
removed.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoui: remove redundant use of error_printf_unless_qmp()
Daniel P. Berrangé [Wed, 14 Jan 2026 11:56:36 +0000 (11:56 +0000)] 
ui: remove redundant use of error_printf_unless_qmp()

The vnc_display_print_local_addr() method is intended to print the VNC
listening address on the console at startup, so the user can see the
auto-chosen port address when using the 'to=' flag. This is only called
by vnc_display_open() which is in the QEMU startup callpath. The check
for not being in QMP is thus redundant and can be removed.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoui: add proper error reporting for password changes
Daniel P. Berrangé [Wed, 14 Jan 2026 11:49:36 +0000 (11:49 +0000)] 
ui: add proper error reporting for password changes

Neither the VNC or SPICE code for password changes provides error
reporting at source, leading the callers to report a largely useless
generic error message.

Fixing this removes one of the two remaining needs for the undesirable
error_printf_unless_qmp() method.

While fixing this the error message hint is improved to recommend the
'password-secret' option which allows securely passing a password at
startup.

Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil/log: add missing error reporting in qemu_log_trylock_with_err
Daniel P. Berrangé [Tue, 13 Jan 2026 11:52:02 +0000 (11:52 +0000)] 
util/log: add missing error reporting in qemu_log_trylock_with_err

One codepath that could return NULL failed to populate the errp
object.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: avoid repeated prefix on incremental qemu_log calls
Daniel P. Berrangé [Fri, 29 Aug 2025 16:04:53 +0000 (17:04 +0100)] 
util: avoid repeated prefix on incremental qemu_log calls

There are three general patterns to QEMU log output

 1. Single complete message calls

      qemu_log("Some message\n");

 2. Direct use of fprintf

      FILE *f = qemu_log_trylock()
      fprintf(f, "...");
      fprintf(f, "...");
      fprintf(f, "...\n");
      qemu_log_unlock(f)

 3. Mixed use of qemu_log_trylock/qemu_log()

      FILE *f = qemu_log_trylock()
      qemu_log("....");
      qemu_log("....");
      qemu_log("....\n");
      qemu_log_unlock(f)

When message prefixes are enabled, the timestamp will be
unconditionally emitted for all qemu_log() calls. This
works fine in the 1st case, and has no effect in the 2nd
case. In the 3rd case, however, we get the timestamp
printed over & over in each fragment.

One can suggest that pattern (3) is pointless as it is
functionally identical to (2) but with extra indirection
and overhead. None the less we have a fair bit of code
that does this.

The qemu_log() call itself is nothing more than a wrapper
which does pattern (2) with a single fprintf() call.

One might question whether (2) should include the message
prefix in the same way that (1), but there are scenarios
where this could be inappropriate / unhelpful such as the
CPU register dumps or linux-user strace output.

This patch fixes the problem in pattern (3) by keeping
track of the call depth of qemu_log_trylock() and then
only emitting the the prefix when the starting depth
was zero. In doing this qemu_log_trylock_context() is
also introduced as a variant of qemu_log_trylock()
that emits the prefix. Callers doing to batch output
can thus choose whether a prefix is appropriate or
not.

Fixes: 012842c07552 (log: make '-msg timestamp=on' apply to all qemu_log usage)
Reported-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: introduce some API docs for logging APIs
Daniel P. Berrangé [Wed, 24 Sep 2025 09:16:29 +0000 (10:16 +0100)] 
util: introduce some API docs for logging APIs

There is a gotcha with qemu_log() usage in a threaded process.
If fragments of a log message are output via qemu_log() it is
possible for messages from two threads to get mixed up. To
prevent this qemu_log_trylock() should be used, along with
fprintf(f) calls.

This is a subtle problem that needs to be explained in the
API docs to ensure correct usage.

In the Rust code, the log_mask_ln method which is conceptually
equivalent to the C qemu_log() call will unconditionally append
a newline so must only ever be used for complete log messages.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: add API to fetch the current thread name
Daniel P. Berrangé [Fri, 29 Aug 2025 15:30:26 +0000 (16:30 +0100)] 
util: add API to fetch the current thread name

This will be used to include the thread name in error reports
in a later patch. It returns a const string stored in a thread
local to avoid memory allocation when it is called repeatedly
in a single thread. The thread name should be set at the very
start of the thread execution, which is the case when using
qemu_thread_create.

This uses the official thread APIs for fetching thread names,
so that it captures  names of threads spawned by code in 3rd
party libraries, not merely QEMU spawned thrads.

This also addresses the gap from the previous patch for setting
the name of the main thread. A constructor is used to initialize
the 'namebuf' thread-local in the main thread only.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: set the name for the 'main' thread on Windows
Daniel P. Berrangé [Wed, 6 Aug 2025 14:56:37 +0000 (15:56 +0100)] 
util: set the name for the 'main' thread on Windows

The default main thread name is undefined, so use a constructor to
explicitly set it to 'main'. This constructor is marked to run early
as the thread name is intended to be used in error reporting / logs
which may be triggered very early in QEMU execution.

This is only done on Windows platforms, because on Linux (and possibly
other POSIX platforms) changing the main thread name has a side effect
of changing the process name reported by tools like 'ps' which fetch
from the file /proc/self/task/tid/comm, expecting it to be the binary
name.

The subsequent patch will address POSIX platforms in a different way.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoaudio: make jackaudio use qemu_thread_set_name
Daniel P. Berrangé [Fri, 29 Aug 2025 15:12:32 +0000 (16:12 +0100)] 
audio: make jackaudio use qemu_thread_set_name

This has greater portability than directly call pthread_setname_np,
which is only 1 out of 3 possible functions for pthreads that can
set the name.

The new API requires a trampoline function, since it can only set
the name of the current thread.

Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: expose qemu_thread_set_name
Daniel P. Berrangé [Fri, 29 Aug 2025 14:51:07 +0000 (15:51 +0100)] 
util: expose qemu_thread_set_name

The ability to set the thread name needs to be used in a number
of places, so expose the current impls as public methods.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoutil: fix race setting thread name on Win32
Daniel P. Berrangé [Tue, 10 Feb 2026 17:24:43 +0000 (17:24 +0000)] 
util: fix race setting thread name on Win32

The call to set the thread name on Win32 platforms is done by the parent
thread, after _beginthreadex() returns. At this point the new child
thread is potentially already executing its start method. To ensure the
thread name is guaranteed to be set before any "interesting" code starts
executing, it must be done in the start method of the child thread itself.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agosystem: unconditionally enable thread naming
Daniel P. Berrangé [Wed, 6 Aug 2025 12:37:52 +0000 (13:37 +0100)] 
system: unconditionally enable thread naming

When thread naming was introduced years ago, it was disabled by
default and put behind a command line flag:

  commit 8f480de0c91a18d550721f8d9af969ebfbda0793
  Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
  Date:   Thu Jan 30 10:20:31 2014 +0000

    Add 'debug-threads' suboption to --name

This was done based on a concern that something might depend
on the historical thread naming. Thread names, however, were
never promised to be part of QEMU's public API. The defaults
will vary across platforms, so no assumptions should ever be
made about naming.

An opt-in behaviour is also unfortunately incompatible with
RCU which creates its thread from an constructor function
which is run before command line args are parsed. Thus the
RCU thread lacks any name.

libvirt has unconditionally enabled debug-threads=yes on all
VMs it creates for 10 years. Interestingly this DID expose a
bug in libvirt, as it parsed /proc/$PID/stat and could not
cope with a space in the thread name. This was a latent
pre-existing bug in libvirt though, and not a part of QEMU's
API.

Having thread names always available, will allow thread names
to be included in error reports and log messags QEMU prints
by default, which will improve ability to triage QEMU bugs.

Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agomonitor: initialize global data from a constructor
Daniel P. Berrangé [Wed, 6 Aug 2025 12:49:05 +0000 (13:49 +0100)] 
monitor: initialize global data from a constructor

Some monitor functions, most notably, monitor_cur() rely on global
data being initialized by 'monitor_init_globals()'. The latter is
called relatively late in startup. If code triggers error_report()
before monitor_init_globals() is called, QEMU will abort when
accessing the uninitialized monitor mutex.

The critical monitor global data must be initialized from a
constructor function, to improve the guarantee that it is done
before any possible calls to monitor_cur(). Not only that, but
the constructor must be marked to run before the default
constructor in case any of them trigger error reporting.

Note in particular that the RCU constructor will spawn a background
thread so we might even have non-constructor QEMU code running
concurrently with other constructors.

As a general note, constructors should be extrememly careful
about what QEMU code they invoke, as it cannot be guaranteed that
the process is fully initialized and so not all normal QEMU API
rules apply.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Fixes: e69ee454b5f9 (monitor: Make current monitor a per-coroutine property)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoinclude: define constant for early constructor priority
Daniel P. Berrangé [Wed, 6 Aug 2025 14:23:13 +0000 (15:23 +0100)] 
include: define constant for early constructor priority

Functions marked with __attribute__((__constructor__)) will be
invoked in linker order. In theory this is well defined, but
in practice, it is hard to determine what this order will be
with the layers of indirection through meson, ninja and the
static libraries QEMU builds.

Notably, the order currently appears different between Linux
and Windows (as tested with Wine on Linux). This can cause
problems when certain QEMU constructors have a dependancy on
other QEMU constructors.

To address this define a QEMU_CONSTRUCTOR_EARLY constant which
provides a priority value that will run before other default
constructors. This is to be used for QEMU constructors that
are themselves self-contained, but may be relied upon by other
constructors.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoqemu-options: remove extraneous [] around arg values
Daniel P. Berrangé [Thu, 8 Jan 2026 16:05:17 +0000 (16:05 +0000)] 
qemu-options: remove extraneous [] around arg values

There are quite a few inappropriate uses of [...] around argument
values. The [] are intended to indicate optionality, but in some
cases it is used to wrap a set of enum values. In other cases it
is being used to show the value is entirely optional, which was
common behaviour for boolean values in the past. QEMU has deprecated
short-form boolean options for quite a while though, and we should
thus not advertize this possibility in the docs.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agodocs: simplify DiamondRapids CPU docs
Daniel P. Berrangé [Wed, 11 Feb 2026 17:55:55 +0000 (17:55 +0000)] 
docs: simplify DiamondRapids CPU docs

This aligns the first line of the docs with the style used for previous
CPU models, and simplifies the text in the remaining docs.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoio: fix cleanup for websock I/O source data on cancellation
Daniel P. Berrangé [Tue, 6 Jan 2026 13:45:10 +0000 (13:45 +0000)] 
io: fix cleanup for websock I/O source data on cancellation

The websock code will create a GSource for tracking completion of the
handshake process, passing a QIOTask which is freed by the callback
when it completes, which means when a source is cancelled, nothing is
free'ing the task.

Switch to provide a data free callback to the GSource, which ensures
the QIOTask is always freed even when the main event callback never
fires.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/3114
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoio: fix cleanup for TLS I/O source data on cancellation
Daniel P. Berrangé [Tue, 6 Jan 2026 13:45:10 +0000 (13:45 +0000)] 
io: fix cleanup for TLS I/O source data on cancellation

The TLS code will create a GSource for tracking completion of the
handshake process, passing a QIOChannelTLSData struct that contains
various data items. The data struct is freed by the callback when
it completes, which means when a source is cancelled, nothing is
free'ing the data struct or its contents.

Switch to provide a data free callback to the GSource, which ensures
the QIOChannelTLSData struct is always freed even when the main event
callback never fires.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/3114
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
3 months agoMerge tag 'pull-request-2026-03-05' of https://gitlab.com/thuth/qemu into staging
Peter Maydell [Thu, 5 Mar 2026 16:58:20 +0000 (16:58 +0000)] 
Merge tag 'pull-request-2026-03-05' of https://gitlab.com/thuth/qemu into staging

* Remove deprecated i440fx and q35 machine types -2.8 up to -2.12
* Remove the related hw_compat handling in various devices

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmmpWuMACgkQLtnXdP5w
# LbXSjhAAoJ/vG6HZeuyrUzE9jkVToOpUF7d72usWS8NP07KYgKNp0kVQ/5C/QQ2s
# PR7jdWSQT7Vl+iyzvNdSV+y64rdk3XcdCrbeDXA9N4+yqWNEbq2MYECYQAW18xBR
# i8g1e9+Y/yi4yXV7U76Jx7R89btVzRdbrENlypKS2wf5wXA5m8HUegxhl8NC59eg
# u3tjZgG+tr2Fkdhs8EPA1p8naDXd00fy3imgpzN4VhGzdXTzHtH/fa5UDMjBRJtc
# NheCC4Oe0EglhDQrj+uxVf8aklCXDhSXHRKqGOOTP65z41J4gBL0k2zATAReYp3G
# RhOMtEl66U+XOFeKYxh55zS3OAK6i/Yx9K7EQwZNbZks8DJhO23Ai3TZWg086mFg
# bxr2cSpo5JKdpiQeL28GQTYA/f0wNwcn9Q01QrerfO0VTXsW4pC3rc4HukJOwp/b
# KozT4se7VtxzlJVJ7oCAYYjqiw+DZc4z7tbf/fcvyNsnHAkJB3gHeb3lJB/PW0je
# eh2N2q4Qe20ewbJbl+l+BisQ3XTDUQRf46d8iw0flvvpeAgw1Raw7cpTS+tg52wU
# UzVl8slrQcDf8Mm+BMfbcmmO7W2Zhl7c7+7RXmDVrRiHdnR4jkRcGyk4HzEObqjs
# dyYW3h2Z519TVCDdxpF6MQNy+Za9UlOOBmR0WfhRueoNM4ebCuA=
# =QYGn
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Mar  5 10:28:51 2026 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [undefined]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2026-03-05' of https://gitlab.com/thuth/qemu: (28 commits)
  hw/display/vga-pci: Do not expose the 'global-vmstate' property
  hw/audio/hda-codec: Remove HDAAudioState::use_timer field
  hw/core/machine: Remove hw_compat_2_12[] array
  hw/core/machine: Remove hw_compat_2_11[] array
  hw/input/virtio-input: Remove VirtIOInputHID::wheel_axis field
  hw/core/machine: Remove hw_compat_2_10[] array
  hw/i386/pc: Remove pc_compat_2_12[] array
  hw/i386/pc: Remove deprecated pc-q35-2.12 and pc-i440fx-2.12 machines
  hw/i386/pc: Remove pc_compat_2_11[] array
  hw/i386/pc: Remove deprecated pc-q35-2.11 and pc-i440fx-2.11 machines
  hw/i386/pc: Remove pc_compat_2_10[] array
  hw/i386/pc: Remove deprecated pc-q35-2.10 and pc-i440fx-2.10 machines
  tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine
  hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
  hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field
  hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field
  hw/core/machine: Remove hw_compat_2_9[] array
  hw/i386/pc: Remove pc_compat_2_9[] array
  hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines
  hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agoMerge tag 'pull-loongarch-20260302' of https://github.com/gaosong715/qemu into staging
Peter Maydell [Thu, 5 Mar 2026 10:48:38 +0000 (10:48 +0000)] 
Merge tag 'pull-loongarch-20260302' of https://github.com/gaosong715/qemu into staging

pull-loongarch-20260302

# -----BEGIN PGP SIGNATURE-----
#
# iLMEAAEKAB0WIQTKRzxE1qCcGJoZP81FK5aFKyaCFgUCaaVgvwAKCRBFK5aFKyaC
# FsyvA/oD4HhxbCjv6ukdYHkSj3rMxo0aTV9RzNSUGhdrC4v6LPnRf2JeEV9K65BU
# HEctYSMI64iasQBQx1FruFlVMJz+mYhHwv+FvE94TrZq1lTmbYdO1qOTChO+m+60
# B2qtT3pORejLLeawHighD9d8MkbNlXsysSMFRn4PwRYvFmYY9w==
# =CYNU
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon Mar  2 10:04:47 2026 GMT
# gpg:                using RSA key CA473C44D6A09C189A193FCD452B96852B268216
# gpg: Good signature from "Song Gao <gaosong@loongson.cn>" [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: CA47 3C44 D6A0 9C18 9A19  3FCD 452B 9685 2B26 8216

* tag 'pull-loongarch-20260302' of https://github.com/gaosong715/qemu:
  target/loongarch: Add some CPUCFG bits with host CPU model
  target/loongarch: Add host CPU model in kvm mode
  target/loongarch: Add generic CPU model information
  target/loongarch: Add default cpucfg3 with LA464 CPU
  target/loongarch: Add detailed information with CPU Product ID
  target/loongarch: Add property set with query-cpu-model-expansion
  target/loongarch: Add full type support with query-cpu-model-expansion
  target/loongarch: Add missing vCPU features with QMP method

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 months agohw/display/vga-pci: Do not expose the 'global-vmstate' property
Philippe Mathieu-Daudé [Thu, 1 May 2025 23:01:28 +0000 (01:01 +0200)] 
hw/display/vga-pci: Do not expose the 'global-vmstate' property

The "global-vmstate" property is 'false' by default, and was only
set to 'true' in the hw_compat_2_12[] array. We removed all machines
using that array. Stop exposing that property on the PCI devices.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501230129.2596-11-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/audio/hda-codec: Remove HDAAudioState::use_timer field
Philippe Mathieu-Daudé [Thu, 1 May 2025 23:01:27 +0000 (01:01 +0200)] 
hw/audio/hda-codec: Remove HDAAudioState::use_timer field

The HDAAudioState::use_timer boolean was only set in the
hw_compat_2_12[] array, via the 'use-timer=false' property.
We removed all machines using that array, lets remove that
property and all the code around it, like the compatibility
callbacks.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501230129.2596-10-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
[thuth: Rebased the patch to current master branch, fixed conflicts]
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/core/machine: Remove hw_compat_2_12[] array
Philippe Mathieu-Daudé [Thu, 1 May 2025 23:01:26 +0000 (01:01 +0200)] 
hw/core/machine: Remove hw_compat_2_12[] array

The hw_compat_2_12[] array was only used by the pc-q35-2.12,
pc-i440fx-2.12 and s390-ccw-virtio-2.12 machines, which got
removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501230129.2596-9-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/core/machine: Remove hw_compat_2_11[] array
Philippe Mathieu-Daudé [Thu, 1 May 2025 23:01:22 +0000 (01:01 +0200)] 
hw/core/machine: Remove hw_compat_2_11[] array

The hw_compat_2_11[] array was only used by the pc-q35-2.11,
pc-i440fx-2.11 and s390-ccw-virtio-2.11 machines, which got
removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501230129.2596-5-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/input/virtio-input: Remove VirtIOInputHID::wheel_axis field
Philippe Mathieu-Daudé [Thu, 1 May 2025 23:01:21 +0000 (01:01 +0200)] 
hw/input/virtio-input: Remove VirtIOInputHID::wheel_axis field

The VirtIOInputHID::wheel_axis boolean was only set in the
hw_compat_2_10[] array, via the 'wheel-axis=false' property.
We removed all machines using that array, lets remove that
property and all the code around it. There is only one
virtio_input_config[] version for each device, rename it
removing the '_v2' suffix.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501230129.2596-4-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/core/machine: Remove hw_compat_2_10[] array
Philippe Mathieu-Daudé [Thu, 1 May 2025 23:01:20 +0000 (01:01 +0200)] 
hw/core/machine: Remove hw_compat_2_10[] array

The hw_compat_2_10[] array was only used by the pc-q35-2.10,
pc-i440fx-2.10 and s390-ccw-virtio-2.10 machines, which got
removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501230129.2596-3-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/i386/pc: Remove pc_compat_2_12[] array
Philippe Mathieu-Daudé [Thu, 1 May 2025 22:35:22 +0000 (00:35 +0200)] 
hw/i386/pc: Remove pc_compat_2_12[] array

The pc_compat_2_12[] array was only used by the pc-q35-2.12
and pc-i440fx-2.12 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501223522.99772-9-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/i386/pc: Remove deprecated pc-q35-2.12 and pc-i440fx-2.12 machines
Philippe Mathieu-Daudé [Thu, 1 May 2025 22:35:21 +0000 (00:35 +0200)] 
hw/i386/pc: Remove deprecated pc-q35-2.12 and pc-i440fx-2.12 machines

These machines has been supported for a period of more than 6 years.
According to our versioned machine support policy (see commit
ce80c4fa6ff "docs: document special exception for machine type
deprecation & removal") they can now be removed.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501223522.99772-8-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/i386/pc: Remove pc_compat_2_11[] array
Philippe Mathieu-Daudé [Thu, 1 May 2025 22:35:20 +0000 (00:35 +0200)] 
hw/i386/pc: Remove pc_compat_2_11[] array

The pc_compat_2_11[] array was only used by the pc-q35-2.11
and pc-i440fx-2.11 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501223522.99772-7-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/i386/pc: Remove deprecated pc-q35-2.11 and pc-i440fx-2.11 machines
Philippe Mathieu-Daudé [Thu, 1 May 2025 22:35:19 +0000 (00:35 +0200)] 
hw/i386/pc: Remove deprecated pc-q35-2.11 and pc-i440fx-2.11 machines

These machines has been supported for a period of more than 6 years.
According to our versioned machine support policy (see commit
ce80c4fa6ff "docs: document special exception for machine type
deprecation & removal") they can now be removed.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501223522.99772-6-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/i386/pc: Remove pc_compat_2_10[] array
Philippe Mathieu-Daudé [Thu, 1 May 2025 22:35:16 +0000 (00:35 +0200)] 
hw/i386/pc: Remove pc_compat_2_10[] array

The pc_compat_2_10[] array was only used by the pc-q35-2.10
and pc-i440fx-2.10 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501223522.99772-3-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agohw/i386/pc: Remove deprecated pc-q35-2.10 and pc-i440fx-2.10 machines
Philippe Mathieu-Daudé [Thu, 1 May 2025 22:35:15 +0000 (00:35 +0200)] 
hw/i386/pc: Remove deprecated pc-q35-2.10 and pc-i440fx-2.10 machines

These machines has been supported for a period of more than 6 years.
According to our versioned machine support policy (see commit
ce80c4fa6ff "docs: document special exception for machine type
deprecation & removal") they can now be removed.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501223522.99772-2-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 months agotests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine
Thomas Huth [Wed, 25 Feb 2026 09:20:24 +0000 (10:20 +0100)] 
tests/qtest/test-x86-cpuid-compat: Remove the test with the i440fx-2.9 machine

The machine has been removed, so the related test can now be removed, too.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-17-thuth@redhat.com>

3 months agohw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:23 +0000 (10:20 +0100)] 
hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported field

The X86IOMMUState::pt_supported boolean was only set in
the hw_compat_2_9[] array, via the 'pt=off' property. We
removed all machines using that array, lets remove that
property and all the code around it, always setting the
VTD_ECAP_PT capability.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-19-philmd@linaro.org>
[thuth: Dropped the hunks that were already merged via commit 31753d5a336f]
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-16-thuth@redhat.com>

3 months agohw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:22 +0000 (10:20 +0100)] 
hw/pci-bridge/gen_pcie_rp: Remove GenPCIERootPort::migrate_msix field

The GenPCIERootPort::migrate_msix boolean was only set in
the hw_compat_2_9[] array, via the 'x-migrate-msix=false'
property. We removed all machines using that array, lets
remove that property and all the code around it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-18-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-15-thuth@redhat.com>

3 months agohw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:21 +0000 (10:20 +0100)] 
hw/net/virtio-net: Remove VirtIONet::mtu_bypass_backend field

The VirtIONet::mtu_bypass_backend boolean was only set in
the hw_compat_2_9[] array, via the 'x-mtu-bypass-backend=off'
property. We removed all machines using that array, lets remove
that property and all the code around it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-17-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
[thuth: Adjusted patch for latest changes in the master branch]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-14-thuth@redhat.com>

3 months agohw/core/machine: Remove hw_compat_2_9[] array
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:20 +0000 (10:20 +0100)] 
hw/core/machine: Remove hw_compat_2_9[] array

The hw_compat_2_9[] array was only used by the pc-q35-2.9 and
pc-i440fx-2.9 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-16-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-13-thuth@redhat.com>

3 months agohw/i386/pc: Remove pc_compat_2_9[] array
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:19 +0000 (10:20 +0100)] 
hw/i386/pc: Remove pc_compat_2_9[] array

The pc_compat_2_9[] array was only used by the pc-q35-2.9
and pc-i440fx-2.9 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-15-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-12-thuth@redhat.com>

3 months agohw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:18 +0000 (10:20 +0100)] 
hw/i386/pc: Remove deprecated pc-q35-2.9 and pc-i440fx-2.9 machines

These machines has been supported for a period of more than 6 years.
According to our versioned machine support policy (see commit
ce80c4fa6ff "docs: document special exception for machine type
deprecation & removal") they can now be removed.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-14-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-11-thuth@redhat.com>

3 months agohw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:17 +0000 (10:20 +0100)] 
hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_PM definition

VIRTIO_PCI_FLAG_INIT_PM was only used by the hw_compat_2_8[]
array, via the 'x-pcie-pm-init=off' property. We removed all
machines using that array, lets remove all the code around
VIRTIO_PCI_FLAG_INIT_PM (see commit 9a4c0e220d8 for similar
VIRTIO_PCI_FLAG_* enum removal).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-11-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-10-thuth@redhat.com>

3 months agohw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:16 +0000 (10:20 +0100)] 
hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_LNKCTL definition

VIRTIO_PCI_FLAG_INIT_LNKCTL was only used by the hw_compat_2_8[]
array, via the 'x-pcie-lnkctl-init=off' property. We removed all
machines using that array, lets remove all the code around
VIRTIO_PCI_FLAG_INIT_LNKCTL (see commit 9a4c0e220d8 for similar
VIRTIO_PCI_FLAG_* enum removal).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-10-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-9-thuth@redhat.com>

3 months agohw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:15 +0000 (10:20 +0100)] 
hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_INIT_DEVERR definition

VIRTIO_PCI_FLAG_INIT_DEVERR was only used by the hw_compat_2_8[]
array, via the 'x-pcie-deverr-init=off' property. We removed all
machines using that array, lets remove all the code around
VIRTIO_PCI_FLAG_INIT_DEVERR (see commit 9a4c0e220d8 for similar
VIRTIO_PCI_FLAG_* enum removal).

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-9-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-8-thuth@redhat.com>

3 months agohw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:14 +0000 (10:20 +0100)] 
hw/pci/pcie: Remove QEMU_PCIE_EXTCAP_INIT definition

QEMU_PCIE_EXTCAP_INIT was only used by the hw_compat_2_8[]
array, via the 'x-pcie-extcap-init=off' property. We removed
all machines using that array, let's remove all the code around
QEMU_PCIE_EXTCAP_INIT.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-8-philmd@linaro.org>
[thuth: Don't remove pci_set_long(), execute it always instead]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-7-thuth@redhat.com>

3 months agohw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:13 +0000 (10:20 +0100)] 
hw/block/pflash: Remove PFlashCFI01::old_multiple_chip_handling field

The PFlashCFI01::old_multiple_chip_handling boolean was only set
in the hw_compat_2_8[] array, via the 'old-multiple-chip-handling=on'
property. We removed all machines using that array, let's remove that
property and all the code around it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-7-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-6-thuth@redhat.com>

3 months agohw/core/machine: Remove hw_compat_2_8[] array
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:12 +0000 (10:20 +0100)] 
hw/core/machine: Remove hw_compat_2_8[] array

The hw_compat_2_8[] array was only used by the pc-q35-2.8 and
pc-i440fx-2.8 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-6-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-5-thuth@redhat.com>

3 months agohw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:11 +0000 (10:20 +0100)] 
hw/i386/kvm: Remove KVMClockState::mach_use_reliable_get_clock field

The KVMClockState::mach_use_reliable_get_clock boolean was only
used by the pc-q35-2.8 and pc-i440fx-2.8 machines, which got removed.
Remove it, along with the 'x-mach-use-reliable-get-clock' property.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-5-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-4-thuth@redhat.com>

3 months agohw/i386/pc: Remove pc_compat_2_8[] array
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:10 +0000 (10:20 +0100)] 
hw/i386/pc: Remove pc_compat_2_8[] array

The pc_compat_2_8[] array was only used by the pc-q35-2.8
and pc-i440fx-2.8 machines, which got removed. Remove it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-3-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-3-thuth@redhat.com>

3 months agohw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines
Philippe Mathieu-Daudé [Wed, 25 Feb 2026 09:20:09 +0000 (10:20 +0100)] 
hw/i386/pc: Remove deprecated pc-q35-2.8 and pc-i440fx-2.8 machines

These machines has been supported for a period of more than 6 years.
According to our versioned machine support policy (see commit
ce80c4fa6ff "docs: document special exception for machine type
deprecation & removal") they can now be removed.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250501210456.89071-2-philmd@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260225092024.794595-2-thuth@redhat.com>

3 months agomirror: Fix missed dirty bitmap writes during startup
Kevin Wolf [Thu, 19 Feb 2026 20:24:46 +0000 (21:24 +0100)] 
mirror: Fix missed dirty bitmap writes during startup

Currently, mirror disables the block layer's dirty bitmap before its own
replacement is working. This means that during startup, there is a
window in which the allocation status of blocks in the source has
already been checked, but new writes coming in aren't tracked yet,
resulting in a corrupted copy:

1. Dirty bitmap is disabled in mirror_start_job()
2. Some request are started in mirror_top_bs while s->job == NULL
3. mirror_dirty_init() -> bdrv_co_is_allocated_above() runs and because
   the request hasn't completed yet, the block isn't allocated
4. The request completes, still sees s->job == NULL and skips the
   bitmap, and nothing else will mark it dirty either

One ingredient is that mirror_top_opaque->job is only set after the
job is fully initialized. For the rationale, see commit 32125b1460
("mirror: Fix access of uninitialised fields during start").

Fix this by giving mirror_top_bs access to dirty_bitmap and enabling it
to track writes from the beginning. Disabling the block layer's tracking
and enabling the mirror_top_bs one happens in a drained section, so
there is no danger of races with in-flight requests any more. All of
this happens well before the block allocation status is checked, so we
can be sure that no writes will be missed.

Cc: qemu-stable@nongnu.org
Closes: https://gitlab.com/qemu-project/qemu/-/issues/3273
Fixes: 32125b14606a ('mirror: Fix access of uninitialised fields during start')
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20260219202446.312493-1-kwolf@redhat.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Jean-Louis Dupond <jean-louis@dupond.be>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
3 months agoblock/curl: fix concurrent completion handling
Antoine Damhet [Thu, 12 Feb 2026 16:27:24 +0000 (17:27 +0100)] 
block/curl: fix concurrent completion handling

curl_multi_check_completion would bail upon the first completed
transfer even if more completion messages were available thus leaving
some in flight IOs stuck.

Rework a bit the loop to make the iterations clearer and drop the breaks.

The original hang can be somewhat reproduced with the following command:

$ qemu-img convert -p -m 16 -O qcow2 -c --image-opts \
  'file.driver=https,file.url=https://scaleway.testdebit.info/10G.iso,file.readahead=1M' \
  /tmp/test.qcow2

Fixes: 1f2cead32443 ("curl: Ensure all informationals are checked for completion")
Cc: qemu-stable@nongnu.org
Signed-off-by: Antoine Damhet <adamhet@scaleway.com>
Message-ID: <20260212162730.440855-2-adamhet@scaleway.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
3 months agohmp_nbd_server_start: Don't ask for backing image data
Peter Krempa [Wed, 4 Feb 2026 13:15:44 +0000 (14:15 +0100)] 
hmp_nbd_server_start: Don't ask for backing image data

'hmp_nbd_server_start' uses only the device name from the data returned
from 'qmp_query_block', thus no backing file information. Use the new
options to suppress asking for the unused parts to save on resources.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-ID: <df71ca72a96d870758695ac57772fcfb87dc8fa0.1770210044.git.pkrempa@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>