Currently QEMU marks a vcpu state as dirty also on merely inspectional
reads, e.g. via "info registers", which triggers a writeback to the
hypervisor. For MSRs that cause a side-effect when written to this is
undesired.
We introduce an MshvPutState flag into the writeback logic to differentiate
"runtime" from "full" and "reset" writebacks that should occur e.g. after
a migration or startup.
Discrete side-effectful MSRs are excluded in runtime writebacks. So far
we only mark one MSR as not runtime-safe, but probably more will be
added eventually.
Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
Reviewed-by: Mohamed Mediouni <mohamed@unpredictable.fr>
A regression was introduced when the HV_X64_REGISTER_TSC MSR state is
being written to the hypervisor as part of the migration framework. If
the MSR is written without the time being frozen, the tsc_page (a
hyper-v enlightenment) is zeroed out and cannot be used by a guest,
which results in a performance regression, because the guest falls back
to costly reads of HV_X64_MSR_TIME_REF_COUNT.
An implementation of pre_resume_vm hook was added to handle the clock
lifecycle, relying on the dirty_vcpu state to avoid redundant state
writes.
Fixes: d540dcc5e2 ("target/i386/mshv: migrate MSRs")
Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
Reviewed-by: Doru Blânzeanu <dblanzeanu@linux.microsoft.com>
This change addresses a regression that was introduced when the dynamic
mapping handler was removed, from the MSHV controller, breaking OVMF
support.
We introduce a small uaddr-indexed table to track mapped regions. The
current logic turns an add into a remove op if a rom-device region is
currently not in romd_mode.
We could ignore both map + unmap for this condition, but this misses a
the case of a region transitioning from romd_mode=true => false. In this
case we still do want to unmap a region.
Fixes: 626e5dc999 ("accel/mshv: Remove remap overlapping mappings code")
Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
Reviewed-by: Doru Blânzeanu <dblanzeanu@linux.microsoft.com>
-bios on virt only loaded a raw image of at most 64 KiB at address
zero. This is insufficient for H2 firmware, which is usually hundreds of
KiB.
Boot a kernel given with -kernel through the firmware given with -bios.
Load both ELFs at their declared physical addresses, place the device tree
and initrd after the kernel, and enter the firmware through a boot stub
that passes the device tree in r1:r0.
Fixes: 88a8bc7f43 ("hw/hexagon: Define hexagon "virt" machine")
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
The DSP subsystem machines boot a guest kernel through the hypervisor
firmware. Move that code, the DT nodes, guest timer, into hex-board so that
it can be used by virt.
No functional change, this will be used by a subsequent commit.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Block layer patches
- qcow2: fix snapshot data corruption with discard-no-unref=on
- vmdk: Fix various bugs in handling malicious image files
- vhdx: Prevent out-of-bounds BAT accesses with malicious vhdx files
- iotests: add --quiet arg to hide env variable dump
# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmrx+EwRHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9Ziiw/+ORADnC0XFs85sEko+V831yp2NO99Gu+U
# GJ/C91rPaNpywIaCDajuPFcJN6xrVgKoMrRimsbTHoZnGN3J9Nd+k4ZMgefih3eD
# pA87hw7yvsngQVDtsmP4hT4vYocHBNTQBbLK9h6FmOaiBMMUn213bOFpbsq+wQ1S
# Yo64AUX6u3tbQP2ls+PV5IxtYYbnSWX9taD2UnA+HCdV24cIEfwrRhuBDspqjsVP
# DTkQwacXIDU9KZyW2tdXOH7l+JwhJL1JYOZJRODfv5xqhvxsetwxn50MKsBX/vXQ
# r2mIw+73FSw05tlrmomMIxE0ssWuMpxgf94L6FftVr8Wg5wgkxPw4Q13IDIyuPck
# gsoQ4sbsSS74AaJgwLuXmYU1M1q90Wviu3WN+MNdfdFIqjqwJCS/2JMu/KV0lkLA
# r2HA6oM/9M8GOcd40IVNcx1jW94OIQDyeP6uv8iPk7riXY76K2AAcYxgFGRqumwG
# 8aW0QiIyNc4dVY1sedL12xRHzPeaEMyZ9+L+tg3ibCjtM/CgzcR2vwFfkkthoGyc
# +bqByp1TX9f4H78IzqBv0c89pFn5mPBpoJzRrlBPE91FycLL76tx9o9MhVWjZpmS
# v5W0ZQwvQo/qhYSZ/AnZQOHW8tfkJv0jn7yLwf6JZbh9OuacY7H50nxMlBoBLMfG
# rDNsmuVL7BE=
# =gMMb
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 09 Nov 2026 08:43:56 AM PST
# gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg: issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@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: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* tag 'for-upstream' of https://repo.or.cz/qemu/kevin:
block/vhdx: Prevent out-of-bounds BAT accesses with malicious vhdx files
iotests/290: add 'discard' and 'write -z -u' case with a snapshot
qcow2: fix snapshot data corruption with discard-no-unref=on
iotests/290: add test case to check 'discard-no-unref' option behavior
block: add missing coroutine_fn annotations
block/vmdk: Avoid overflowing multiplication in vmdk_open_vmdk4()
block/vmdk: Reject a zero cluster_sectors parameter
block/vmdk: Use larger types for byte counts in vmdk_read_extent()
block/vmdk: Avoid reading off the end of descriptor memory
block/vmdk: Avoid assertion if image file has no extents
iotests: add --quiet arg to hide env variable dump
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target-arm queue:
* target/arm/ptw: check XN for ARMv6 in get_S1prot()
* hw/net/bcm2838_genet: various bugfixes
* arm/cpu: fix GIC v3 flag for a64fx
* hw/intc/arm_gic: do not hardcode GICv2 minimum binary point
* target/arm: Clear the local monitor on AArch32 (v8) exception returns
* hw/intc/hex-l2vic: avoid shift into sign bit
# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmrx0v8ZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3sQpD/9bO2J7p/Us50EJzpeEO15z
# 9r1hDTz9x1VvMjCuPOHcM6ByrzaZC0UOBnBNr/NgmSw26UEf/5KR4eukhVemKSkD
# tXnGbktuijzyMCVg4c1jTZXKnsLFi9kNKWM69GO2s8G4/LXiFE/uSXQi40BwIqyc
# aG21bTDplWbuH1DESAN6fge+P9F961Y7W5Qyw8LfTUWTE8XRB41WT6v3J+qEPWpN
# mJ3nyaD4dmh9m57UZQsYt91H9NWvPtkSxepdOXC1H4nhwFE+ZBcZ2dclITO2zPh1
# fWZ6mn5b8UbGwFKqMRNKUNAA54ktN0r1zzzRtCQ2+cMcHbmXRlRP0oCVFlKSN4zd
# cepYMneByqicjfuxaJcKO86TxuFUR5/bY3fTgwLFTQ+ydGAl9Ahv772eQdd4/bT1
# PVD6ebjSEEioS9+OpTuHyoLUuCPIEmFDDtsI/yhUd/k9dLBJGTPCEL2b7mErA+ig
# h6xTqAaIq/pepgAdiKqYLATIn1IStFNIMO5bxuDtJEGC1wyz8vcHQdw3mouVbP3w
# kNqU84veRlwv/4Pqm6MU1H0Drf6pIzRM1QdINq++wV+n0RQU9OsON2iJVZH2Zb+2
# DpeV6/U1P0YdJpPscQwLCp9CO43FbKBkqpl3qsCoyGtqa9vYpg4L5vxFPuvrheBJ
# AFQyJ1L9P3/O6WcVIE4XlQ==
# =9eMU
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 09 Nov 2026 06:04:47 AM PST
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [unknown]
# gpg: aka "Peter Maydell <pmaydell@gmail.com>" [unknown]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [unknown]
# gpg: aka "Peter Maydell <peter@archaic.org.uk>" [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: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* tag 'pull-target-arm-20261109' of https://gitlab.com/pm215/qemu:
hw/intc/hex-l2vic: avoid shift into sign bit
target/arm: Clear the local monitor on AArch32 (v8) exception returns
hw/intc/arm_gic: do not hardcode GICv2 minimum binary point
hw/intc/arm_gic: move num-priority-bits check
arm/cpu: fix GIC v3 flag for a64fx
hw/net/bcm2838_genet: fit the RX frame within the guest's buffer
hw/net/bcm2838_genet: hold RX frames while the ring is full
hw/net/bcm2838_genet: wrap the TX consumer index at 16 bits
target/arm/ptw: check XN for ARMv6 in get_S1prot()
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
The functions call coroutine functions or are called by coroutine.
Add an assert() in qcow2_do_close() code path which calls a
no_coroutine_fn bdrv_graph_wrlock_drained().
Add an assert() in qcow2_update_options_commit() in the coroutine
path.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260730171027.1023696-1-marcandre.lureau@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
The number of priority bits is implementation defined, and indeed
machines such as a9mpcore and arm11mpcore define it in the
num-priority-bits property. However we still hardcoded GIC_MIN_BPR.
This commit replaces the GIC_MIN_BPR and GIC_MIN_ABPR defs with macros
that read the property.
The calculation is based on "Table 4-47 Active Priorities register
implementation" in the GICv2 spec (page 4-150 of ARM IHI 0048B.b
ID072613):
+---------------+---------------+---------------+
| | | Maximum |
| Minimum value | Minimum value | number of |
| of Secure | of Non-secure | group |
| GICC_BPR | GICC_BPR | priority bits |
+===============+===============+===============+
| 3 | 4 | 4 |
| 2 | 3 | 5 |
| 1 | 2 | 6 |
| 0 | 1 | 7 |
+---------------+---------------+---------------+
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4375
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-id: 20261106-gic_read_bpr_from_property-v2-1-9f096cce4814@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Several problems with error handling in whpx_get_xsave_state:
- Does not handle WHV_E_INSUFFICIENT_BUFFER, which occurs frequently
in practice for XSAVE state.
- Does not free xsavec_buf when an error occurs.
- Error message and return code use errno where they should use hr.
Fixes: cfaa3b6c95 ("whpx: xsave support")
Signed-off-by: Doug Cook <dcook@microsoft.com>
Reviewed-by: Mohamed Mediouni <mohamed@unpredictable.fr>
Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>
* target/i386/tcg: bugfixes and cleanups
* AGENTS.md: add final instructions
* meson: rewrite scripts/qemu-version.sh directly in meson.build
# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmrp4jAUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroNpqQf+MSIq1hU468taSkdyWWr6ZmYKqNCL
# HJ2BXhojBlPbxTS3zRo/WfBUDeoysm+xkbgQLQu2FjDa4j/w5r1ibU2CzDq0GbYu
# +hvGaKlV2gyc/0Efp1m/LdY0ugZc+QtJyBtwVf13sclPEWnX/wPGQPUlUFvAYIif
# ciERbbH5QZ39th/gu2rbIOGNwm0epfRw/dcu41s3HrClQQ57eMCtrzQ6IXb13P3h
# NKSTwktsZf0kZ7LYGroKlQe+Soi4O3bFt9hruJ16W/7Zsu7wUKII0A474K9ppTuo
# ZqlSvS06+zUEE/b2QfcfMCHy+7sQVMXHONAbnAzHO2VLp7RKUWb9xXe/OQ==
# =Q1VY
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 03 Nov 2026 05:31:28 AM PST
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [unknown]
# gpg: aka "Paolo Bonzini <pbonzini@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: 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:
meson: rewrite scripts/qemu-version.sh directly in meson.build
include: introduce qemu/version.h
target/i386: terminate a tcg block on gen_RDMSR
AGENTS.md: add final instructions
target/i386/tcg: remove F operand type
target/i386/tcg: remove X and Y operand types
target/i386/tcg: reject VEX.NP for MMX instructions
target/i386/tcg: inline gen_leave
target/i386/tcg: change popl_esp_hack to an X86InsnSpecial
target/i386: raise #DE for INT_MIN / -1 in IDIV helpers
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
pci: fixes
pcie_sriov: fix for user-creation of VFs replaced by v2
pcie sriov: a couple more robustness improvements
pci: id docs clarified
pci: a bunch of test fixes, robustness
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCgAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmrpylYPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpHV0H/3vwNiHqWPRuDymo+TCK+gysIk1rewMM0a+g
# /fQ3L8iDBW+aofKJk6vwDuw03t/CJCUn/HupfESLpEhFM/wRkTCUyWwdfwfSDmO3
# O9kU0fA+JK+P/APDAasPBu+T0iNgHAx4oaLGCwe254zHyDpcYG3ef6+v4tEssXHR
# J4HWXS2Oo/gngYtM6FnaqDy73e1G6O7dVlsCvX7z7XCaci0/2aB0Wtf9ttgswVxz
# +MntmMccCDCJ9ybBvGgOBbPz/lZHGCoe2a171imo0PHOgV9r5gey0Ma71zz66G4F
# Ba/Z046Oq/G5su7D4XIkr6qys6YhEpQhYDKyEnmdFXcHGb6Rvv0=
# =MBg5
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 03 Nov 2026 03:49:42 AM PST
# gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg: issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [unknown]
# gpg: aka "Michael S. Tsirkin <mst@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: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu:
qtest/libqos/pci: Factor msix entry helpers into pci common code
qtest/libqos/pci: Fix qpci_msix_enable sharing bar0
qtest/libqos/pci: Enforce balanced iomap/unmap
tests/qtest/libquos/pci: Add migration fixup helper for pci devices
tests/qtest/ahci: unmap pci bar before reusing device
tests/qtest: Enable spapr dma with linear iommu
tests/qtest/nvme-test: fix NVMe struct field endianness
tests/qtest: Add libqos function for testing MSI-X interrupt status
tests/qtest: Fix virtio msix message endianness
tests/qtest: Enforce zero for the "un-fired" msix message value
pcie_sriov: fix null pointer dereference when initializing PFs in a system with user and device created VFs
pcie_sriov: perform additional checks after pci device realization
pci: fix null pointer dereference on pci device registration failure
pci id: assign pci subsystem id for osmates
pci id: clarify pci subsystem id usage
pcie_sriov: Adapt bar type array size to the number of regions
pcie_sriov: Rework the assert statements checking region numbers
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
block patches through 2026-11-02
- Denis V. Lunev: honor block size change on scsi child
- Denis V. Lunev: cheaper zero handling in backup/commit
# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAmrpWqkACgkQp6FrSiUn
# Q2oTaQf/TnHfweEw7qvJyKPBqaq5jhTq4k3kRs+t9ODhudSO6hxI44LOuEJLKj6V
# 7nGekkxmhptgp9ESRxaGKPRSFdYRYCwu6zgSwBDAMdQCCxW4sUOrjKAp4ruWxdQU
# XZbHeeN0lX95nXxfCC3Si5LqkHyzmzIRjLJkF4OTTVnCThtBhgYhwujjDlG5CfRO
# 2yD9ZKsS/ZLi1CfBDeZm5j0yggG8NUEtV48zZYAXRtpSkjMb4iN0tr13T/Ov+8n+
# fjg75VkqdJHgli/7UKM8zXWGqGH5NFuj1Gf5vXRMH6CwDt/tvZs5zJ5wfqWRXZ6V
# opm1rZKMh5Vx3LvhHGuhVis5sf4IDA==
# =ZkE1
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 02 Nov 2026 07:53:13 PM PST
# gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [unknown]
# gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [unknown]
# gpg: aka "[jpeg image of size 6874]" [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: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A
* tag 'pull-nbd-2026-11-02' of https://gitlab.com/ebblake/qemu:
block/block-copy: coalesce write-zeroes tasks
util/co-shared-resource: skip the mutex for an empty request
block/block-copy: replace zero_bitmap_valid with scan_done
block/block-copy: merge the two backup scan steps into block_copy_prescan()
block/block-copy: rename block_copy_is_cluster_allocated()
block/backup: pre-fill zero_bitmap for full/bitmap
block/block-copy: track known-zero source clusters
block/block-copy: extract block_copy_set_task_method()
iotests/124: cover backup of zero clusters and holes
block/commit: batch block-status queries
iotests/040: cover large and fragmented commit runs
block/commit: pass BDRV_WANT_PRECISE to block-status
tests/qemu-iotests/qom-set-drive: replace with a differently sized node
tests/qtest/virtio-scsi: cover a replacement that changes the size
scsi-disk: refresh the cached capacity from the resize callback
block: notify the parent when a replaced child has a different size
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
QAPI patches for 2026-11-02
# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCgAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmro2HsSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTUgYQALkOmmEhdlD5iatEU3Jcl7yy0Pto53tp
# 7sOP2AjxW0Hy4LJFFGGS6C8t5i+AZVuKHoydmUVY7RZBEoVhVnqD6Ia58dF1uzDJ
# RvPbkKrYXlkfKaAsL9XkTf3+/RxCRUBriHbua90YuIIbvj3f4uzM0bQLpu8M5M4l
# 8BT4NsbgqLp5XwndH9oxlxUH69nTuIwdYZSdnYTXJpnx6ySR89nDhXFzVBVre4Oy
# nD/wtGvLfN8ULDic6eOLIr9ks8YGcAP7jIgqmnIvvooewMXJm1utmzd1MUQNgSC8
# /r++STOkGYe4dAyOjgAC4ZOHj2U3IMOltiXIKaN8+Hz/j2rM71xnyeqX9o92SFwh
# dKBJbHOj6yf/FrsD4pbakpd9R/gNe+tUqEXnSopo8msZL1qE7SNRF69Ri+aFfgdt
# VUQB2fZgj+dvTOY7GIa7Yr1Mj8U9Y3rmDsJ20nEqgNPaj3jserDueJ8xfgrifYdh
# zFCEjr7RIW9F8wO6uQN62Et4/tA7VWVF8tt70BKdq96OJ+RhHVWVECgcnTlS/gTn
# 4psihUoBa+whwYJk8Q6uMUhpT9rHXQrwxqZFtMlItWg9wKkAjqsc2PzUJT1tZfee
# GrPuMBDQfW9zvIlB6DZcZuPIh5Y3fBj4aiHPsIcNxj8GeqwVu+n8m/xLJ/BqVEGr
# FNb1esRYontl
# =fjYB
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 02 Nov 2026 10:37:47 AM PST
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [unknown]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [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: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-qapi-2026-11-02-v2' of https://repo.or.cz/qemu/armbru: (74 commits)
tests/qmp-cmd-test: assert qapi-type resolves in query-qmp-schema
qom: use QAPITypeInfo in object_property_get_enum
qom: Drop object_property_add_enum() parameter @lookup
hw/i386: convert PCSouthBridgeOption to QAPI enum
qdev: PropertyInfo.enum_table is no longer used, drop
qdev: convert PropertyInfo definitions to use qapi_type
target/riscv: convert PropertyInfo definitions to use qapi_type
hw: convert device-local PropertyInfo definitions to use qapi_type
hw/ufs: Convert PropertyInfo to QAPITypeInfo
qdev: convert system PropertyInfo definitions to use qapi_type
qdev: convert core PropertyInfo definitions to use qapi_type
qdev: add qapi_type field to PropertyInfo with fallback registration
hw/s390x: convert BootCertificatesList to QAPI-aware registration
hw/ppc/spapr_drc: convert fdt property to QAPI-aware registration
hw/s390-virtio-ccw: convert loadparm property to QAPI-aware registration
hw/nvdimm: convert UUID property to QAPI-aware registration
qom: replace object_property_add_tm with StructTm QAPI type
virtio-balloon: convert guest-stats property to QAPI type
i386/x86: convert SgxEPCList property to QAPI-aware registration
accel/hvf: convert OnOffSplit property to QAPI-aware registration
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Invoking git and creating a .h file does not need a shell script.
Embed the logic directly in meson.build.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
In preparation for moving some of the qemu-version.sh logic to meson
and the preprocessor, create a wrapper header for the generated
qemu-version.h.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Mark virtualization related machine types as secure
* Mark KVM, Xen and Nitro accelerators as secure
* Use getexecpath on OpenBSD
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEOSEivHoFu8YQee2OpU5XPKwd8GwFAmroww8ACgkQpU5XPKwd
# 8GwpDxAAqXQS98CSUrF2i4hJhkTwBG++HztGNtD10pE/8Km31TM2CqC+cZ2UhmEI
# TqnIdl2hD1FHSZuiwC5zt+yr22IthX+Bh4/Lab7CjMwDgd7NY6MOwjiN0NfE/Mhk
# Q10G78j+lXPpSE1WyOMQI02l0u6wcWgmHdgK3uY70kWU31jAWPpXIrsUF5T/uETB
# A+SblVRVqN8RCthtKkxrPLdxDqP0ElxRg6xtmGyrcbHvA4BmPpPVDglcdEzgt7gP
# VlSLlk8VyCyaNhS3XvNzVBklyrzqMWYj02QWarff9cO3p5hXQsqnymHrIW1h02YD
# 52i1rL61jxcZdrOp2ZWNfFOFfMr6WARGJxYDlo83eup2vi1jeih2pHUeF8nk9JbN
# ThG4meWbI3W9284khwDjf9s4z6yWVCjPSglJBoVTp52mYMM9ZwhKiJWTjYcGFGS3
# vZ7sqpVxTeMOiohxdbr23ThcvfxR7Nd+cZkJ/+W7C8abmT/KIhmdI5VuaKkUmNC4
# pfNa+UBlFJV5oEjXZ7bHheAgf0PfbnswjDnlIPXLVDBk6TY4ONMN63dMK2ET4TN7
# rHdRivCnco/TV43RuuBBlNbGC6ghcTdWFNMlWvGW/xyhDz1/NQHOUzY1Fm98cJZi
# LbS8GlztCyD/iXVvoUwUAFJ2JbA+MNyvXOEf2j1eLSGv2zsyrrA=
# =mubs
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 02 Nov 2026 09:06:23 AM PST
# gpg: using RSA key 392122BC7A05BBC61079ED8EA54E573CAC1DF06C
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [unknown]
# gpg: aka "Daniel P. Berrange <berrange@redhat.com>" [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: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF
# Subkey fingerprint: 3921 22BC 7A05 BBC6 1079 ED8E A54E 573C AC1D F06C
* tag 'misc-fixes-pull-request' of https://gitlab.com/berrange/qemu:
accel/nitro: mark 'nitro' accelerator as secure
accel/xen: mark xen accelerator as secure
accel/kvm: mark kvm accelerator as secure
hw/nitro: mark 'nitro' machine as secure
hw: mark xenpv, xenpvh, xenfv as secure machines
hw/s390x: mark 's390x-ccw-virtio' as a secure machine
hw/riscv: mark 'virt' as a secure machine
hw/ppc: mark 'pseries' as a secure machine
hw/loongarch: mark 'virt' as a secure machine
hw/i386: mark 'microvm', 'i440fx', 'q35' as secure machines
hw/arm: mark 'virt' as a secure machine
util/cutils: Use getexecpath() on OpenBSD for qemu_init_exec_dir()
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target-arm queue:
* raspi4b: Implement PCI and GENET ethernet device
* target/arm: Initialize SMCR_EL1.EZT0 for linux-user
* hw/dma/xlnx_dpdma: Don't allow DMA off end of host buffers
* target/arm: For linux-user, prioritize PC misalignment fault over insn abort
* net/tap: Avoid "close(-1)" in net_init_tap() error path
* hvf: arm: save/restore SME state only when SME on
* hvf: arm: advertise ID_AA64PFR0_EL1.GIC correctly
* target/arm: Refactoring preparatory to ID register configurability
* target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1
* gicv5: minor cleanups and bugfixes
* target/arm: hold bql when SEV sets the event_register
* target/arm: fix bcm2835 migration issue
# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmrow6QZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3gsaEACmzj13cBTMqhwaAhOKG+8P
# 1n68eJ+r/02w4ZTUq8X9FhpoepnaoaGbhm5TivHfuAdkQbzxM44kMAhzRhuNZ9if
# RnKhIGRULXJ3rhtRl5pJhK5754+p9srOkeCYsXX///aLhPtsgPaBcwf7G14RXOF0
# L3ZG7ejciQnsniI5P1By1oMO5hExcxFzSVvIaTUItBXClG4NexUOBpEN+xEkGFVT
# paB1L3fWtCuOwmaqHfYwJXAFeQJ6WzFARUEB1dwSZoNJyMaG6DQXMh0X6UxJvmD1
# wrgIeoWXqMgal4ylImvTQOmHENKLq3YkSNzqyw4A/EgeYf7sZasjU4mOt/PTnpO8
# zRauPAGjw8NnkfNgwSmNAbT1kq6uiGaJgvTF0xUFkjncjhY0QKVNy7EqGND4SkS5
# HMH1ebdAd2RuT4aNbPaPYOVsjQYwoUgja7Lh8ne7WYFWhxr115diGTDYsJYWjk4X
# lCrs0yH3N0WTcBZu2GMjWl9J46nbZtMZ3OmicUt9Dkie5IVqQiEe8x1fehSq3Yx1
# QMWtDoODTt+QxkrlgzqRELs2xTlVbKdKNDnm5nZwOl7iHwjmKc+yh9Z1oHjjdCc3
# uwkJfcE+/8J8+hnx23M1CP2qzZFYsn6HLLzgLYk7JPvoMW58N/jhOp1/G3wFdAih
# eE72zj4tnm13nEMoCk0smQ==
# =bi2j
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 02 Nov 2026 09:08:52 AM PST
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [unknown]
# gpg: aka "Peter Maydell <pmaydell@gmail.com>" [unknown]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [unknown]
# gpg: aka "Peter Maydell <peter@archaic.org.uk>" [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: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* tag 'pull-target-arm-20261102-1' of https://gitlab.com/pm215/qemu: (46 commits)
target/arm: fix bcm2835 migration issue
target/arm: don't pass env to the sev helper
target/arm: hold bql when SEV sets the event_register
hw/intc/arm_gicv5: Relax QEMU_GICV5_MIN_LPI_ID_BITS to 0
hw/intc/arm_gicv5: Pass cpuidx rather than iaffid in gicv5_get_hppi()
hw/intc/arm_gicv5: Pass CPU index to CPU interface
target/arm: GICv5 cpuif: Use arm_cpu_set_irq() to set IRQ/FIQ status
hw/intc/arm_gicv5: Regularize spacing in config_readl() switch
hw/intc/arm_gicv5: Ignore low bits in L1_ISTE.L2_ADDR
hw/intc/arm_gicv5: Ignore low bits in IRS_IST_BASER.ADDR
target/arm/cpu64: Define cpreg migration tolerance for PMMIR_EL1
target/arm/cpu64: fix typos in kvm_arm_set_cpreg_mig_tolerances()
target/arm/kvm: Improve error handling on scratch vcpu probe
target/arm: Directly store cpu probe failure error
hw/arm/virt: Make sure virt_get_caches() keeps on reading CLIDR_EL1 as 0
target/arm/kvm: Introduce kvm_arm_vcpu_prepare_init_features helper
target/kvm: Pass an Error handle to kvm_arch_init_vcpu
target/arm/kvm: Pass an error handle to kvm_arm_init_cpreg_list
target/arm: Enforce MPIDR into isar.idregs[] storage
target/arm: Move MIDR into isar.idregs[] storage
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
zero_bitmap_valid says more than its name: a task created once it is
set skips its own block-status query, the sync=top skipping included,
because the scan has already settled what to copy. And the end of the
scan was announced twice, clearing skip_unallocated and then publishing
zero_bitmap_valid, with an ordering rule in a comment tying the two.
Rename the flag to scan_done, and let block_copy_set_scan_done() clear
skip_unallocated before publishing it, so backup_scan_source() makes one
call and the order is kept in one place. skip_unallocated is left to
mean that a sync=top scan is in progress. No behavior change.
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
CC: John Snow <jsnow@redhat.com>
CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-ID: <20261030010613.1612771-11-den@openvz.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
block_copy_reset_unallocated() and block_copy_calculate_zero_bitmap()
are both one step of the same scan and differ only in what they do with
the answer. Fold them into block_copy_prescan(), which drops unallocated
clusters from copy_bitmap while skip_unallocated is set, so
backup_scan_source() loses its per-mode branch.
sync=top now walks the dirty areas the way full and bitmap do, so it no
longer queries what copy-before-write has already copied during the
scan. A failed query still fails sync=top, as nothing else can tell
which clusters to skip, and still leaves the area to be copied as data
otherwise.
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
CC: John Snow <jsnow@redhat.com>
CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-ID: <20261030010613.1612771-10-den@openvz.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Only sync=top runs an up-front scan, so the previous patch did nothing
for the other modes. FULL and BITMAP know their complete copy_bitmap
before copying starts, and the same copy-before-write guarantee holds:
a cluster still dirty when the copy loop reaches it has not been written
since the scan.
Add block_copy_calculate_zero_bitmap(), driven one query at a time from
backup_scan_source() so the graph rdlock and the pause point are taken
per query, and query each confirmed span once however many dirty areas
it covers. Each step searches copy_bitmap only a bounded window ahead,
since for sync=full the rest of the image is one dirty area. The scan
only fills zero_bitmap and never clears copy_bitmap, so sync=full still
writes zeroes for clusters the source never allocated; it just stops
re-querying to find that out. Unlike the per-task queries it replaces
the scan is serial, so a sparsely dirtied job against a slow source may
spend more time here than it saves. The sync=top loop had the same
shape, so both fold into backup_scan_source().
sync=none keeps the per-task query. Its bitmap says "anything may be
copied", not "this will be copied", and it only ever copies what the
guest writes during the fleecing window, so scanning the whole image at
attach is the wrong trade.
Reviewed-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
CC: John Snow <jsnow@redhat.com>
CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-ID: <20261030010613.1612771-8-den@openvz.org>
Signed-off-by: Eric Blake <eblake@redhat.com>
block_copy_reset_unallocated()'s up-front scan already queries the
source, and the same query reports zero-ness. The copy loop re-queries
per task and, having no answer up front, can only size a task by the
copy buffer, so a mostly-zero image is cut into thousands of pieces
that each turn out to read as zero.
Cache the answer in zero_bitmap, published by zero_bitmap_valid once
the scan is done. block_copy_task_create() then picks the method from
the bitmap and ends the task where the answer changes, so a zero task
never reaches into data and a copy task never swallows a zero run. The
per-task query stays as the fallback until the flag is set, since CBW
intercepts guest writes while the scan is still running.
The scan and the query it replaces must resolve BDRV_BLOCK_ZERO against
the same part of the chain, so the scan moves from bdrv_co_is_allocated()
to bdrv_co_block_status_above() and the base selection is factored out
into block_copy_status_base().
zero_bitmap is a plain HBitmap, not a BdrvDirtyBitmap: an internal cache
has no business in query-named-block-nodes. One writer and readers gated
by the flag need no mutex, but the publish needs ordering, hence
store-release and load-acquire. It is allocated on demand, so sync=none
and a standalone copy-before-write filter do not pay for it.
Reviewed-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
CC: John Snow <jsnow@redhat.com>
CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-ID: <20261030010613.1612771-7-den@openvz.org>
Signed-off-by: Eric Blake <eblake@redhat.com>
bdrv_replace_child_bs() swaps the node a BdrvChild points to without
telling the parent anything about it, so a parent which tracks the size of
its child never learns that it changed. Every other way the size of a node
changes goes through bdrv_co_truncate(), which does notify.
The device models which care all register the same BlockDevOps hook:
virtio-blk resize_cb = virtio_blk_resize(), ending up in
virtio_notify_config()
ide/ahci resize_cb = ide_resize_cb(), refreshing the cached size
and the IDENTIFY data
scsi-disk resize_cb = scsi_disk_resize_cb(), reporting
CAPACITY DATA HAS CHANGED
xen-block resize_cb = xen_block_resize_cb()
Only scsi-disk is really hurt by the missing notification, because it is
the one which validates guest requests against a cached size.
virtio_blk_sect_range_ok() and ide_sect_range_ok() both call
blk_get_geometry() for every request, so a missing notification leaves
those guests with a stale idea of the size but never refuses I/O which the
node underneath can serve. check_lba_range() compares against
SCSIDevice.max_lba, filled in by scsi_disk_reset() and updated only by the
READ CAPACITY(10) and (16) handlers, so with nothing to make the guest
re-read the capacity every request past the end of the old node is refused
for the whole life of the device.
This is reachable with qom-set of the 'drive' property, which is allowed
on a realized device, and it is silent on the host: out-of-range requests
are answered by scsi_check_condition() and never reach
scsi_handle_rw_error(), so there is no BLOCK_IO_ERROR event and io-status
stays 'ok'. The guest sees ILLEGAL REQUEST / LOGICAL BLOCK ADDRESS OUT OF
RANGE, which Linux turns into EREMOTEIO for reads as well as writes.
Emit the notification from bdrv_replace_child_bs(), so that every device
model gets it through the path it already implements rather than any of
them being special cased. Send it only when the size really changed, which
keeps the callback out of the common case of a replacement by an equally
sized node.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Message-ID: <20260812121500.1034178-2-den@openvz.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Block layer patches
- mirror: do not require a root block node
- file-posix: Add 'accept-read-only-device' option
- vmdk: Fixes for converting to streamOptimized
- virtio-blk: Add support for FUA write requests
- Print simple help text when calling "-blockdev help"
- qemu-nbd: Add --all-bitmaps option
- coroutine: Fix default idle pool max size on Linux
# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCgAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmrouiURHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9ajng/9FqfSbupb9f3mQGsIuqxrnmXsC2DgbnRw
# 2Oyin4d4CqdYorZ6AfJWrGbEx6Dw0dWnWLYOVEZJDhNsnsf3biHODtZhZLUizIbi
# H4X5u6WMZuw/vxbK49m63ezHc61fjsapcrZxewGODpYTUiWFlRCxOnxziRk3EfUS
# Sxz3HAYDjz64tVDfnso5PIClzCCnKJzKZChECdCrhTqTCdPOUsAHZMHv7h1Vt64C
# cqxJrHc0DPPdpyvsW2uZ6onvk02ONF5NKSne79Id1mZOiCgJbwuTOUCeDN5aBhlL
# f326Yhk4T8DhRxDgvPS+WVndKQZQvmOrQxhcGvYie9Z/hCCr+GVn8tQ7OGwqWkSb
# tIViaQQH/LLf5/OUuF3TON23W57vP60eD4EmOynoOq8bz8fPx/68sh4z/L12DNW7
# jwq2RONdhFjzfEfa73yw3XX8FWKfyxfQcRE4z+xB1Lss6iWjoHhJz6JCisOhghyH
# tNuR1b18vIUVME7GoFQlF5fKgASCcowJpUyAaoavKCFyx7c5rO3WLF48KzRXY0GO
# l+26ZxYFsvoZk7wDAsuvPwBqXeHeFT0nWwgb5ME0gclrTi3EmldWGy+mpjsmbF2S
# S7LX6EjZCpmDA0Sv7yw1vmMlH4kHH9YsjCBsmvQVeIlxuSagChTfMsE/UA/jOgXT
# lq9UypOfsdU=
# =ywzh
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 02 Nov 2026 08:28:21 AM PST
# gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg: issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@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: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* tag 'for-upstream' of https://repo.or.cz/qemu/kevin:
block/vmdk: add eos marker for stream optimized disks
block/vmdk: skip RGD for stream optimized disks
block/vmdk: Don't preallocate full 64k for compressed data grains
qemu-pr-helper: do not free reply when multipath_process_cmd() fails
block: fix leak of block histogram data
iotests: cover discard passthrough during background mirror
virtio-blk: Add support for FUA write requests
iotests: Add loop-accept-ro-dev test
file-posix: Add 'accept-read-only-device' option
iotests/041: add tests for mirroring below throttle node
blockdev: mirror: do not require a root block node
iotests/041: add test for mirror with throttle node as source
util/coroutine: Reduce default idle pool max size
util/coroutine: trim sysctl's max_map_count newline before parsing
qemu-nbd: Add --all-bitmaps option
block: Print simple help text when calling "-blockdev help"
tests/qtest/fdc-test: check block accounting of non-DMA reads
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Move PCSouthBridgeOption from a hand-rolled C enum to a proper QAPI
enum in qapi/machine.json.
This gives the x-south-bridge property a generated type_info with a
valid masked_name, so it appears in query-qmp-schema introspection and
the qapi-type field of qom-list-properties output.
The south_bridge/default_south_bridge fields change from const char *
to PCSouthBridgeOption, with an explicit mapping table from enum value
to QOM device type name.
Enum values are changed: "PIIX3"->"ppix3", "piix4-isa"->"piix4", this
is under a x-property, so shouldn't be a breaking change.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-54-armbru@redhat.com>
Add a qapi_type field to PropertyInfo to prepare for the transition
from string-based type metadata to QAPI type-info.
Update qdev_property_add_static() and qdev_class_add_property() to
pass qapi_type instead of NULL to object_property_add() and
object_class_property_add().
Update the shared enum accessor functions to prefer .qapi_type->lookup
over .enum_table via a new qdev_propinfo_enum_lookup() helper.
No PropertyInfo definitions are changed, all .qapi_type fields default
to NULL, so this patch is no-op for now.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-47-armbru@redhat.com>
Define a StructTm QAPI struct in common.json matching the existing
"struct tm" property wire format (tm_year, tm_mon, tm_mday, tm_hour,
tm_min, tm_sec as int32).
Convert the two callers (mc146818rtc and spapr_rtc) to pass its
QAPITypeInfo to object_class_property_add() / object_property_add(),
and use a standard ObjectPropertyAccessor that populates a StructTm
and calls the generated visitor.
Remove object_property_add_tm(), object_class_property_add_tm(),
the TMProperty type, and the property_get_tm() helper from
qom/object.c, along with their declarations in object.h.
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-42-armbru@redhat.com>
Convert all callers of object_class_property_add_enum() but one to
pass QAPITypeInfo instead of QEnumLookup.
This enables QMP QOM introspection to report accurate QAPI type names
for enum properties in member @qapi-type.
Leave pc_i440fx_machine_options() for later, because enum
PCSouthBridgeOption is a handmade QAPI-like enum instead of a real
one.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-19-armbru@redhat.com>
Callers may either pass a non-null @lookup, or a non-null @qapi_type.
For now, all pass a non-null @lookup and a null @qapi_type. Callers
updated with this Coccinelle script:
@@
identifier fun = {
object_property_add_enum, object_class_property_add_enum
};
expression obj, name, type;
@@
- fun(obj, name, type,
+ fun(obj, name, type, NULL,
...)
Future patches will eliminate non-null @lookup and drop the parameter.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-17-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Add a const pointer to QAPITypeInfo in ObjectProperty. NULL for now,
but future patches will add means to make it non-null. The
QAPITypeInfo will then be used by QOM introspection to tie the
property to a QAPI type.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-11-armbru@redhat.com>
Introduce a minimal struct that pairs a QAPI type's internal name with
its "masked" introspection name. Generated constants of this type will
let QOM property registration carry a reliable reference to the QAPI
schema and possibly other associated data.
The fields are populated in following commits.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20261101201717.3911097-8-armbru@redhat.com>
The GICv5 specification allows implementations to declare a
MIN_LPI_ID_BITS value in IST_IDR2, which specifies the minimum number
of supported LPIs which can be configured (both for physical LPIs and
for virtual LPIs in VMs). It also notes (I_ZKLJR) that it doesn't
expect most hardware implementations to require a minimum numberof
LPI ID bits, and that this is mostly useful for the virtual IRS that
a hypervisor might expose to a guest.
QEMU generally prefers to offer the guest the highest-flexibility
setting when it comes to this kind of IMPDEF value, so for instance
we set our supported ID and IAFFID bit size to the maximum the spec
permits. Since this value is a minimum rather than a maximum,
"highest-flexibility" means allowing the guest to configure a very
small LPI range if it wants to. Our current setting of 14 for
QEMU_GICV5_MIN_LPI_ID_BITS is the least-flexible the architecture
permits and requires that guests always configure large LPI ranges.
Set QEMU_GICV5_MIN_LPI_ID_BITS to 0, as the spec suggests real
hardware would.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Now the CPU interface knows its own cpuidx, we can pass that to
gicv5_get_hppi() and avoid the IAFFID->cpuidx lookup in the IRS.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
In a real hardware GICv5, the IRS knows which CPU is talking to it
because each IRS<->cpuif link is a separate 1:1 connection. In
QEMU's implementation, the cpuif code calls functions like
gicv5_set_priority(), and currently we usually don't pass anything to
tell the IRS which cpuif is making the call, because mostly the IRS
doesn't need to care. There are a few places where it does need to
know, notably in gicv5_get_hppi(). Here we have the cpuif pass its
IAFFID; the IRS then looks that up by doing a linear search of the
cpu_iaffids[] array to get the index of the CPU.
For virtualization, many of the stream commands which don't currently
need to say which cpuif is making the call will have to start doing
so, because changing the state of a virtual interrupt requires the
IRS to look up the VPE which is resident on the calling cpuif. This
makes the IAFFID->cpuidx lookup seem increasingly awkward.
Change gicv5_set_gicv5state() to pass the IRS's CPU index value for
the cpuif as well as the guest-visible IAFFID, and make the stream
functions identify the cpuif by CPU index rather than IAFFID, to
avoid the unnecessary IAFFID->cpuidx lookup.
As this is now three GICv5-related things that we are keeping in the
CPU state struct, we push them into a sub-struct to keep them tidy.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
The GICv5 spec defines that an L2 IST is always aligned to its size,
by stating that bits [N:0] of the address are 0 where
N = 11 + (2 * L2SZ)
We were missing this check, and only aligning by applying
R_L1_ISTE_L2_ADDR_MASK, so we would only enforce 4K alignment even if
the L2 IST was 16K or 64K.
Add the missing masking of low bits. We already needed to calculate
the number of bits needed to index each byte in the L2 table, so add
it to the GICv5ISTConfig to save having to re-calculate it later.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
The 'microvm', 'i440fx', 'q35' i386 machines are already declared
secure in docs/system/security.rst, due too their intended usage
in virtualization scenarios.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The typical API design pattern is for a method to be named after
the type of the first arg passed into the method. For the
compat_policy_input_ok method, this points towards 'CompatPolicy'
being the first arg, matching compat_policy_check_security.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20261030141713.2841710-2-berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
The xlnx_dpdma DMA engine allows the guest to do DMA to host buffers
for audio and graphics data. These buffers are set up by the xlnx_dp
device, which calls xlnx_dpdma_set_host_data_location() to tell the
DMA engine where they are. However, this API doesn't provide any way
to say how big the host buffers are, and the DMA engine does not
check whether the guest is trying to write off the end of the buffer.
Add a length argument to xlnx_dpdma_set_host_data_location(), and
bounds check the guest's DMA writes against it. The DPDMA ISR has
bits for each channel for "descriptor payload is too large", so we
report such overflows there.
Cc: qemu-stable@nongnu.org
Fixes: d3c6369a96 ("introduce xlnx-dpdma")
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4134
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20261025110857.1973128-1-peter.maydell@linaro.org
Wire the BCM2838 GENET device (added in the previous patches) into
the SoC: instantiate it in the peripherals block with
qemu_configure_nic_device() so it picks up a -nic/-netdev from the
command line, map its register region at the real BCM2711 physical
offset, and route its two interrupt lines through the GIC. Also stop
raspi4b from masking out the "brcm,bcm2711-genet-v5" device-tree
node, now that the controller it describes is actually implemented.
Adapted from patches 19-29/41 of Sergey Kambalin's Raspberry Pi 4B
series (patchwork series 829638) against current QEMU master.
Signed-off-by: Marcelo Manzo <marcelomanzo@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20261027143036.44973-16-marcelomanzo@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
The device had no VMStateDescription, so none of its register or PHY
state was saved or migrated.
The MAC register block and the PHY registers are structs that contain
nothing but uint32_t (MAC) or uint16_t (PHY) fields. Overlay each with
an array of the same element type, in an anonymous union, so that the
rest of the code keeps its s->regs.foo style access, and migrate each
block as an array of that type. Unlike describing them as byte
buffers, this is correct when migrating between hosts of different
endianness.
The interrupt outputs are derived from the registers and need no
handling after load: the device at the other end of each line
migrates its own state.
Signed-off-by: Marcelo Manzo <marcelomanzo@gmail.com>
Message-id: 20261027143036.44973-15-marcelomanzo@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>