128246 Commits

Author SHA1 Message Date
Thomas Huth
4ea7024ff6 hw/display/cg3: Fix crash when introspecting cgthree from the CLI
QEMU currently crashes when introspecting the cgthree device from the
command line interface:

 $ ./qemu-system-sparc -device cgthree,help
 Segmentation fault (core dumped)

This happens because the memory_region_init_rom() function internally
calls qemu_ram_alloc_internal() that needs the current_machine pointer
to be set up - which is not the case here since the machine has not
been created yet.

There does not seem to be a compelling reason for initializing the
memory regions from the instance_init function, so let's simply move
the code into the realize() function instead to fix this issue.

Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260317080623.438230-1-thuth@redhat.com>
2026-03-23 08:16:07 +01:00
Thomas Huth
aee404fc7f hw/pci-host/raven: Fix crash when introspecting raven-pcihost from the CLI
QEMU currently crashes when introspecting raven-pcihost from the command
line interface:

 $ ./qemu-system-ppc -device raven-pcihost,help
 Segmentation fault (core dumped)

This happens because the raven_pcihost_initfn instance init function
calls get_system_memory(), but that is not available here yet.

There does not seem to be a compelling reason for initializing the
memory regions from the instance init function, so let's simply move
the code into the realize() function instead to fix this issue.

Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20260317074049.436460-1-thuth@redhat.com>
2026-03-23 08:16:07 +01:00
Brian Cain
1adf67b3c4 tests/tcg/hexagon: add test for predicated .new branch LSB evaluation
Test for predicated .new branches with non-standard predicate values
(non-all-0, non-all-1).  Hexagon predicates are 8 bits wide but conditional
branches evaluate only the LSB.

Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2026-03-20 07:43:03 -07:00
Brian Cain
dfa4c8810f target/hexagon: use TCG_COND_TSTEQ/TSTNE for predicate branches
Replace TCG_COND_EQ/NE comparisons against 0 with TCG_COND_TSTEQ/TSTNE
comparisons against 1 for all predicate-conditional branches. This tests
bit 0 of the predicate register directly, eliminating redundant andi
operations that previously extracted the LSB before the comparison.

For predicate-conditional jumps (jumpt, jumpf, jumptnew, etc.) and
jump-register variants (jumprt, jumprf, etc.), pass the raw predicate
value directly instead of going through fLSBOLD/fLSBNEW extraction.
For callers that produce a 0/1 result via setcond (compare-and-jump,
jumprz, etc.), the TSTEQ/TSTNE test on bit 0 is equivalent to the
previous EQ/NE test against 0.

Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2026-03-20 07:43:03 -07:00
Brian Cain
e8743ca0ac target/hexagon: fix J2_jumptnew/pt predicate check to use LSB
J2_jumptnew and J2_jumptnewpt passed the raw predicate value to
gen_cond_jump(), checking if the full 8-bit value was non-zero.
Refer to PRM Section 6.1.2 "predicate-consuming instructions examine
only the least-significant bit".

This inconsistency caused if (p0.new) jumps and if (p0.new) loads
within the same packet to disagree when the predicate had values
other than the ones generated by predicate-generating instructions
(e.g. 0x80 or 0xAA where bit 0 is clear but the value is
non-zero): the jump would be taken while the loads were skipped.

Fix by routing both macros through fGEN_TCG_cond_jumpt(fLSBNEW(PuN)),
matching the pattern used by every other predicated jump.

Discovered-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
2026-03-20 07:43:03 -07:00
Peter Maydell
8e711856d7 Merge tag 'hppa-fixes-for-v11-pull-request' of https://github.com/hdeller/qemu-hppa into staging
HPPA fixes for v11

Some late fixes for QEMU-v11

Various fixes in SeaBIOS-hppa and qemu code, most importantly
this fixes boot of the C3700, which broke while we added
support for CPUs with 40 and 44 bits physical address space.

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCabxmmwAKCRD3ErUQojoP
# X5z0AP4h0hBe/jDlQ8VLs0LtdG4bBnyPSVl+4rahw10mmgkvZwD7B/wimiCUBOJZ
# Jj9nKpNWtgZRXwRIM4XOl/a6pYcbCw8=
# =MzWS
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Mar 19 21:11:55 2026 GMT
# gpg:                using EDDSA key BCE9123E1AD29F07C049BBDEF712B510A23A0F5F
# gpg: Good signature from "Helge Deller <deller@gmx.de>" [unknown]
# gpg:                 aka "Helge Deller <deller@kernel.org>" [unknown]
# gpg:                 aka "Helge Deller <deller@debian.org>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 4544 8228 2CD9 10DB EF3D  25F8 3E5F 3D04 A7A2 4603
#      Subkey fingerprint: BCE9 123E 1AD2 9F07 C049  BBDE F712 B510 A23A 0F5F

* tag 'hppa-fixes-for-v11-pull-request' of https://github.com/hdeller/qemu-hppa:
  target/hppa: Update SeaBIOS-hppa to version 23
  hw/hppa: Fix crash of 64-bit HP-UX 11 while flushing caches
  hw/pci-host/astro: Use proper region names
  target/hppa: Always map 64-bit firmware at 0xfffffff0f0000000
  hw/hppa: Adjust physical addresses of Astro and Elroy
  hw/hppa: Fix description of the HP A400-44 server

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-20 10:04:48 +00:00
Peter Maydell
5f5875b0b5 Merge tag 'pull-riscv-to-apply-20260320' of https://github.com/alistair23/qemu into staging
RISC-V PR for 11.

* Fix integer overflow in cm_base calculation
* Fix null pointer dereference in cpu_set_exception_base
* Update Daniel Henrique Barboza's email
* Add Chao Liu as reviewer
* Set SiFive PDMA done bit upon completion
* Remove deprecated 'riscv, delegate' device-tree property
* Fix OCP FP8 E4M3 conversion issues
* Fix IOMMU instance_init allocations in instance_finalize
* Support Smpmpmt extension
* Fix SiFive UART spurious IRQ issue and misc updates
* Fix missing flags merge in probe_pages for cross-page accesses
* Fix page probe issues in vext_ldff
* Fix scountovf CSR behavior in VS-mode and M-mode

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEaukCtqfKh31tZZKWr3yVEwxTgBMFAmm8ha4ACgkQr3yVEwxT
# gBMKOBAAsB6CwDSsi+DmuCD5r25kaLtvFg7hqc6iYpzjuwUE+uHu3LWMky19Div1
# mpMLZi1an/NbIKX8N9KS1G87hzteqvxY4wKVoMn1mF/3yQ5r6OJ2SfZoDiiJyAva
# UIhaiRUbmg78OX0YCBYCWaRbqN7rbV6XJnB8oGUyhVNwtfJ/pZppfCflsd5+E3KD
# U7sKMVaytfeQCQGXeNYgZBvYvDQ7/t21eLytLYGhUNy89N8mo7V5egFJEN45BE8O
# Zh+Oa7bN+lUOg0eUTj98zwXXXeOZMEKbn5I01XuUH1gn5aO+CeEvFEqDssF1fKle
# mq00WkK1Tk9kZOTLhMR4pdW2kXkom/mEmXI9jU0CInmF63+r8/SugimPS8LyLE3N
# qZodmmEeckOPsE+RnmBOHww2Y+g668+C/sTcSAuHsWUXJLDty+DyO0RU4d0ioRHa
# zyOf2cNoSVV8EWJ5uHk9Et2eimq0Q83n/tVpkKyq877rOGLQzoDIKJEwIO7nI59x
# NF437R7hWKOZ0JLE22wuLWNW8LohxaFkzYRGFDH2/qKlsEv7mSkutTU4y6g0XKok
# iTjBaibmwsaDeMrf5JYHTGMSvF/3lIXyeJiBCq6uQac3fFXKKeehttaU4F+KW0KE
# gO6oUdJWExp7Tt+9nx5KqFxlJPNd/JV3gDCKRjQskW3bT4H1cco=
# =chEj
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Mar 19 23:24:30 2026 GMT
# gpg:                using RSA key 6AE902B6A7CA877D6D659296AF7C95130C538013
# gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [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: 6AE9 02B6 A7CA 877D 6D65  9296 AF7C 9513 0C53 8013

* tag 'pull-riscv-to-apply-20260320' of https://github.com/alistair23/qemu:
  target/riscv: Fix scountovf CSR behavior in VS-mode and M-mode
  target/riscv: rvv: Fix page probe issues in vext_ldff
  target/riscv: rvv: Fix missing flags merge in probe_pages for cross-page accesses
  hw/char: sifive_uart: Remove ip variable
  hw/char: sifive_uart: Update IRQ when rxctrl is written
  hw/char: sifive_uart: Sync txwm interrupt pending status after TX FIFO enqueue
  hw/char: sifive_uart: Implement txctrl.txen and rxctrl.rxen
  target/riscv: Support Smpmpmt extension
  hw/riscv/riscv-iommu: Free instance_init allocations in instance_finalize
  fpu: Fix unexpected exception flags when converting infinity to OCP E4M3
  fpu: Fix repacking issues in the uncanonical step for E4M3 overflow
  hw/riscv: Remove deprecated 'riscv, delegate' device-tree property
  hw/dma: sifive_pdma: Set done bit upon completion
  MAINTAINERS: Add myself as a reviewer for RISC-V TCG CPUs
  MAINTAINERS: update my email
  target/riscv: Fix null pointer dereference in cpu_set_exception_base
  hw/riscv: Fix integer overflow in cm_base calculation

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-20 10:04:40 +00:00
Peter Maydell
3e8d341ef1 Merge tag 'staging-pull-request' of https://gitlab.com/peterx/qemu into staging
mem pull for 11.0-rc1

Two fixes included:

- Xiaoyao's fix on recent coco guest boot failure
- BALATON's fix on recent sparce device-introspect-test failure

# -----BEGIN PGP SIGNATURE-----
#
# iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCabwC2xIccGV0ZXJ4QHJl
# ZGhhdC5jb20ACgkQO1/MzfOr1wYozgEAg32MCV/R9xs5krn9mSpBLLoVZCAIDp2C
# 4hLW7aEnf4UBALeUmJY/pLWEGwFc6LVzPe4kZ5BLl0j72jtcVP1BcmoG
# =Zd1r
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Mar 19 14:06:19 2026 GMT
# gpg:                using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706
# gpg:                issuer "peterx@redhat.com"
# gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [marginal]
# gpg:                 aka "Peter Xu <peterx@redhat.com>" [marginal]
# gpg: WARNING: The key's User ID is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: B918 4DC2 0CC4 57DA CF7D  D1A9 3B5F CCCD F3AB D706

* tag 'staging-pull-request' of https://gitlab.com/peterx/qemu:
  hw/display/tcx: Init memory regions in realize
  memory: Set mr->ram before RAM Block allocation

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-20 10:04:21 +00:00
Jim Shu
38937473da target/riscv: Fix scountovf CSR behavior in VS-mode and M-mode
From Sscofpmf spec [1]:
- In M-mode, scountovf bit X is always readable.
- in VS mode, scountovf bit X is readable when mcounteren bit X and
  hcounteren bit X are both set, and otherwise reads as zero.

[1] https://github.com/riscv/riscv-isa-manual/blob/main/src/sscofpmf.adoc

Signed-off-by: Jim Shu <jim.shu@sifive.com>
Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260318024234.2772480-1-jim.shu@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-20 08:41:15 +10:00
Max Chou
0e8ad6a846 target/riscv: rvv: Fix page probe issues in vext_ldff
Commit 17288e38be ("optimize the memory probing for vector
fault-only-first loads") introduced an optimization that moved from
per-element probing to a fast-path broad probe. Unfortunately it
introduced following bugs in cross-page handling:

- Wrong condition for second page probing: checked "env->vl > elems"
  instead of "env->vl > elems + env->vstart", failing to account for
  the vstart offset.

- Incorrect second page address calculation: used
  "addr + (elems << log2_esz)" instead of "addr + page_split".
  For segment loads (nf > 1), this would probe the wrong address,not
  at the page boundary.

- Wrong second page probe size: used "elems * msize" (the first page
  size) instead of calculating the remaining size as
  "(env->vl - env->vstart) * msize - page_split". This would probe
  too little memory and could miss faults.

This commit fixes these bugs by leveraging the probe_pages helper
which automatically handles cross-page memory accesses correctly.

Fixes: 17288e38be ("optimize the memory probing for vector fault-only-first loads.")

Signed-off-by: Max Chou <max.chou@sifive.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260318013805.1920377-3-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-20 08:41:15 +10:00
Max Chou
5568177738 target/riscv: rvv: Fix missing flags merge in probe_pages for cross-page accesses
When probe_pages probes a memory region that spans two pages, it calls
probe_access_flags twice - once for each page. However, the flags from
the second page probe were overwriting the flags from the first page
instead of being merged together.

Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260318013805.1920377-2-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-20 08:41:15 +10:00
Frank Chang
f9f430b701 hw/char: sifive_uart: Remove ip variable
The ip variable is no longer used in the code. Remove it from the
codebase.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260312033201.1619554-5-frank.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-20 08:41:15 +10:00
Frank Chang
558f14b26f hw/char: sifive_uart: Update IRQ when rxctrl is written
When rxctl is updated, we also need to check whether the IRQ should be
raised, as the user may activate the Rx channel or change the Rx FIFO
watermark level.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260312033201.1619554-4-frank.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-20 08:41:15 +10:00
Frank Chang
7997b782f4 hw/char: sifive_uart: Sync txwm interrupt pending status after TX FIFO enqueue
Currently, the txwm interrupt pending status is only updated when the
asynchronous transmit handler runs. This can cause the txwm interrupt
state to become unsynchronized between the SiFive UART and the
interrupt controller.

For example, when a txwm interrupt is raised, the corresponding APLIC
pending bit is also set. However, if software later enqueues additional
characters into the TX FIFO exceeding the transmit watermark, the
APLIC pending bit may remain set because the txwm interrupt pending
status is not updated at enqueue time.

This issue has been observed on resource-constrained machines, where
Linux reports spurious IRQ errors. In these cases, the asynchronous
transmit handler is unable to drain the TX FIFO quickly enough to update
the txwm pending status before software reads the ip register, which
derives the txwm pending state directly from the actual number of
characters in the TX FIFO.

This commit fixes the issue by updating the txwm interrupt pending
status immediately after enqueuing data into the TX FIFO, ensuring that
the interrupt pending status between the SiFive UART and the interrupt
controller remains synchronized.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260312033201.1619554-3-frank.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-20 08:41:14 +10:00
Frank Chang
e6051fa61b hw/char: sifive_uart: Implement txctrl.txen and rxctrl.rxen
Implement txctrl.txen and rxctrl.rxen as follows:

* txctrl.txen
  The txen bit controls whether the Tx channel is active. When cleared,
  transmission of Tx FIFO contents is suppressed, and the txd pin is
  driven high.

* rxctrl.rxen:
  The rxen bit controls whether the Rx channel is active. When cleared,
  the state of the rxd pin is ignored, and no characters will be
  enqueued into the Rx FIFO.

Therefore, the Tx FIFO should not be dequeued when txctrl.txen is
cleared, and the Rx FIFO should not be enqueued when rxctrl.rxen is
cleared.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260312033201.1619554-2-frank.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-20 08:41:14 +10:00
Helge Deller
fa2d5d84e0 target/hppa: Update SeaBIOS-hppa to version 23
New SeaBIOS-hppa v23 release with various fixes for qemu-v11:
- Various fixes to support CPUs with 40 and 44 bits physical address
- Fix PAT_CPU call when asking for current CPU
- Add function to stop CPU in PDC_PROC
- Prevent execution of some functions when running as PAT firmware
- Tune cache parameters to speed up cache flushes in operating systems
- Revert resetting LSI SCSI with ODE on HP3000

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
2026-03-19 22:06:49 +01:00
Helge Deller
3835a61341 hw/hppa: Fix crash of 64-bit HP-UX 11 while flushing caches
HP-UX 11 64-bit reads at bootup a word from address CPU_HPA + 0x500
while flushing the the cache of a T600.
Add a memory handler to avoid crashing while reading this word.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
2026-03-19 22:06:49 +01:00
Helge Deller
90c6cf342c hw/pci-host/astro: Use proper region names
All 64-bit hppa machines have at least 4 Elroy PCI busses in the system.
Make sure to use proper names in the qemu device tree, e.g. "elroy0" or
"elroy2-pci-mmio", to be able to distinguish between the various chips.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2026-03-19 22:06:49 +01:00
Helge Deller
0a3283513f target/hppa: Always map 64-bit firmware at 0xfffffff0f0000000
I checked on a physical A500, C3700 and C8000 machine and all load their
64-bit PDC (Firmware) at 0xfffffff0f0000000, independed if the CPU uses
40 or 44 physical address bits.
For qemu we will do the same and load the 64-bit SeaBIOS-hppa at the
same address for our emulated machines.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
2026-03-19 22:06:49 +01:00
Helge Deller
50bc19c0a5 hw/hppa: Adjust physical addresses of Astro and Elroy
Adjust the addresses of the Astro and Elroy PCI chips to a
44-bit physical address space when running a PA8700 CPU.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
2026-03-19 22:06:49 +01:00
Helge Deller
cb991be5b1 hw/hppa: Fix description of the HP A400-44 server
The HP A400-44 machine has a height of 2U and is a noisy server machine
which was usually running in the datacenter.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Anton Johansson <anjo@rev.ng>
2026-03-19 22:06:49 +01:00
BALATON Zoltan
2a13e31073 hw/display/tcx: Init memory regions in realize
Thomas reported test failure:

  $ export QTEST_QEMU_BINARY=./qemu-system-sparc
  $ tests/qtest/device-introspect-test -m thorough
  ...
  # Testing device 'sun-tcx'
  RAMBlock "tcx.prom" already registered, abort!
  Broken pipe
  ../../devel/qemu/tests/qtest/libqtest.c:210: kill_qemu() detected QEMU
  death from signal 6 (Aborted) (core dumped)
  Aborted (core dumped)

Issue is the qom introspect test will create yet another sun-tcx device
causing double register of the memory region.

Fix it by removing the init method and move memory region creation in
realize.

Reported-by: Thomas Huth <thuth@redhat.com>
Link: https://lore.kernel.org/r/3b87e6d9-a027-4dcd-a995-857e16c8b2e6@redhat.com
Fixes: 653c4fa5b0 hw/display/{cg3.tcx}: Do not use memory_region_init_rom_nomigrate
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Link: https://lore.kernel.org/r/20260316130651.5C8735968DE@zero.eik.bme.hu
[peterx: amend commit message, fix tag, add link]
Signed-off-by: Peter Xu <peterx@redhat.com>
2026-03-19 10:05:18 -04:00
Xiaoyao Li
792cb90e84 memory: Set mr->ram before RAM Block allocation
Commit 2fb627ef2f ("memory: Factor out common ram region initialization")
introduced a helper function memory_region_set_ram_block(), which causes
mr->ram to be set to true after the RAM Block allocation by
qemu_ram_alloc_*().

It leads to the assertion

  g_assert(memory_region_is_ram(mr));

in memory_region_set_ram_discard_manager() being triggered when creating
RAM Block with the RAM_GUEST_MEMFD flag.

Fix this by restoring the original behavior of setting mr->ram before
RAM Block allocation.

Closes: https://gitlab.com/qemu-project/qemu/-/work_items/3330
Reported-by: Farrah Chen <farrah.chen@intel.com>
Link: https://lore.kernel.org/r/df63fdf0-05ea-4de0-8009-c52703e4b052@amd.com
Reported-by: Kim Phillips <kim.phillips@amd.com>
Fixes: 2fb627ef2f ("memory: Factor out common ram region initialization")
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Tested-by: Kim Phillips <kim.phillips@amd.com>
Link: https://lore.kernel.org/r/20260312063420.973637-1-xiaoyao.li@intel.com
Signed-off-by: Peter Xu <peterx@redhat.com>
2026-03-19 10:02:42 -04:00
Jay Chang
58cbdc780b target/riscv: Support Smpmpmt extension
The Smpmpmt extension provides a mechanism to control memory attributes
at the granularity of PMP (Physical Memory Protection) registers, similar
to how Svpbmt controls memory attributes at the page level.

Version 0.6
https://github.com/riscv/riscv-isa-manual/blob/smpmpmt/src/smpmpmt.adoc#svpbmt

Signed-off-by: Jay Chang <jay.chang@sifive.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260305034429.74739-1-jay.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:43:21 +10:00
Peter Maydell
3d39fd35f6 hw/riscv/riscv-iommu: Free instance_init allocations in instance_finalize
The riscv-iommu device makes various allocations in its
instance_init method. These will leak when QMP inits an
object of this type to introspect it, as can be seen if you
run 'make check' with the address sanitizer enabled:

Direct leak of 4096 byte(s) in 1 object(s) allocated from:
    #0 0x5d8415b6ed9d in calloc (/home/pm215/qemu/build/san/qemu-system-riscv32+0x1832d9d) (BuildId: fedcc313e48ba803d63837329c37fd609dd50849)
    #1 0x75c0502f1771 in g_malloc0 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x63771) (BuildId: 116e142b9b52c8a4dfd403e759e71ab8f95d8bb3)
    #2 0x5d8416d09391 in riscv_iommu_instance_init /home/pm215/qemu/build/san/../../hw/riscv/riscv-iommu.c:2463:18
    #3 0x5d841710483f in object_initialize_with_type /home/pm215/qemu/build/san/../../qom/object.c:570:5
    #4 0x5d8417104ee9 in object_initialize /home/pm215/qemu/build/san/../../qom/object.c:578:5
    #5 0x5d8417104ee9 in object_initialize_child_with_propsv /home/pm215/qemu/build/san/../../qom/object.c:608:5
    #6 0x5d8417104db1 in object_initialize_child_with_props /home/pm215/qemu/build/san/../../qom/object.c:591:10
    #7 0x5d8417106506 in object_initialize_child_internal /home/pm215/qemu/build/san/../../qom/object.c:645:5
    #8 0x5d8416d16a12 in riscv_iommu_sys_init /home/pm215/qemu/build/san/../../hw/riscv/riscv-iommu-sys.c:199:5
    #9 0x5d841710483f in object_initialize_with_type /home/pm215/qemu/build/san/../../qom/object.c:570:5
    #10 0x5d841710661f in object_new_with_type /home/pm215/qemu/build/san/../../qom/object.c:774:5
    #11 0x5d841755d956 in qmp_device_list_properties /home/pm215/qemu/build/san/../../qom/qom-qmp-cmds.c:206:11

(and other similar backtraces).

Fix these by freeing the resources we allocate in instance_init in
instance_finalize.  In some cases we were freeing these in unrealize,
and in some cases not at all.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260307125222.3656140-1-peter.maydell@linaro.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:41:32 +10:00
Max Chou
9d090fe440 fpu: Fix unexpected exception flags when converting infinity to OCP E4M3
Infinity is a special case distinct from numeric overflow:
- Numeric overflow: finite value exceeds format's max normal
  -> overflow|inexact
- Infinity conversion: input is already infinite
  -> no flags

This commit fixes the unexpect exception flags by relocating the float
exception flag update flow to be outside the uncanon_e4m3_overflow.
And raising the overflow|inexact for numeric overflow in uncanon_normal.

Fixes: 27e989f99c ("fpu: Add conversion routines for OCP FP8 E4M3")
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Max Chou <max.chou@sifive.com>
Message-ID: <20260226071817.1417875-3-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:39:55 +10:00
Max Chou
053e913aad fpu: Fix repacking issues in the uncanonical step for E4M3 overflow
In the uncanonical step, the input FloatParts will be repacked to the
target FloatFmt. This commit fixes following issues after calling
uncanon_e4m3_overflow in the uncanon/uncanon_normal functions.

- Add the local exp update after calling uncanon_e4m3_overflow in the
  parts_uncanon_normal function.
- Add the fraction shift after calling uncanon_e4m3_overflow in the
  parts_uncanon function.

Fixes: 27e989f99c ("fpu: Add conversion routines for OCP FP8 E4M3")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Signed-off-by: Max Chou <max.chou@sifive.com>
Message-ID: <20260226071817.1417875-2-max.chou@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:38:12 +10:00
Philippe Mathieu-Daudé
f2af8f0d5d hw/riscv: Remove deprecated 'riscv, delegate' device-tree property
The "riscv,delegate" DT property was added in QEMU 7.0 as part of
the AIA APLIC support.  The property changed name during the
review process in Linux and the correct name ended up being
"riscv,delegation". The incorrect name was added as alias, and
deprecated in v9.1 (commit 38facfa843), so can be removed for
v11.0.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Message-ID: <20260227232838.23392-1-philmd@linaro.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:36:29 +10:00
Jay Chang
9251858a65 hw/dma: sifive_pdma: Set done bit upon completion
Ensure that the 'done' bit is set upon transfer completion, even if
an error occurs, since all transfers are considered completed regardless
of success or failure.

Signed-off-by: Jay Chang <jay.chang@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260304030816.33209-1-jay.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:34:52 +10:00
Chao Liu
cdb4c06292 MAINTAINERS: Add myself as a reviewer for RISC-V TCG CPUs
Add myself as a reviewer for RISC-V TCG CPU related code to better
participate in patch review.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Message-ID: <20260226102008.146928-1-chao.liu.zevorn@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:33:13 +10:00
Daniel Henrique Barboza
c58ab7cf21 MAINTAINERS: update my email
Also add myself as a "RISC-V TCG target" reviewer.

Signed-off-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251217191726.194767-1-daniel.barboza@oss.qualcomm.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:31:36 +10:00
Djordje Todorovic
519f0bdf4c target/riscv: Fix null pointer dereference in cpu_set_exception_base
Add missing return statement after logging the error when cs is NULL.
Without this, the function continues to dereference the null pointer.

Resolves: Coverity CID 1644077

Signed-off-by: Djordje Todorovic <djordje.todorovic@htecgroup.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20260115130110.2825796-3-djordje.todorovic@htecgroup.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:29:58 +10:00
Djordje Todorovic
6802b477e1 hw/riscv: Fix integer overflow in cm_base calculation
Ensure 64-bit arithmetic is used when computing cm_base,
avoiding potential integer overflow.

Resolves: Coverity CID 1644076

Signed-off-by: Djordje Todorovic <djordje.todorovic@htecgroup.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260115130110.2825796-2-djordje.todorovic@htecgroup.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2026-03-19 14:28:16 +10:00
Peter Maydell
5a68a3add6 Update version for v11.0.0-rc0 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
v11.0.0-rc0
2026-03-18 15:56:51 +00:00
Peter Maydell
aed38fe520 Merge tag 'pr-plugins-20260317' of https://gitlab.com/pbo-linaro/qemu into staging
Changes:
- [PATCH v2 v2] plugins/api-system: Handle migrate_add_blocker() failure (Trieu Huynh <vikingtc4@gmail.com>)
  Link: https://lore.kernel.org/qemu-devel/20260317134733.126584-1-vikingtc4@gmail.com

# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCgAdFiEEZrmU7KFPfy5auggff5BUDQoc0A8FAmm5p+8ACgkQf5BUDQoc
# 0A9/RAv/TdNX7b8ah5TjRkmdh5HQDF9/bXCBCOiXndRM9wvgPfbZ+5Hm84jXWL3E
# U+NyznaPlpkUE0qomx11yVIV9kVuW5dZYCXUs2LaQqEg9ldT+r69Mt976AfM7yv4
# GkzszVFjfiQkSVllnqcM8McvTnkrS9h64ec5bv16ptyG4vrgmJ9ldsKZBz/1sXNL
# Yh16etRJTWqVOQXxRqOjS0klZh6RKQ2Tpy7T/nNHuI3ED6Gx1rBiXmRMsSkoAm5i
# GGoAoHtitu9DsnvY8XocE6C5F8es7W4gqmg37fSrbGO3AjVLwwW+sBD4a9gFE1GN
# mAJ3SvA/+ViwwzsBJZZJAHRSyJdtw3f998yC3yfZxsIWJmBb6EMIVZHn8J/UMj9D
# P68Ys4ulZgEvKjA6XMlONYYMLKTAo527qFW2qU3PX/mlqp0pw4xhxvTxu3QmutPs
# yijm1kzJ67ziOlwc/QCdf8t7nZaUIk/8HEPmwPCJ4CPhxmQxxsgHzdf4UiLNqQEy
# PlDR9z/Q
# =6Dj9
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 19:13:51 2026 GMT
# gpg:                using RSA key 66B994ECA14F7F2E5ABA081F7F90540D0A1CD00F
# gpg: Good signature from "Pierrick Bouvier <pierrick.bouvier@linaro.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 66B9 94EC A14F 7F2E 5ABA  081F 7F90 540D 0A1C D00F

* tag 'pr-plugins-20260317' of https://gitlab.com/pbo-linaro/qemu:
  plugins/api-system: Handle migrate_add_blocker() failure

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-18 10:12:59 +00:00
Peter Maydell
8844421b59 Merge tag 'single-binary-20260317' of https://github.com/philmd/qemu into staging
Few patches related to single binary effort:

- Build some stub files once
- Replace TARGET_PAGE_BITS by qemu_target_page_bits()

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmm6PhwACgkQ4+MsLN6t
# wN63yw//ddngvlvmeL1h3SlOqNYfgk/yb6f1kWj7NjeKws78Vflp0XimxI3Tm94k
# Df7kRgNr8gLFaDawiJRwb2jsd+2mAWq/v/50nc9t0k6U9dmNFVQHDSrSLSKozual
# /AZP1EtWUow44ad7QARj5ccFHwPKT8vjW1trUjKy5hOqgnnSu+VXYul7NFCskMfq
# j52yLL6sOtyjHbzuO3Ndfq67bnQnGmi+2Cu/LjLyIfPrbbm+pziXcwZk3ghJKGxo
# h33VtGewhaIOsRpv2rmxSSZQMlCKRiLBFF5K/oM/V+bZUlhEfmcrDpGx0JZvxjcc
# +XclP4wcAFLepkb+2BnogsXuU57uV+WAU/xqhn0OSqN9IAOza1b0EUBuMji7IFxY
# 3C5X7JkVC/lG1cOvchkIEkZ7bivCidyWbIMphnfoIxWDjtDKjIHT/b1GnjqEbo8n
# lI0bsNR3pDSqi4xqmE+H7yWQqTO2BFdHzRq/o3sWR8lN4lC+MoKLAXx2i824iUgA
# t9TkSLnocxiKZSip/ByWExAE3RgAxetBL16wFxlgJrLIyyGePkzMbSXprGf2El5C
# yIdULTHg0L/dFJu2EJKURLGb8RC/LCvN+oaH206lToDMAsNHqCSyhriLbJ1s+B+B
# bmppVVP3DP//Mp0Y1DJhwd+fsgXZypEzhJ/C+LIMtN0SZWkjwRc=
# =fwcr
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Mar 18 05:54:36 2026 GMT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'single-binary-20260317' of https://github.com/philmd/qemu:
  target/ppc: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
  hw/s390x/vfio: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
  hw/misc: Build 'mac_via' as common unit file
  hw/display: Build stubs once
  fsdev: Build stubs once

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-18 10:12:50 +00:00
Peter Maydell
0063f9a445 Merge tag 'migration-20260317-pull-request' of https://gitlab.com/farosas/qemu into staging
Migration/Qtest pull request

Various fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmm5muIQHGZhcm9zYXNA
# c3VzZS5kZQAKCRDHmNx0G+wxnVpBEADQYBxOt+SzHpHfv/BqJ2dx0zrJK44+wjUd
# gL8iLA7cd0/Rri2gYV1GuVEiNarC10Fg8NSNf/td2HbucDHviwkg9G84GgbjdyXl
# CWs6pseTkCk0X1W+o/fEaXB4ve1ES4RyJwCpWL+QCN3XUNuaMA7YnFB+8ksW2AuA
# lsgNU6mvXHrR8agTl77/G0R5/mVZ5lu5p9gwz09PCXk0nrWyi5j2a7rA2zLneLuk
# jBfEa5b9yX7au/DL/55wMszkA8NRqft0CabJxTZRYO5YNPXvlsJS0L3gWHWDQ9DB
# I895zk2JnagARpiu/v/eHSf+b6nnmE+huAYxv8iXTw9aOet/2aLusJidS+S5IIV4
# 7Lkomis/ch8KqnDMB+SPnW/9TplfKHHa3Jv/3ZphbOwSM6SxjcHHTtUaIvAhQeAt
# DSLBdprDcMePYxi9ugoZLkIHgJGNiWnx+egOrEMa4ShyDXmIlxcjuV4/RtjI158V
# UXK4qPw2f60+Ic+d6gUMpByEX1O2BZziL97qHLAKWYtA9mktL+mX2x6sIEkIjrQJ
# F6dJcE1yvMY6Imhz+zRcS0Dck+vafHGA0DP8t1oxMYcBKeaGrCzuS9jCBQEp10hk
# L/P2jfdgvtlLRXhcoa22Ynn2qNkJDLEAy6+xHH8thkaaYeg52NGO5wGIYe5+F766
# Cekez3u3NA==
# =7Smy
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 18:18:10 2026 GMT
# gpg:                using RSA key AA1B48B0A22326A5A4C364CFC798DC741BEC319D
# gpg:                issuer "farosas@suse.de"
# gpg: Good signature from "Fabiano Rosas <farosas@suse.de>" [unknown]
# gpg:                 aka "Fabiano Almeida Rosas <fabiano.rosas@suse.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: AA1B 48B0 A223 26A5 A4C3  64CF C798 DC74 1BEC 319D

* tag 'migration-20260317-pull-request' of https://gitlab.com/farosas/qemu:
  tests/qtest/test-hmp: Free machine options
  tests/qtest: Don't dup machine name in qtest_cb_for_every_machine callbacks
  migration: fix implicit integer division in migration_update_counters
  migration/options: Fix leaks in StrOrNull qdev accessors
  migration: assert that the same migration handler is not being added twice
  tests/qtest/migration: Force exit-on-error=false
  migration/multifd: Fix leaks of TLS error objects
  tests/qtest/migration: Fix leak in CPR exec test
  io: Fix TLS bye task leak
  tests/qtest/migration: Fix leak of migration tests data

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-18 10:12:39 +00:00
Peter Maydell
f520fc4b04 Merge tag 'for-11.0-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging
Gather various audio/ui/dump patches for 11.0-rc

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmm5jPYACgkQ2ujhCXWW
# nOWsxQ/+LOVsrCjxSQTI7Iygo8ICXBKwjBXOHA9g4PHMSZDD5B+WbCXLXRPfSwkj
# y+zjJpv13pqXXNFKw0MoEz6kIRKFWYq1XbHLgkXt538QIEJ5h5tff0V8YGtk9U0H
# D2ZwUBOWH7OW4VDCFg2BCYNrnC4y2wxFG7lSm5tbeJzkAogsLRDNPf5thvHgdS+U
# oYP2g8WdXx5ZgX8/f9tvDApTPXjfg1eATLy8veSZWkgqaCL8pO5E436sVT+cPRii
# aFQpiTPms6vutOtQpWLHv6Kvffvkk0A1zrdlRrvlEhhWT3v5sBvF5hVH/iEt+LIL
# ldChBtJnzc40ujsdKHSmUV+foCnKQYuWSwzgJaxSg2Rp81yrVZ+L8nz3f8W/raPp
# 5dWr+i6e80+2nUvDL3LA6HOJGz2JtQyaRXc4BgiwePEMKT6RfFW9V4mWRp4ItlRv
# 3mWhGFjPRLEU8kOefAcT77epe1gwLdlpUH3ZjCqECZYUWNu5FjNjPQUZ1kxD3o0K
# 7TyxLrZ6OH9b3mGhum17GBF0tAI3rkErriOxzjQF3UqMsFB9+OZlzQNfQRL/NnYw
# NjmV8JMXRe2+tjxS1bfqcUanmKpxYqiDJPJaoWG08VHuhuXBydfhiOhrG61H1u3N
# yoq5kb8XZ4LiSin+smSl5a9gCa7qZ17ceAAxuuCbItCXuHZ4nsk=
# =K+XO
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 17:18:46 2026 GMT
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* tag 'for-11.0-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
  coreaudio: Initialize the buffer for device change
  audio: Add functions to initialize buffers
  coreaudio: Commit the result of init in the end
  coreaudio: Improve naming
  ui/surface: Avoid including epoxy/gl.h in header files
  ui/console: Remove DisplaySurface::mem_obj
  ui/console: Unify pixman-OpenGL format mapping
  dump: enhance dump_state_prepare fd initialization
  ui/gtk-egl: Ensure EGL surface is available before drawing
  ui/dbus-listener: remove dbus_filter on connection close
  ui/dbus-listener: Fix FBO leak in dbus_cursor_dmabuf
  virtio-gpu: use computed rowstride instead of deriving it from hostmem
  virtio-gpu: fix overflow check when allocating 2d image
  ui/vdagent: add migration blocker when machine version < 10.1
  rutabaga: improve error handling, fix potential crash during init
  audio/mixeng: drop some needless checks

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-18 09:17:08 +00:00
Peter Maydell
c9dbd923f7 Merge tag 'pull-ppc-for-11.0-hardfreeze-20260317' of https://gitlab.com/harshpb/qemu into staging
ppc queue for 11.0

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEa4EM1tK+EPOIPSFCRUTplPnWj7sFAmm5bZ4ACgkQRUTplPnW
# j7vZvQ/9HlYrlHQD3eQSEyUlVoEkR4piSh/D8sdigOOOdYhPEQZ6spluHg3OLEml
# MvDv2Uz1t8GVKzGuZ19Y18H8wOW0zbjsOa9bfbtO7Mral7LIMbBFLej391czQVQC
# NQ64Wms2B2TwjKDam8msekMkME646m5SanzgT1hGkKmIAKKSCBLwA9Na1HfxdcwQ
# 1TcDpjHBLg0x3OOmkh7V1PYyb7RSIAFRcYEkPnvgEWvIOaGubTVpB7/syb2n+cdq
# ToPy0MvoIdlPID0wFd0t7t3tRPah/ubXD4ubrOEvWLDZ40BtLiB3p1Ou+MUU6lj1
# GfPx7gjW4QG4o5aV4MmsAKxEP6K3RfJcRVjJUa3tl8oJvggS9uwvewEqHT07XBWc
# NmxdEGzgkLCUXAVZLkKjqInz5VJlHROUWpsS8bq1edK09wju1o1CR0B0WDK//Cek
# oqfZtb/6XHvmFrNnJprJvPNOWuhash1XRbL+iyfYxJJwuqIZPkQWjABeD7Fu8/aZ
# Gpw3/2V+CiWJvThe9Z/vIEw/ksl1qigdNCtdVMeO9S8pQAtORZnUvNzWN5QKaVvL
# VjxsFXhiEEn6bdoycJE0V6mfuPGaKcvE/APTDA4dT1b4du8IaUiiqGvGvVY+F1vg
# p7ZpDlJmKd48jbkXnim8YiyXZO3sUUk7tw0N/xwPvCj+56nTv64=
# =OUEg
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 15:05:02 2026 GMT
# gpg:                using RSA key 6B810CD6D2BE10F3883D21424544E994F9D68FBB
# gpg: Good signature from "Harsh Prateek Bora <harsh.prateek.bora@gmail.com>" [full]
# gpg:                 aka "Harsh Prateek Bora <harshpb@linux.ibm.com>" [full]
# Primary key fingerprint: 6B81 0CD6 D2BE 10F3 883D  2142 4544 E994 F9D6 8FBB

* tag 'pull-ppc-for-11.0-hardfreeze-20260317' of https://gitlab.com/harshpb/qemu:
  ppc/pnv: fix dumpdtb option

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-18 09:16:58 +00:00
Peter Maydell
60ed428e5d Merge tag 'pull-block-2026-03-17' of https://gitlab.com/hreitz/qemu into staging
Block layer patches for rc0

- Fix race condition in throttle-group code triggering an assertion
  failure
- Fix assertion failure in mirror job when issuing job-complete twice

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCgAwFiEEy2LXoO44KeRfAE00ofpA0JgBnN8FAmm5SG8SHGhyZWl0ekBy
# ZWRoYXQuY29tAAoJEKH6QNCYAZzfMvMP/0IXpGtqMmG4cHvW6KS+VDrX4AOA7ZOg
# 8TP7KhpiFPKxnTzdlSiwlbNGAndUdxA8Ef7z5SUF0kslG9N+Ry3BCG6oB3b1zHAA
# 1Irz30FWny0zlESAvLjsK6KAetGEX/ZKKiEfWjlamZSfWzLI5RK5M8x59SxSene5
# oOe3+nxPV/I2VnXI1+svD3VtPjFxNjx2aA51sUfyuQRMP1II3XUdWCSv6DSb8wAh
# QVTFYWnFK9lHejXIXVOTHas5JG30cvC9fAsIBW8mK5J4rRWJP4zfqq5SQbgg9vtm
# pv0YZS8h0X/Vj3SSbPV6abP4MecVTLvvqCr/gRc+OtHbltK4HFMl3Y29VPDO5vTY
# XCPInFv6D84CliCESx2hGUJx9APScZqH047hxlmTTYdQGO2/RQSI6mr83CoVwKBh
# AmN23A5T2Bru+3zKea8HMwi/8NVtvZUWxJfq/NQRThXtLHILPTzKR6QP2VV8ZyD0
# d4Tqk1CqwE/yitbu9xjxpE5lC3O67q/X8DsH5SYiHJZVxSxQYs4b6LirHmlQrN4F
# aW3TQ7C18re4iqqPK3rlRsgR2q0pEdTbkBqSp5I7ZPU/QKLdklKgYnjI4ZefwjGy
# cMPy94rfP7HINH6SHX6R6AhIqFmPIxr1gPE3IjdOIWEqXV5r89DJ0ehrwWogasFv
# q1Qq7HRBIgwX
# =9y5H
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Mar 17 12:26:23 2026 GMT
# gpg:                using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF
# gpg:                issuer "hreitz@redhat.com"
# gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00  4D34 A1FA 40D0 9801 9CDF

* tag 'pull-block-2026-03-17' of https://gitlab.com/hreitz/qemu:
  block/mirror: fix assertion failure upon duplicate complete for job using 'replaces'
  throttle-group: Fix race condition in throttle_group_restart_queue()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-18 09:16:48 +00:00
Peter Maydell
ceaa7da4c4 Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* runstate: handle return code of EOPNOTSUPP properly from rebuild_guest()
* meson: do not hardcode paths to generated files
* rust: fix build when --disable-rust and meson < 1.9
* rust: suggest passing --locked to "cargo install"

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmm6YIAUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroMUCgf/W4sL/UM7+SWErMtpO5pHFu+bM15F
# 4wDq7DcGi0xD9CbjSfLy089+kDT5zhCU3/CFTWLRe78V4gEyNBAmRsb03M8NNyrw
# cw3iDoOMeHnMdhhJXIb2eZrohq9oavvvGAaOSMfH8FxMlhH+548MNQcgRLA4UgFS
# gcgYBoD7o+o4WLEgS7yCe904h3lX89wptv8ULMNLpBXxc7LFOXggwX6d1+An9pZO
# UAFW2qQnxg+OH0TIh7gH/GweGZLQsDMg39NMnJNpoRg4W91bZYZZAo1AoVMOIILE
# JPPQ73xNRAFSgao9s9+ObuLPdyxycxnSzrAZBlePvBqIbTgiCdQ1Xe7ysQ==
# =BEea
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Mar 18 08:21:20 2026 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  rust: suggest passing --locked to "cargo install"
  rust: fix build when --disable-rust and meson < 1.9
  build-sys: use the "run" variable
  runstate: handle return code of EOPNOTSUPP properly from rebuild_guest()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2026-03-18 09:16:26 +00:00
Paolo Bonzini
6257754bb9 rust: suggest passing --locked to "cargo install"
Without the option, cargo will try using the latest version of the
dependencies of bindgen-cli. While it will obviously respect the
constraints in Cargo.toml, old versions of Cargo do not have
version-constrained resolution and will choke on dependencies
that need Rust 2024.

Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2026-03-18 09:20:57 +01:00
Philippe Mathieu-Daudé
eca25ddb32 target/ppc: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
Get the target page bits at runtime.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260313062055.2188-3-philmd@linaro.org>
2026-03-18 06:53:23 +01:00
Philippe Mathieu-Daudé
0d05d9365c hw/s390x/vfio: Replace TARGET_PAGE_BITS -> qemu_target_page_bits()
Get the target page bits at runtime.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260313062055.2188-4-philmd@linaro.org>
2026-03-18 06:53:23 +01:00
Philippe Mathieu-Daudé
362d79e1a3 hw/misc: Build 'mac_via' as common unit file
Nothing there is target-specific anymore.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260313062055.2188-39-philmd@linaro.org>
2026-03-18 06:53:23 +01:00
Philippe Mathieu-Daudé
988499515d hw/display: Build stubs once
Move stubs to the global stub_ss[] source set. These files
are now built once for all binaries, instead of one time
per system binary.

Add pixman to qemuutil library dependencies since pixman is
transitively included, which is needed to be able to include
prototypes for stubs we declared:

  In file included from include/ui/console.h:4,
  include/ui/qemu-pixman.h:10:10: fatal error: pixman.h: No such file or directory
     10 | #include <pixman.h>
        |          ^~~~~~~~~~

On OpenBSD, opengl headers are not available in default
include path, and thus we need to add opengl to list of
qemuutil dependencies, otherwise we get:

  In file included from ../hw/display/acpi-vga-stub.c:4:
  In file included from ../hw/display/vga_int.h:28:
  In file included from include/ui/console.h:9:
  include/ui/surface.h:11:11: fatal error: 'epoxy/gl.h' file not found
  # include <epoxy/gl.h>
            ^~~~~~~~~~~~
  1 error generated.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20260225035739.42848-8-philmd@linaro.org>
Co-developed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20260315070834.198331-4-pierrick.bouvier@linaro.org>
2026-03-18 06:52:14 +01:00
Trieu Huynh
db52193355 plugins/api-system: Handle migrate_add_blocker() failure
migrate_add_blocker() can fail (e.g. if migration is already in
progress), in which case it returns a negative value and populates
its errp argument with the reason.

The previous code ignored the return value. Pass &error_fatal so
that on failure QEMU exits cleanly with an informative error message
rather than continuing in an inconsistent state.

Resolves: CID 1645470
Signed-off-by: Trieu Huynh <vikingtc4@gmail.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Tested-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260317134733.126584-1-vikingtc4@gmail.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
2026-03-17 12:13:16 -07:00
Philippe Mathieu-Daudé
4a425e5f13 fsdev: Build stubs once
Move stubs to the global stub_ss[] source set. These files
are now built once for all binaries, instead of one time
per system binary.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20260225035739.42848-11-philmd@linaro.org>
2026-03-17 19:50:05 +01:00
Fabiano Rosas
8f627bf1be tests/qtest/test-hmp: Free machine options
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260313182957.28432-3-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2026-03-17 14:58:09 -03:00
Fabiano Rosas
b9b1ca5162 tests/qtest: Don't dup machine name in qtest_cb_for_every_machine callbacks
The qtest_get_machines function caches the list of machines in a
static variable. Dup'ing the machine->name string only serves to leak
that memory when a single test is executed.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/qemu-devel/20260313182957.28432-2-farosas@suse.de
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2026-03-17 14:57:44 -03:00