summary refs log tree commit diff stats
path: root/tests/functional/qemu_test/linuxkernel.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-04-15Update version for v10.0.0-rc4 releaseStefan Hajnoczi1-1/+1
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-04-15Revert "virtio-net: Copy received header to buffer"Antoine Damhet1-47/+40
This reverts commit 7987d2be5a8bc3a502f89ba8cf3ac3e09f64d1ce. The goal was to remove the need to patch the (const) input buffer with a recomputed UDP checksum by copying headers to a RW region and inject the checksum there. The patch computed the checksum only from the header fields (missing the rest of the payload) producing an invalid one and making guests fail to acquire a DHCP lease. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2727 Cc: qemu-stable@nongnu.org Signed-off-by: Antoine Damhet <adamhet@scaleway.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20250408145345.142947-1-adamhet@scaleway.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-04-14tests/functional/test_aarch64_replay: reenable on macosPierrick Bouvier1-2/+0
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250410225550.46807-3-pierrick.bouvier@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-04-14system/main: transfer replay mutex ownership from main thread to main loop ↵Pierrick Bouvier1-0/+4
thread On MacOS, UI event loop has to be ran in the main thread of a process. Because of that restriction, on this platform, qemu main event loop is ran on another thread [1]. This breaks record/replay feature, which expects thread running qemu_init to initialize hold this lock, breaking associated functional tests on MacOS. Thus, as a generalization, and similar to how BQL is handled, we release it after init, and reacquire the lock before entering main event loop, avoiding a special case if a separate thread is used. Tested on MacOS with: $ meson test -C build --setup thorough --print-errorlogs \ func-x86_64-x86_64_replay func-arm-arm_replay func-aarch64-aarch64_replay $ ./build/qemu-system-x86_64 -nographic -icount shift=auto,rr=record,rrfile=replay.log $ ./build/qemu-system-x86_64 -nographic -icount shift=auto,rr=replay,rrfile=replay.log [1] https://gitlab.com/qemu-project/qemu/-/commit/f5ab12caba4f1656479c1feb5248beac1c833243 Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2907 Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250410225550.46807-2-pierrick.bouvier@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-04-14docs: Document removal of 64-bit on 32-bit emulationRichard Henderson1-0/+9
With acce728cbc6c we disallowed configuring 64-bit guests on 32-bit hosts, but forgot to document that in removed-features. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-04-13Fix objdump output parser in "nsis.py"Arthur Sengileyev1-1/+1
In msys2 distribution objdump from gcc is using single tab character prefix, but objdump from clang is using 4 white space characters instead. The script will not identify any dll dependencies for a QEMU build generated with clang. This in turn will fail the build, because there will be no files inside dlldir and no setup file will be created. Instead of checking for whitespace in prefix use lstrip to accommodate for differences in outputs. Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-04-13docs: Fix some typos (found by codespell and typos)Stefan Weil via5-10/+10
Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-04-09tests/tcg/plugins: add plugin to test reset and uninstallPierrick Bouvier2-1/+74
We perform a plugin reset, uninstall, and make sure we went through those steps. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250404032027.430575-3-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2025-04-09plugins/loader: fix deadlock when resetting/uninstalling a pluginPierrick Bouvier1-1/+1
Reported and fixed by Dmitry Kurakin. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2901 Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250404032027.430575-2-pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-09tests/tcg: fix semihosting SYS_EXIT for aarch64 in boot.SAlex Bennée1-3/+2
We don't expect to hit exceptions in our testing so currently all the vectors report an un-expected exception and then attempt to exit. However for aarch64 we should always use the extended information block as we do in _exit. Rather than duplicate the code on the error handler just branch to the _exit handler with a failing status code. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250404115641.258048-1-alex.bennee@linaro.org>
2025-04-09Update version for v10.0.0-rc3 releaseStefan Hajnoczi1-1/+1
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-04-08scripts/checkpatch: Fix typo in SPDX-License-Identifier keywordZhao Liu1-2/+2
Fix the typo in the error message to help `grep` the example: ERROR: New file '***' requires 'SPDX-License-Identifer' Fixes: fa4d79c64dae ("scripts: mandate that new files have SPDX-License-Identifier") Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250408162702.2350565-1-zhao1.liu@intel.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-08hw/nvme: fix attachment of private namespacesKlaus Jensen4-9/+14
Fix regression when attaching private namespaces that gets attached to the wrong controller. Keep track of the original controller "owner" of private namespaces, and only attach if this matches on controller enablement. Fixes: 6ccca4b6bb9f ("hw/nvme: rework csi handling") Reported-by: Alan Adamson <alan.adamson@oracle.com> Suggested-by: Alan Adamson <alan.adamson@oracle.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Tested-by: Alan Adamson <alan.adamson@oracle.com> Reviewed-by: Alan Adamson <alan.adamson@oracle.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Message-ID: <20250408-fix-private-ns-v1-1-28e169b6b60b@samsung.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-08hw/arm/imx8mp-evk: Temporarily remove unimplemented imx8mp-fspi node from ↵Guenter Roeck1-1/+16
devicetree The nxp,imx8mp-fspi node triggers a warning backtrace. Remove it from the devicetree file. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Inspired-by: commit bf1da4b308 ("hw/arm/raspi4b: Temporarily disable unimplemented rpi4b devices") Signed-off-by: Bernhard Beschow <shentey@gmail.com> [Bernhard: split patch, adapt commit message] Message-ID: <20250405214900.7114-4-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-08hw/arm/imx8mp-evk: Remove unimplemented cpu-idle-states properties from ↵Guenter Roeck2-10/+16
devicetree The cpu-idle-states property causes a hard boot hang. Rather than documenting the workaround, perform the removal from the devicetree automatically. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Bernhard Beschow <shentey@gmail.com> [Bernhard: split patch, update documentation, adapt commit message] Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-ID: <20250405214900.7114-3-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-08hw/ufs: Fix incorrect comment for segment_size and allocation_unit_sizeKeoseong Park1-2/+2
The comments for segment_size and allocation_unit_size incorrectly described them as 4KB. According to the UFS specification, segment_size is expressed in units of 512 bytes. Given segment_size = 0x2000 (8192), the actual size is 4MB. Similarly, allocation_unit_size = 1 means 1 segment = 4MB. This patch updates the comments to reflect the correct size. Signed-off-by: Keoseong Park <keosung.park@samsung.com> Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com> Message-ID: <20250403092140epcms2p355a7f039871b3e5b409754ef450b9158@epcms2p3> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-08docs/arm: Add apple HVF host for supported guest CPU typeZhang Chen1-2/+2
In my test, latest QEMU already support Apple HVF for -cpu host and max. From guest VM lscpu: Architecture: aarch64 CPU op-mode(s): 64-bit Byte Order: Little Endian CPU(s): 11 On-line CPU(s) list: 0-10 Vendor ID: Apple Model name: - Model: 0 Thread(s) per core: 1 Core(s) per socket: 11 Socket(s): 1 Stepping: 0x0 BogoMIPS: 48.00 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asim dfhm dit uscat ilrcpc flagm ssbs sb paca pacg dcpodp flagm2 frint Signed-off-by: Zhang Chen <zhangckid@gmail.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250401083102.72845-1-zhangckid@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-08hw/core/machine: Fix -machine dumpdtb=file.dtbJoel Stanley1-6/+6
In commit 8fd2518ef2f8 ("hw: Centralize handling of -machine dumpdtb option") the call to dump was moved with respect to the init of the machine. This resulted in the device tree missing parts of the machine description, depending on how they construct their device tree. The arm virt machine is missing some PSCI nodes, while the riscv one is missing most of its content. Move the dump to after the notifiers have been run, allowing virt_machine_done to be called and the device tree to be fully populated. Fixes: 8fd2518ef2f8 ("hw: Centralize handling of -machine dumpdtb option") Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250401041509.719153-1-joel@jms.id.au> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-08smbios: Fix buffer overrun when using path= optionDaan De Meyer1-0/+3
We have to make sure the array of bytes read from the path= file is null-terminated, otherwise we run into a buffer overrun later on. Fixes: bb99f4772f54017490e3356ecbb3df25c5d4537f ("hw/smbios: support loading OEM strings values from a file") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2879 Signed-off-by: Daan De Meyer <daan.j.demeyer@gmail.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Valentin David <valentin.david@canonical.com> Message-ID: <20250323213622.2581013-1-daan.j.demeyer@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2025-04-08test-bdrv-drain: Fix data racesVitalii Mordan3-13/+28
This patch addresses potential data races involving access to Job fields in the test-bdrv-drain test. Fixes: 7253220de4 ("test-bdrv-drain: Test drain vs. block jobs") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2900 Signed-off-by: Vitalii Mordan <mordan@ispras.ru> Message-ID: <20250402102119.3345626-1-mordan@ispras.ru> [kwolf: Fixed up coding style and one missing atomic access] Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2025-04-08scsi-disk: Apply error policy for host_status errors againKevin Wolf1-14/+25
Originally, all failed SG_IO requests called scsi_handle_rw_error() to apply the configured error policy. However, commit f3126d65, which was supposed to be a mere refactoring for scsi-disk.c, broke this and accidentally completed the SCSI request without considering the error policy any more if the error was signalled in the host_status field. Apart from the commit message not describing the change as intended, errors indicated in host_status are also obviously backend errors and not something the guest must deal with independently of the error policy. This behaviour means that some recoverable errors (such as a path error in multipath configurations) were reported to the guest anyway, which might not expect it and might consider its disk broken. Make sure that we apply the error policy again for host_status errors, too. This addresses an existing FIXME comment and allows us to remove some comments warning that callbacks weren't always called. With this fix, they are called in all cases again. The return value passed to the request callback doesn't have more free values that could be used to indicate host_status errors as well as SAM status codes and negative errno. Store the value in the host_status field of the SCSIRequest instead and use -ENODEV as the return value (if a path hasn't been reachable for a while, blk_aio_ioctl() will return -ENODEV instead of just setting host_status, so just reuse it here - it's not necessarily entirely accurate, but it's as good as any errno). Cc: qemu-stable@nongnu.org Fixes: f3126d65b393 ('scsi: move host_status handling into SCSI drivers') Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20250407155949.44736-1-kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Hanna Czenczek <hreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2025-04-08target/ppc: Fix SPRC/SPRD SPRs for P9/10Nicholas Piggin1-11/+12
Commit 60d30cff847 ("target/ppc: Move SPR indirect registers into PnvCore") was mismerged and moved the SPRs to power8-only, instead of power9/10-only. Fixes: 60d30cff847 ("target/ppc: Move SPR indirect registers into PnvCore") Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Cc: qemu-stable@nongnu.org Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
2025-04-08target/ppc: Big-core scratch register fixNicholas Piggin1-1/+8
The per-core SCRATCH0-7 registers are shared between big cores, which was missed in the big-core implementation. It is difficult to model well with the big-core == 2xPnvCore scheme we moved to, this fix uses the even PnvCore to store the scrach data. Also remove a stray log message that came in with the same patch that introduced patch. Fixes: c26504afd5f5c ("ppc/pnv: Add a big-core mode that joins two regular cores") Cc: qemu-stable@nongnu.org Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
2025-04-08qcow2: Don't crash qemu-img info with missing crypto headerKevin Wolf3-2/+109
qcow2_refresh_limits() assumes that s->crypto is non-NULL whenever bs->encrypted is true. This is actually not the case: qcow2_do_open() allows to open an image with a missing crypto header for BDRV_O_NO_IO, and then bs->encrypted is true, but s->crypto is still NULL. It doesn't make sense to open an invalid image, so remove the exception for BDRV_O_NO_IO. This catches the problem early and any code that makes the same assumption is safe now. At the same time, in the name of defensive programming, we shouldn't make the assumption in the first place. Let qcow2_refresh_limits() check s->crypto rather than bs->encrypted. If s->crypto is NULL, it also can't make any requirement on request alignment. Finally, start a qcow2-encryption test case that only serves as a regression test for this crash for now. Reported-by: Leonid Reviakin <L.reviakin@fobos-nt.ru> Reported-by: Denis Rastyogin <gerben@altlinux.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20250318201143.70657-1-kwolf@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2025-04-08qemu-img: fix division by zero in bench_cb() for zero-sized imagesDenis Rastyogin1-1/+5
This error was discovered by fuzzing qemu-img. This commit fixes a division by zero error in the bench_cb() function that occurs when using the bench command with a zero-sized image. The issue arises because b->image_size can be zero, leading to a division by zero in the modulo operation (b->offset %= b->image_size). This patch adds a check for b->image_size == 0 and resets b->offset to 0 in such cases, preventing the error. Signed-off-by: Denis Rastyogin <gerben@altlinux.org> Message-ID: <20250318101933.255617-1-gerben@altlinux.org> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2025-04-08qga/qapi-schema: Add a proper introductionMarkus Armbruster1-3/+17
Contents adapted from qapi/qapi-schema.json. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-12-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08storage-daemon/qapi/qapi-schema: Add a proper introductionMarkus Armbruster1-3/+19
Contents adapted from qapi/qapi-schema.json. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-11-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08qapi/qapi-schema: Address the introduction's bit rotMarkus Armbruster1-20/+7
Cut the crap that stopped making sense years ago. Adjust the remainder. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-10-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08qapi/qapi-schema: Update introduction for example notationMarkus Armbruster1-3/+3
The introduction explains example notation. The series merged in merge commit e6485190f77e (in 9.1) improved how they look in generated docs, but neglected to update the introduction accordingly. Do that now. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-9-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08docs/sphinx/qmp_lexer: Highlight elisions like comments, not promptsMarkus Armbruster1-1/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-8-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08docs/sphinx/qmp_lexer: Generalize elision syntaxMarkus Armbruster5-6/+8
Accept "... lorem ipsum ..." in addition to "...". Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-7-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08docs/devel/qapi-code-gen: Improve the part on qmp-example directiveMarkus Armbruster1-9/+14
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-6-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08docs/interop: Sanitize QMP reference manuals TOCMarkus Armbruster2-2/+2
The "QEMU QMP Reference Manual" and the "QEMU Storage Daemon QMP Reference Manual" start with a table of contents that looks like this: Contents * Title of the manual * Title of first first-level section * Title of its first second-level section * Title of its second second-level section ... * Title of second first-level section ... The first level is useless. Drop it. While there, delete the option that limits the TOC to depth 3. Its actual depth was 3 before the patch, and is now 2. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-5-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08docs/interop: Delete "QEMU Guest Agent Protocol Reference" TOCMarkus Armbruster1-3/+0
The "QEMU Guest Agent Protocol Reference" starts with the following table of contents: Contents * QEMU Guest Agent Protocol Reference * QEMU guest agent protocol commands and structs This is useless. Delete the entire TOC. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-4-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08qapi/rocker: Tidy up query-rocker-of-dpa-flows exampleMarkus Armbruster1-1/+1
The command can return any number of RockerOfDpaFlow objects. The example shows it returning exactly two, with the second object's members elided. Tweak it so it elides elements after the first instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-3-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Commit message typo fixed]
2025-04-08docs/devel/qapi-code-gen: Tidy up whitespaceMarkus Armbruster1-12/+14
Consistently use two spaces to separate sentences. Put "::" on a line of its own when it's preceded by whitespace. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20250404121413.1743790-2-armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2025-04-08hw/loongarch/virt: Replace destination error with error_abortBibo Mao1-32/+7
In function virt_cpu_plug() and virt_cpu_unplug(), the error is impossile. Destination error is not propagated and replaced with error_abort. With this, the logic is simple. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Acked-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20250324030145.3037408-3-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
2025-04-08hw/loongarch/virt: Fix cpuslot::cpu set at last in virt_cpu_plug()Bibo Mao1-2/+2
In function virt_cpu_plug(), Object cpuslot::cpu is set at last only when there is no any error, otherwise it is problematic that cpuslot::cpu is set in advance however it returns because of error. Fixes: ab9935d2991e (hw/loongarch/virt: Implement cpu plug interface) Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20250324030145.3037408-2-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
2025-04-07docs: deprecate RISC-V default machine optionDaniel Henrique Barboza1-0/+17
Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and made it default for qemu-system-riscv32/64. It was the first RISC-V machine added in QEMU so setting it as default was sensible. Today we have 7 riscv64 and 6 riscv32 machines and having 'spike' as default machine is not intuitive. For example, [1] is a bug that was opened with the 'virt' board in mind, but given that the user didn't pass a '-machine' option, the user was using 'spike' without knowing. Being explicit in the command line is desirable when we have a handful of boards available, so deprecate the default machine setting from RISC-V. [1] https://gitlab.com/qemu-project/qemu/-/issues/2467 Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250404122858.241598-1-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2025-04-03hw/arm: Do not build VMapple machine by defaultPhilippe Mathieu-Daudé1-0/+1
Unfortunately as of v10.0.0-rc2 the VMapple machine is unusable: $ qemu-system-aarch64 -M vmapple [...] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PGIOSurfaceHostDeviceDescriptor setMapMemory:]: unrecognized selector sent to instance 0x600001ede820' *** First throw call stack: ( 0 CoreFoundation 0x000000019c759df0 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000019c21eb60 objc_exception_throw + 88 2 CoreFoundation 0x000000019c816ce0 -[NSObject(NSObject) __retain_OA] + 0 3 CoreFoundation 0x000000019c6c7efc ___forwarding___ + 1500 4 CoreFoundation 0x000000019c6c7860 _CF_forwarding_prep_0 + 96 5 qemu-system-aarch64 0x000000010486dbd0 apple_gfx_mmio_realize + 200 6 qemu-system-aarch64 0x0000000104e6ab5c device_set_realized + 352 7 qemu-system-aarch64 0x0000000104e7250c property_set_bool + 100 8 qemu-system-aarch64 0x0000000104e7023c object_property_set + 136 9 qemu-system-aarch64 0x0000000104e74870 object_property_set_qobject + 60 10 qemu-system-aarch64 0x0000000104e70748 object_property_set_bool + 60 11 qemu-system-aarch64 0x0000000104e69bd8 qdev_realize_and_unref + 20 12 qemu-system-aarch64 0x0000000104e258e0 mach_vmapple_init + 1728 13 qemu-system-aarch64 0x000000010481b0ac machine_run_board_init + 1892 14 qemu-system-aarch64 0x0000000104a4def8 qmp_x_exit_preconfig + 260 15 qemu-system-aarch64 0x0000000104a51ba8 qemu_init + 14460 16 qemu-system-aarch64 0x0000000104f7cef8 main + 36 17 dyld 0x000000019c25eb4c start + 6000 ) libc++abi: terminating due to uncaught exception of type NSException Abort trap: 6 Disable the machine so it isn't built by default. This is tracked as https://gitlab.com/qemu-project/qemu/-/issues/2913 Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250403203241.46692-6-philmd@linaro.org>
2025-04-03tests/qtest: Skip Aarch64 VMapple machinePhilippe Mathieu-Daudé1-0/+1
First, the VMapple machine only works with the ARM 'host' CPU type, which isn't accepted for QTest: $ qemu-system-aarch64 -M vmapple -accel qtest qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF Second, the QTest framework expects machines to be createable without specifying optional arguments, however the VMapple machine requires few of them: $ qemu-system-aarch64 -M vmapple -accel qtest qemu-system-aarch64: No firmware specified $ qemu-system-aarch64 -M vmapple -accel qtest -bios /dev/null qemu-system-aarch64: No AUX device. Please specify one as pflash drive. Restrict this machine with QTest so we can at least run check-qtest, otherwise we get: $ make check-qtest-aarch64 qemu-system-aarch64: The 'host' CPU type can only be used with KVM or HVF Broken pipe ../tests/qtest/libqtest.c:199: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0) ... 7/26 qemu:qtest+qtest-aarch64 / qtest-aarch64/test-hmp ERROR 24.71s killed by signal 6 SIGABRT 2/26 qemu:qtest+qtest-aarch64 / qtest-aarch64/qom-test ERROR 71.23s killed by signal 6 SIGABRT Suggested-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250403203241.46692-5-philmd@linaro.org>
2025-04-03tests/functional: Skip aarch64_replay test on macOSPhilippe Mathieu-Daudé1-1/+3
As of v10.0.0-rc2 this test is still failing on macos: $ make check-functional-aarch64 V=1 ... ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed: (replay_mutex_locked()) Bail out! ERROR:../../replay/replay-internal.c:235:replay_mutex_unlock: assertion failed: (replay_mutex_locked()) This is tracked as https://gitlab.com/qemu-project/qemu/-/issues/2907 Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250403203241.46692-4-philmd@linaro.org>
2025-04-03tests/functional: Add a decorator for skipping tests on particular OSPhilippe Mathieu-Daudé2-2/+15
Since tests might be failing on some operating systems, introduce the skipIfOperatingSystem() decorator. Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250403203241.46692-3-philmd@linaro.org>
2025-04-03tests/functional/test_aarch64_rme_virt: fix sporadic failurePierrick Bouvier1-1/+3
This test was randomly failing on our CI, and on dev machines, especially with QEMU debug builds. >From the information collected, it's related to an implementation choice in edk2 QEMU virt support. The workaround is to disable KASLR, to avoid accessing protected memory. Note: this is *not* needed for the similar test_aarch64_rme_sbsaref. More information is available on the associated GitLab issue. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2823 Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250328183816.2687925-1-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250403203241.46692-2-philmd@linaro.org>
2025-04-03tcg: Allocate TEMP_VAL_MEM frame in temp_load()Philippe Mathieu-Daudé1-0/+3
Be sure to allocate the temp frame if it wasn't. In the resolved issues, incomplete dead code elimination left a load at the top of an unreachable loop. We simply need to allocate the stack slot to avoid crashing. Fixes: c896fe29d6c ("TCG code generator") Reported-by: Michael Tokarev <mjt@tls.msk.ru> Reported-by: Helge Konetzka <hk@zapateado.de> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2891 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2899 Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250401144332.41615-1-philmd@linaro.org>
2025-04-03Revert "iotests: Stop NBD server in test 162 before starting the next one"Thomas Huth1-1/+0
This reverts commit e2668ba1ed44ad56f2f1653ff5f53b277d534fac. This commit made test 162 fail occasionally with: 162 fail [13:06:40] [13:06:40] 0.2s (last: 0.2s) output mismatch --- tests/qemu-iotests/162.out +++ tests/qemu-iotests/scratch/qcow2-file-162/162.out.bad @@ -3,6 +3,7 @@ === NBD === qemu-img: Could not open 'json:{"driver": "nbd", "host": -1}': address resolution failed for -1:10809: Name or service not known image: nbd://localhost:PORT +./common.rc: line 371: kill: (891116) - No such process image: nbd+unix://?socket=42 The nbd server should normally terminate automatically, so trying to kill it here now seems to cause a race that will cause a test failure when the server terminated before the kill command has been executed. The "Stop NBD server" patch has originally been written to solve another problem with a hanging nbd server, but since that problem has been properly solved by commit 3e1683485656, we now don't need the "_stop_nbd_server" here anymore. Reviewed-by: Hanna Czenczek <hreitz@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250326143533.932899-1-thuth@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2025-04-02hw/i386/amd_iommu: Assign pci-id 0x1419 for the AMD IOMMU deviceSuravee Suthikulpanit1-0/+1
Currently, the QEMU-emulated AMD IOMMU device use PCI vendor id 0x1022 (AMD) with device id zero (undefined). Eventhough this does not cause any functional issue for AMD IOMMU driver since it normally uses information in the ACPI IVRS table to probe and initialize the device per recommendation in the AMD IOMMU specification, the device id zero causes the Windows Device Manager utility to show the device as an unknown device. Since Windows only recognizes AMD IOMMU device with device id 0x1419 as listed in the machine.inf file, modify the QEMU AMD IOMMU model to use the id 0x1419 to avoid the issue. This advertise the IOMMU as the AMD IOMMU device for Family 15h (Models 10h-1fh). Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Message-Id: <20250325021140.5676-1-suravee.suthikulpanit@amd.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-04-02virtio-net: Fix num_buffers for version 1Akihiko Odaki1-0/+2
The specification says the device MUST set num_buffers to 1 if VIRTIO_NET_F_MRG_RXBUF has not been negotiated. Fixes: df91055db5c9 ("virtio-net: enable virtio 1.0") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-Id: <20250108-buffers-v1-1-a0c85ff31aeb@daynix.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2025-04-01Update version for v10.0.0-rc2 releaseStefan Hajnoczi1-1/+1
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2025-04-01hw/misc/aspeed_scu: Correct minimum access size for AST2500 / AST2600Joel Stanley1-2/+2
Guest code was performing a byte load to the SCU MMIO region, leading to the guest code crashing (it should be using proper accessors, but that is not Qemu's bug). Hardware and the documentation[1] both agree that byte loads are okay, so change all of the aspeed SCU devices to accept a minimum access size of 1. [1] See the 'ARM Address Space Mapping' table in the ASPEED docs. This is section 6.1 in the ast2400 and ast2700, and 7.1 in the ast2500 and ast2600 datasheets. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2636 Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Troy Lee <leetroy@gmail.com> Message-ID: <20241118021820.4928-1-joel@jms.id.au> [PMD: Rebased, only including SCU changes] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Andrew Jeffery <andrew@codeconstruct.com.au> Link: https://lore.kernel.org/qemu-devel/20250331230444.88295-3-philmd@linaro.org Signed-off-by: Cédric Le Goater <clg@redhat.com>