Previously, ASPEED hosted the AST1040 pre-built image in the Zephyr GitHub repository
as a temporary solution for QEMU functional tests.
ASPEED now provides official AST1040/AST1080 pre-built images in the aspeed-mcu-fw-hub
repository, starting with release v01.00.
Update the AST1040 functional test to use the official pre-built image from
aspeed-mcu-fw-hub instead of the Zephyr repository.
Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20261028023154.48395-14-jamin_lin@aspeedtech.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
UFS command fixes and fault injection tests
- Add REPORT LUNS support for well-known LUNs
- Fix PRDT validation and SYNCHRONIZE CACHE handling
- Add fault injection and reset/task management tests
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEUBfYMVl8eKPZB+73EuIgTA5dtgIFAmrkT5cACgkQEuIgTA5d
# tgKmBA/9Ep14GJ7zPs5D7Bgfn5c+01AAByp0b/QJZU4NWuYpDp3NeqEAhD5sBn7f
# 61IQw3bIjXGhlHqPU40prGM7uszCEzmfqDC1UkItfxQNUB7pnBcfEq9dG6tJzUDb
# +Ehg3R2d2pJ4v9ZlSW45x+p755HDG1GbJ6DpkqHst7mzPWyzKoNKeOX+M/hmHBQ8
# wvcpVnAwpZdEujK6qQRBNxnk4DrQhpMqKAVHglyePxNcwDjNsooLcnaLtifK6XdQ
# cPiFEZSaPm8GmLuZzUvMVs1ad2QanTWw+gNeim9un+r2WMHCxx/q9LYoeOVQ6FYe
# 8h0Ue3Zsv+6ySnYUVC1z7TLB4I5UC28CxL0Au8t2K4kUQ5VWKtb3uZ9vCcxz584y
# vtGkQ0UHsiDkFqqTbsgrxUuplMuDUG76TgZmbeksy1ms/8TGY7/PDz70C8fdyr0N
# ynlCRKjeGHzVWdUrI3QA6FySmpKShAXUJywQyqlFFtglgea7CrjMYPd6CyGRBWEs
# eSAq9EgpjSkJ3hvTD1zOdzRwiP1nrExkwdATPiucxGUGSR4bNlI6RV0TKT2PTpUU
# 6CHgLttcp2011drah4AZVJX1QZiZZ3y5CPOvlFqMKNSrfzgRU6Z5KUpIjJRI2HWq
# 5WVvEyeBOj5JQLeM7a1tLwUOJB3bQBoswA3TlSXrUtR+h8eR1Zw=
# =ebX7
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 30 Oct 2026 03:04:39 AM CDT
# gpg: using RSA key 5017D831597C78A3D907EEF712E2204C0E5DB602
# gpg: Good signature from "Jeuk Kim <jeuk20.kim@samsung.com>" [unknown]
# gpg: aka "Jeuk Kim <jeuk20.kim@gmail.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: 5017 D831 597C 78A3 D907 EEF7 12E2 204C 0E5D B602
* tag 'pull-ufs-20261030' of https://gitlab.com/jeuk20.kim/qemu:
tests/qtest/ufs-test: Add QOM fault injection task abort test
tests/qtest/ufs-test: Add MCQ runtime register and TMR handling test
tests/qtest/ufs-test: Add HCE reset unit test
tests/qtest/ufs-test: Add TMR and async MCQ SCSI submission helpers
docs/system/ufs: Update task management request support status
hw/ufs: Add ssu-timeout mode for power management recovery testing
hw/ufs: Handle task management requests for fault-injected held requests
hw/ufs: Add experimental fault injection properties for holding requests
hw/ufs: Check the PRDT size against the transfer length of the CDB
hw/ufs: Pass SYNCHRONIZE CACHE(16) to scsi-hd as SYNCHRONIZE CACHE(10)
hw/ufs: Fail SCSI commands that move data without a PRDT
hw/ufs: Add support for REPORT_LUNS SCSI command for Well Known LUNs
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Add ufs_test_fault_injection_abort() to validate runtime QOM fault
injection modes via x-fault-inject-tag and x-fault-inject-mode
(abort-success with held-request tag overwrite rejection, two-stage
UFS_ABORT_TASK + SQRTC.ICU and LUN matching, in-transition completion,
timeout with UTMRLCLR clear-on-zero verification, abort-failed
rejection, and ssu-timeout WLUN START_STOP filtering).
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
Add ufs_test_hce_reset() to verify HCE 1->0->1 controller reset
behavior, checking that UTMRLRSR and dynamic MCQ queue configuration and
operational registers reset to 0 while host-configured registers (IE,
UTMRLBA/UTMRLBAU, MCQCONFIG) and static capability offsets (SQDAO/CQDAO)
are preserved and subsequent I/O succeeds.
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
Add ufs_send_tmr() and ufs_mcq_send_scsi_cmd_async() helper functions
in preparation for UTMRL task management and QOM fault injection unit
tests.
Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
scsi-hd moves as many bytes as the SG list of a request holds, and
ufs-lu builds that list from the whole PRDT. When the PRDT is larger
than the transfer length in the CDB, a WRITE writes more blocks than
the CDB names and a READ reads more. A one-block WRITE(10) at LBA 0
with an 8 KiB PRDT also wrote LBA 1, and its response reported no
residual. A UFS device transfers what the CDB asks for and reports the
rest of the Expected Data Transfer Length as a residual.
The commands that scsi-hd emulates had their residual computed against
the PRDT too: an INQUIRY with an allocation length of 36, a 4 KiB PRDT
and an Expected Data Transfer Length of 4096 reported an overflow of
4294959176 bytes. It now reports an underflow of 4060.
When the PRDT is smaller than the transfer length, scsi-hd moved what it
holds and the request completed without an error, for example a
two-block WRITE(10) with a 4 KiB PRDT. Such a request now fails with OCS
MISMATCH DATA BUFFER SIZE, as one without a PRDT does. As in
virtio-scsi, the PRDT is compared with the transfer length of the CDB,
which for commands that return data is the allocation length, and before
scsi-hd checks the CDB.
The new ufs_fit_data_buffer() in ufs.c, where the SG list is built from
the PRDT, cuts a longer list and reports a shorter one; ufs-lu passes it
the transfer length that scsi_req_new() parsed. The HID qtest wrote
eight blocks from a one-block buffer, so give it eight blocks. The new
long-prdt and short-prdt qtests failed before this change.
Fixes: 2a8b36a496 ("hw/ufs: Support for UFS logical unit")
Cc: qemu-stable@nongnu.org
Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Reviewed-by: Stanley Jhu <stanleyjhu@google.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
scsi-hd implements SYNCHRONIZE CACHE(10) only and fails the 16-byte
variant with INVALID COMMAND OPERATION CODE. Linux sends SYNCHRONIZE
CACHE(16) to zoned disks (sd_zbc sets use_16_for_sync), so once a
logical unit can be zoned, every flush from such a guest fails. With
the zoned logical units and without this change, a Linux 7.3-rc7
guest logged
sd 2:0:0:1: [sdb] tag#9 Add. Sense: Invalid command operation code
critical target error, dev sdb, sector 0 op 0x1:(WRITE) flags 0x800
and fsync() on the disk failed with EREMOTEIO.
scsi-hd flushes the whole medium for SYNCHRONIZE CACHE(10) and does not
look at its LBA range. Hand the 16-byte command to scsi-hd as the
10-byte one and keep the IMMED bit. This keeps the UFS change inside
hw/ufs; if scsi-disk learns SYNCHRONIZE CACHE(16), the translation can
go.
Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
A command whose CDB transfers data, sent with a PRDT length of 0,
reaches scsi-hd without an SG list. The SCSI layer then calls the
transfer_data callback of the bus, which ufs_scsi_info does not set, and
QEMU dies with SIGSEGV. A guest triggers this with, for example, an
INQUIRY whose PRDT is empty; the new no-prdt qtest crashed QEMU before
this change.
Check the transfer direction that scsi_req_new() parsed, and fail such a
command with OCS MISMATCH DATA BUFFER SIZE before it reaches scsi-hd:
the PRDT describes less data than the command moves. virtio-scsi
likewise fails a command that has no matching buffer
(VIRTIO_SCSI_S_OVERRUN). A request that only reports a pending unit
attention moves no data and goes through, so that the guest still sees
the unit attention.
Handing scsi-hd an empty SG list instead is not enough: READ and WRITE
then complete synchronously in dma_blk_io() and trip the assertion in
scsi_dma_complete().
Fixes: 2a8b36a496 ("hw/ufs: Support for UFS logical unit")
Cc: qemu-stable@nongnu.org
Signed-off-by: Daejun Park <daejun7.park@samsung.com>
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com>
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
Migration pull-request
- Compatibility fix for multifd+postcopy migration against older versions
- Rework of early connection code
- Adjustment to snapshot thread name
# -----BEGIN PGP SIGNATURE-----
#
# iQJEBAABCAAuFiEEqhtIsKIjJqWkw2TPx5jcdBvsMZ0FAmrjlD0QHGZhcm9zYXNA
# c3VzZS5kZQAKCRDHmNx0G+wxnUZ5D/94kaE3L9ZTGp3zCOlZgiKXwkpvyYu4on2v
# 9lCMa39lEgFy3B0ASjPCdeHiJoa8sGDIBsmkpB20M+WsiP4T7TgfZbzPcEjKtsZe
# Xl5vn5LcupVsH0VBpLnkgYEqV24czLxPIQh3wXMXCY7df2nrHQpK8s+0P28TShiQ
# ZBLahqQWVvDXOesGTuH1yD0AIxDjQ4yIlTPaTiDTC/EEDh5uaeS48SpJLektNdoP
# ZCsC7VBghH9fqIf2c0D/j9ewKUW67h5XaMVyXULNs0rup18qhu+tjLHwD7HuT6fL
# 1UBnqqJykbiP4C9Ac7N7Uqb548MVl1s5Yv3pz82SU5vz09vxwLMzDfRcUmAZBcUH
# hgIiZzKEvRgQK86iWaUmVVwM5AcQwREVu+ohayxfI6tBieCHLEO5EkVQ1WEkuo3X
# v6NXxsokXJ1K2gs3SzooDlSAFu9MHTCFBFGcnmIlMEeBLrVpJTqPc0bMounuIJ52
# aPvdjpyAiYDAxTWK0Pl/UDcRSW90HeI+2ibQtYWn9ZHcTVLqRd8yb3dntrcMNzmO
# udcbVlIsqyCs6n/T/vuGshHOVXjJiuPj/1CFCsvyM9E5Fj7sNG7EV2vZxzt24+Ho
# mjROo1pwep/WftCj6b41pCA3RT9VYRMUKyZm3NOPsoiJCYU9DRnUOF4spYVuwxUf
# 4CpMfEU6kg==
# =WmGN
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 29 Oct 2026 01:45:17 PM CDT
# 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-20261029-pull-request' of https://gitlab.com/farosas/qemu:
migration: Postpone the outgoing preempt channel for preempt_pre_7_2
migration: Fix incoming channel race with multifd and preempt_pre_7_2
migration: Dump type of channel in set_incoming_channel tracepoint
migration: Split migration_channel_process_incoming()
migration: Fix socket listen backlog
migration: Add two more trace points for incoming channel mgmt
tests/migration-test: Add multifd+postcopy test for preempt recovery
migration: shorten dst snapshot load thread name
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This new dockerfile allows to build a distroless image containing only
qemu stripped release binaries, their lib dependencies, and installed
artifacts (roms, keymap, ...). There is no shell, no python, nothing
else. This is achieved thanks to a multi-stage build, where we add qemu
binaries, artifacts and libraries in a new scratch image. Image has
the minimal size possible.
This is based on Ubuntu, which has the advantage to have working
containers available down to 14.04. Debian old old stable have broken
apt sources for instance.
This unique dockerfile works for all qemu versions >= 3.1.0 (2018).
We could build down to v0.12.0, but it would require more tweaks in the
dockerfile, so we keep it simple instead.
To build the image, you need to provide a qemu and ubuntu version:
$ podman build -f release.Dockerfile --build-arg QEMU_VERSION=v11.1.0 --build-arg UBUNTU_VERSION=24.04 -t qemu/v11.1.0
To run it, as there is no shell, and no defined entrypoint, you need to
choose the binary you want explicitely:
$ podman run -it --rm qemu/v11.1.0 qemu-system-aarch64 --version
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/qemu-devel/20261029000853.15166-2-pierrick.bouvier@oss.qualcomm.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
The listener FD passed into qtest_socket_accept should be
considered owned by the caller, and thus is is inappropriate
and unusual to close it in the method.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
If the very first iteration of the loop breaks early due to the
dead QEMU process, 'ret' is never initialized. Furthermore the
listener socket is not closed on success and there is no error
message printed if timing out after all iterations are complete.
These problems were introduced by the recent refactoring to check
QEMU is alive.
CID 1688281
Reported-by: Markus Armbruster <armbru@redhat.com>
Fixes: c12ad53787 ("qtest: fail fast when QEMU terminates early")
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Currently we use a fixed irq_level[] array of 256 elements in
QTestState to implement capturing the IRQ level reported by the QEMU
under test so we can return it in qtest_get_irq(). This is smaller
than is actually used by some devices, and if a test tries to
intercept more IRQs than this and one is reported to libqtest then
we'll fail an assertion in qtest_rsp_args().
Switch to a GArray, which automatically resizes as required.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
pci, vhost, virtio, iommu, acpi: features, fixes
multiboot can again load 64 bit images
vdpa-dev now implements guest_notifier_mask/pending
pci bridge can now configure the negotiated bandwidth
tap can now auto-detect host mtu and expose to guest
amd iommu can now attach on non system bus
vhost-user spec now has its own mailing list
Fixes, cleanups all over the place.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCgAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmrjkJ0PHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpY1YH/0r+PhxgcRVVrroGkIxaTaPfOpTj1UkGPmND
# OcjcVCKPXBJF+rve1ZOE4HF8VvbEU1fD1tJ6w+Hto78tjmaVEDvE7gVbhX3YRHv9
# LubC75aTJBYixn/wcS/LUyLAf50+3DD3T+yy83obaJmxHwFyO3CJh2CIMSQxTbSe
# zGPA0noriSSMKEnfbTtikj6NHvFIhdnYipkUaWjGefEbdzXumBhcAF2C7eee9H5m
# 1Nz1Zvjx7BMoArviiZ6EWpGwWPBp0fKwTa7Idcv9K5v6YfWhgVp/gPploCCvulEA
# SMYRqQbbQ41801jR8kY9mV5w5ZFUeNENqplbOR3y6dYtr2w+H2k=
# =JvkM
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 29 Oct 2026 01:29:49 PM CDT
# 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: (77 commits)
virtio-net: add mtu-from-tap property for automatic MTU detection
net: add generic get_mtu NetClientInfo callback
net/tap: add tap_fd_get_mtu() to query host tap MTU
hw/virtio/virtio-mem: Fix error message on invalid NUMA node
intel_iommu_accel: Teardown FAULTQ resources in bottom half
intel_iommu_accel: Accept PRQ response for passthrough device
intel_iommu_accel: Add PRQ injection for passthrough device
backends/iommufd: Extend iommufd_backend_alloc_hwpt() with fault_id
backends/iommufd: Introduce iommufd_backend_alloc_faultq
intel_iommu_accel: Guard VTDAccelPASIDCacheEntry definition
amd_iommu: Allow IOMMU to attachment on non-system (pcie.0) bus
acpi-build: Create PCI topology using amd iommu root bus
amd_iommu: Introduce root bus
i386/kvm: Use x86_iommu_device_get() for per-device IOMMU lookup
intel_iommu: Add support for get_x86_iommu callback
amd_iommu: Add support for get_x86_iommu callback
x86-iommu: Introduce x86_iommu_device_get() for x86-iommu retrieval
amd_iommu: Assign ioapic_as only when interrupt remapping is supported.
vhost-user: add dedicated mailing list
virtio-snd: don't use virtio_snd_pcm_get_stream() in virtio_snd_post_load()
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
SHARED_OBJECT_ADD publishes a borrowed vhost_dev pointer in the global
UUID table. If an exporter goes away without sending SHARED_OBJECT_REMOVE,
vhost_user_backend_cleanup() frees dev->opaque but leaves these entries
behind. A later lookup from another backend can dereference the NULL
opaque pointer, or access a freed vhost_dev if its containing allocation
has also been released.
Remove all entries exported by the device after closing its backend
request channel and before freeing its state. Match both the resource
type and owner pointer so other exporters and dma-buf entries are kept.
Add unit coverage for multiple UUIDs per owner, unrelated resources,
repeated cleanup, UUID reuse, and an uninitialized or empty table.
Fixes: 1609476662 ("vhost-user: add shared_object msg")
Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
Reviewed-by: Albert Esteve <aesteve@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260910053012.1395885-1-oss.patchbox@gmail.com>
The TI XIO3130 PCIe switch is a vintage Gen1 device, so we add generic
PCIe upstream and downstream port devices that are Gen6.
In guests with pairs of passthrough PCIe devices (e.g, a GPU+NIC pair)
often need to place the devices behind a common (emulated) PCIe switch
so in-guest software (such as NCCL) can correctly determine that P2P
transactions between the devices is possible.
NCCL also needs to be able to determine the available PCIe
bandwidth. If such a guest sees the TI XIO3130 PCIe switch, then it
incorrectly calculates only 2.5 GT/s and x1 is available, but the real
hardware might be 32 GT/s and x16.
Instead of enhancing the existing switch and claiming it is more
capable than the real hardware we add additional generic PCIe upstream
and downstream port devices, which matches the existing generic PCIe
root port device.
The speed and width of the ports are configurable.
Signed-off-by: David Vrabel <david.vrabel@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20260928152431.310363-2-david.vrabel@nutanix.com>
A cpr-transfer target takes the vsock device over in post_load(). Make
sure the source gets it back when the target goes away afterwards.
Three cases, in the first two the target is made to fail the load by
lacking a device the source has:
- the target exits on the failure (default exit-on-error); the source
is stopped beforehand, so it stays paused until we 'cont' it once
the target is gone;
- the target stays alive (exit-on-error=false) and the source resumes
on its own (return-path capability);
- the target loads the state while the source is stopped, stays
paused and is quit normally; the source is resumed instead.
In all cases a host<->guest transfer must then work on the source.
The transfer helpers get a payload size parameter, since the plain
checks don't need the 512M of the stress cases, and the target start
code is moved into a helper shared with the existing cpr-transfer test.
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20261012-up-vsock-vhost-v5-v16-22-36c38bd15ffc@virtuozzo.com>
The qtests only cover the QEMU side of the vhost-vsock handoff. Add a
functional test which runs an actual host<->guest vsock transfer across
a series of CPR migrations, for both cpr-transfer and cpr-exec:
- the guest is booted on top of a qcow2 overlay shared by all the QEMU
instances it goes through;
- the host sends a 512M file of random data to the guest with socat,
where it's stored on disk, then gets it back the same way; a CPR
migration is performed every 0.2s while a transfer is in progress;
- with cpr-transfer each migration starts a fresh target QEMU and
retires the source; with cpr-exec the same process is re-exec'ed
over and over;
- the file received back must be identical to the one sent, and both
socat instances in the guest must exit cleanly.
The test needs KVM, socat and /dev/vhost-vsock on the host, and a kernel
supporting VHOST_RESET_OWNER for vhost-vsock. If any of those
requirements are missing the test is skipped.
Acked-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20261012-up-vsock-vhost-v5-v16-21-36c38bd15ffc@virtuozzo.com>
Run the existing cpr-transfer and cpr-exec tests with a vhost-vsock-pci
device attached. There's no guest involved which is driving the device,
so here we only test the QEMU side of the handoff, i.e. the vhost FD is
preserved, the device ownership is released on the source and re-acquired
on the target.
The tests need /dev/vhost-vsock on the host and a kernel supporting
VHOST_RESET_OWNER for vhost-vsock, they are skipped otherwise.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20261012-up-vsock-vhost-v5-v16-20-36c38bd15ffc@virtuozzo.com>
Snapshots are refused whenever a CPR migration mode is set. Add a test
which sets each of the CPR modes in turn and checks that 'savevm' and
'loadvm' fail with the corresponding error, then switches back to
'normal' mode and checks that the error is gone.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20261012-up-vsock-vhost-v5-v16-5-36c38bd15ffc@virtuozzo.com>
cpr_save_fd() now refuses to register an FD under a (name, id) key which
is already taken. Add a test which checks that 2nd registration fails
with an error while the 1st one is left intact, that different names
or ids don't clash, and that the key can be reused once deleted.
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-ID: <20261012-up-vsock-vhost-v5-v16-2-36c38bd15ffc@virtuozzo.com>
We have one for TLS, but we don't have the non-TLS version. Add it.
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Misc HW patches
- Don't complain about spaces before 'Fixes' tags in scripts/checkpatch.pl
- Various fixes (SD card, i.MX, SH4 UART, CAN, PCIe, ...)
- Widen QEMU_ARCH_* and arch_bitmask to 64-bit
- MAINTAINERS updates
# -----BEGIN PGP SIGNATURE-----
#
# iQJPBAABCAA5FiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmrhtHobFIAAAAAABAAO
# bWFudTIsMi41KzEuMTIsMCwzAAoJEOPjLCzercDejMsP/18i0YGbBmuB9Bfxvbms
# WIW6q5rZiS44hSVJHxlpvrhDX1gkBKxbE9AAJ+xMjuqDAw2pSawSK+v7AAigLbfu
# hzrGYw/PBvbAAUXsStJuTbCTtmftVhLyPd7YEJs6+2LWhqwwwN/jixHPinunOFdK
# nZmWBNyWIMYV0r46a450nEHGjEjQBWtZhBBFYcYQ6L8LW1StdjFMkHnviqRD0d3N
# pz++eLTpbDYb9Pyfr7dvFhUWtkBGTCYB6iuvFzJ8S8VWDbG2Gc00DTdP3QMXF8S7
# 2Fp9c8iwqi4tm17qT8+Do3Jv27Dt43wz5ZVinmS1oHacZl5xTP+BgI+f1FA4IWR1
# vCc2f0mmZbk+DjvuZKuCRcRaA7oKtnDEZvuoRb+2r+8YaMOJgszQJNfyBBOQFpfN
# kfmVy8MVzTB0Ps3TrSID7ZyzU1IYEa4YLnq/7L5iXlgjrnAimelEMcd9SjNdohHk
# oqzrvgTh0eimj5qpwg+pKE22y7iHtUhM/jA35IM3g6oERyM0yv7bKjGeHthoZv5V
# 1v5OjjD6DAItNTA+O/WqS27YhNICNE5mqwu2jzqw8ZcPA4OshbcgEJ9VaxASd3qI
# eZURqYx2qnoHR2M3weG0LZTJSlr2wIsWtVbF2ZN6odzKkYfoY2CzQMjBfTSD8+fa
# g4L11zpAhKYzoHpw+UE2fMAA
# =jdKk
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 28 Oct 2026 03:38:18 AM CDT
# gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [unknown]
# gpg: Signature notation: manu=2,2.5+1.12,0,3
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE
* tag 'hw-misc-20261027' of https://github.com/philmd/qemu: (58 commits)
qemu/arch-defs: increase width of QEMU_ARCH_* masks enums to be 64 bits
qemu/arch-defs: Use SYS_EMU_TARGET__MAX to define QEMU_ARCH_ALL
qemu/arch-defs: extract QEMU_ARCH_BIT for QEMU_ARCH_* enums
hw/display/xlnx_dp: Make assertions clearer
hw/misc/allwinner-h3-dramc: Avoid shift by negative amount
hw/net/cadence_gem: Check guest-provided queue numbers in screening registers
hw/net/can/flexcan: Fix FLEXCAN_CRCR_MBCRC definition
hw/pci-host/aspeed_pcie: Fix global MSI setting during class initialization
hw/char/sh_serial: fix break detection flag
hw/char/sh_serial: use rx_cnt for available FIFO space
hw/char/sh_serial: fix RDF flag clear on FIFO reset
MAINTAINERS: Update Gustavo's email address
hw/arm: remove pci-bridge/pci_expander_bridge.h from virt.c
hw/watchdog/wdt_imx2: Trace with QOM path
hw/net/lan9118_phy: Trace with QOM path
hw/net/imx_fec: Trace with QOM path where easily possible
hw/usb/imx-usb-phy: Avoid casting from void *
hw/misc/imx*_ccm: Avoid casting from void *
hw/intc/imx_avic: Avoid casting from void *
hw/char/imx_serial: Avoid casting from void *
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
The test currently exercises the Linux kernel and waits for the first
daemons to be started. At this point, basic hardware is initialized and
if the log message is reached, no driver ended up in an endless loop,
thus the system should be usable.
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Bin Meng <bin.meng@processmission.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-ID: <20261006083445.30362-12-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
The test currently exercises the Linux kernel and waits for the first
daemons to be started. At this point, basic hardware is initialized and
if the log message is reached, no driver ended up in an endless loop,
thus the system should be usable.
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Bin Meng <bin.meng@processmission.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-ID: <20261006083445.30362-9-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
The existing test_migration.py exercises all three migration transport
paths (TCP, UNIX, exec) but only against the mac99 machine type.
A regression in pseries-specific vmstate save/restore handlers would
not be caught by migrating a mac99 guest.
Switch the UNIX socket and exec (socat) migration tests from mac99 to
pseries so that these transport paths are exercised against the pseries
vmstate. The TCP test is left on mac99 since pseries TCP migration is
already covered by test_ppc64_linux_migration in test_pseries.py.
Signed-off-by: Aniket Sahu <asahu1x@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Link: https://lore.kernel.org/qemu-devel/20260921081010.31778-2-asahu1x@linux.ibm.com
Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
RISC-V PR for 11.2
* Add experimental Zvabd extension support
* Mask vsepc according to IALIGN
* Reset vCPU on VM reset via MP_STATE_INIT_RECEIVED
* Improve modeling of the Atlantis UART
* Fix IOMMU entry leak with ioatc-limit=0
* Fix integer handling issues in k230_gsdma and k230_decomp_gzip
* Reclaim invalidated IOATC entries for IOMMU
* Duct tape fix for QMP and RV profiles introspection
* Move RISC-V 'Z' CPU properties section to removed features
* Use TSO barriers instead of full barriers for Ztso
* Make mnstatus.MNPELP writable with Zicfilp
* Gate envcfg CBO fields on extensions
* Fix stale PMP state across reset
* Use 1ULL for a value we're going to shift by 63
* Remove unused IMISC macro
* Encode debug translation ranges in IOMMU
* Allow regular mstatus MPV/GVA writes again
* Fix uninitialised upper half in pmu_timer_trigger_irq
* Fix CPU state access on big-endian hosts
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEaukCtqfKh31tZZKWr3yVEwxTgBMFAmrgREAACgkQr3yVEwxT
# gBPBHxAAmIzV1LXJAxQTvU46+1j+4+mSvGr37byb1iU8yg+dJCNtYpFLHKdNjF0Q
# Fn+5uBL+QJC3rEA0Xbq6iF4EP2GO8t/Qm4rElLmWCw1xzraj7RAZrNJHWCebLp1j
# PLS53gINaQNIuE6DC91mwcuWanKo7q+tvOiwcShaVyUH771J1+1xVOkpcbkQaVrZ
# a54IfHIcs4TIsKrpmxCJPkEuBcL4VtaK5JwcqbeCQQ68v7L7qQpec75t9idr3o25
# Pn/BOsHwkXoJ1qxFuY61JGhUpFKUzZIqd6HKqwv4SENZY+O87J79R9X/HU9H17xh
# B75+h91ZFSZ2luNd2vZCCMx4vOXuCa+YE/m0ZmyyjJnGLA4LHRoeFRmUUu5Dxzkn
# kP+psnaeUfcI6W71d8Dcqov1g1O7MBdVrQD1hzK8IeAuYL438cLZpo9WT6TVX5cn
# /DRCyDR4f6uzf8Lnh0wItJGzSUlW2xadFLu357KsJ0+lpytpmYolOBxUGJXtJu2g
# BSfgQX9y9xhszCbFopngunu3guOlDoHZEJ9l29+tXicezvJxXw+FRyc4EU3onRtz
# zXGWa7sN4XGifzoDorbVcWGpOT2w2LI1himS4N9qXWNCZ4s115xENMVCMDRt6a9Z
# aZRyBib2nbrrgnO4JJbxBUe/MViBfQlc+AuqMmEwrwdP3LRBbZA=
# =qxZ6
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 27 Oct 2026 01:27:12 AM CDT
# 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-20261027' of https://github.com/alistair23/qemu: (29 commits)
target/riscv: Fix CPU state access on big-endian hosts
target/riscv: fix uninitialised upper half in pmu_timer_trigger_irq()
target/riscv/csr.c: allow regular mstatus MPV/GVA writes again
hw/riscv/riscv-iommu: encode debug translation ranges
include/hw/intc/riscv_imsic.h: remove unused macro
target/riscv: Use 1ULL for a value we're going to shift by 63
target/riscv: pmp: reset the derived PMP bounds and rule count
target/riscv: pmp: clear A and L on every implemented PMP entry at reset
target/riscv: gate envcfg CBO fields on extensions
target/riscv: make mnstatus.MNPELP writable with Zicfilp
target/riscv: Use TSO barriers instead of full barriers for Ztso
docs: Move RISC-V 'Z' CPU properties section to removed features
target/riscv/cpu.c: duct tape fix for QMP + RV profiles introspection
hw/riscv/riscv-iommu: reclaim invalidated IOATC entries
hw/riscv/riscv-iommu: serialize IOATC accesses
hw/dma: fix k230_gsdma integer handling issues
qtest: fix k230_decomp_gzip test integer handling issues
hw/misc: use hwaddr for the k230_decomp_gzip input address
hw/misc: fix calculating input address overflow in k230_decomp_gzip
hw/misc: fix calculating output address overflow in k230_decomp_gzip
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Download the firmware and run it on the corresponding DSP machine.
The images are third-party binaries, so the tests run only when untrusted
code is allowed.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Let the hexagon-sim-style machines their QDSP6 subsystem, and with it the
l2vic and QTimer.
The config table's subsystem base is updated to align with the chosen
address.
Reviewed-by: Anton Johansson <anjo@rev.ng>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
Add tests for: vallocframe, atomics, trap2, CFI/restricted branches, and
scalar fp instructions.
New instructions not yet supported by the toolchain are manually encoded
with .word directives.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Reviewed-by: Marco Liebel <marco.liebel@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
SSR.SS enables a single-step debug event after each packet executed in
user or guest mode.
Carry the state in a new SS_ACTIVE TB flag. When it is set, translate
one packet per TB and raise HEX_EVENT_DEBUG w/PC at the next packet (which
becomes ELR).
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
The architecture scrambles only the LR word of the {FP, LR} frame that
allocframe stores. With the idef parser enabled, fFRAME_SCRAMBLE built
the XOR key with FRAMEKEY in both halves of the 64-bit value, so the
stored FP was scrambled as well.
deallocframe is also parser-generated and applies the same incorrect
transform a second time, which masks the error. dealloc_return uses the
hand-written TCG implementation that correctly descrambles only LR, so
it leaves FP corrupt when returning from a frame allocated by the parser.
Add a regression test that sets a nonzero FRAMEKEY, allocates a frame,
and returns through dealloc_return to validate the restored FP.
Uncovered by testing some boot images using QuRT.
Reviewed-by: Marco Liebel <marco.liebel@oss.qualcomm.com>
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
The debug translation response aligns the translated physical address to
the effective translation range, but always reports S=0. For a request
inside a superpage, the response therefore identifies the wrong 4 KiB
physical page.
For effective ranges larger than 4 KiB, set S and encode the range size
using trailing ones in the PPN field. Keep the existing response format
for 4 KiB translations.
The RISC-V IOMMU specification permits reporting a 4 KiB translation even
when the page tables use superpages. Reporting the effective range is an
implementation choice; this change does not claim that S=1 is mandatory
for every translation through a superpage mapping.
Add debug-response tests for S-stage-only 4 KiB, 64 KiB NAPOT, and 2 MiB
translations, G-stage-only 2 MiB translations, and nested S4K/G2M,
S2M/G4K, and S2M/G2M mappings. Check requests inside large ranges and at
both ends. The mixed nested cases verify that the response uses the
smaller effective translation granularity.
Fixes: a7aa525b93 ("hw/riscv/riscv-iommu: add DBG support")
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3552
Signed-off-by: Zephyr Li <fritchleybohrer@gmail.com>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Message-ID: <20261022065647.67150-1-fritchleybohrer@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>