Official QEMU mirror. Please see https://www.qemu.org/contribute/ for how to submit changes to QEMU. Pull Requests are disabled. Please only use release tarballs from the QEMU website.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
github: fix config mistake preventing repo lockdown commenting The previous commit updated the repo lockdown config to the new format: commit 9b89cdb2a5064a87b8a7172fa1748d46aa37a9df Author: Alex Bennée <alex.bennee@linaro.org> Date: Mon Oct 4 16:43:08 2021 +0100 .github: move repo lockdown to the v2 configuration Unfortunately the config key names used were wrong, resulting in the repo lockdown throwing warnings: Unexpected input(s) 'pull-comment', 'lock-pull', 'close-pull', valid inputs are ['github-token', 'exclude-issue-created-before', 'exclude-issue-labels', 'issue-labels', 'issue-comment', 'skip-closed-issue-comment', 'close-issue', 'lock-issue', 'issue-lock-reason', 'exclude-pr-created-before', 'exclude-pr-labels', 'pr-labels', 'pr-comment', 'skip-closed-pr-comment', 'close-pr', 'lock-pr', 'pr-lock-reason', 'process-only', 'log-output'] It still locked down the pull requests, due to its default config, but didn't leave the friendly message explaining why. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | 4 年前 | |
gitlab: disable provenance attestations to work around CI bug QEMU's CI pipeline involves building container images that will be used to run builds and tests. A recent Docker change triggered the following error: $ docker push "$TAG" ... error from registry: blob unknown to registry - sha256:4401f6f779caf8841cafd5f483e642fcac56a23a4e4a59523231e101c890dad9 https://gitlab.com/qemu-project/qemu/-/jobs/15701875927#L2372 This happens because Docker now pushes out-of-order and the GitLab Container Registry rejects due to an unknown reference: https://forum.gitlab.com/t/started-yesterday-docker-push-error-from-registry-blob-unknown-to-registry/134733/5 It is unclear at this point whether GitLab will modify the behavior of Container Registry or whether Docker will ship a fix. The current workaround is to disable the provenance attestation that is involved in this issue. QEMU's CI pipeline container images are used internally for testing and are not widely distributed. Provenance attestation can be disabled as there are no external consumers of these images. Expect to revert this commit in the future when GitLab or Docker have released their own fixes. Cc: Alex Bennée <alex.bennee@linaro.org> Cc: Daniel P. Berrangé <berrange@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20260804165414.480435-1-stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 1 个月前 | |
gitlab: update bug template for sec issues & tool assistance Warn that a security issue must have the "confidential" flag set and that any findings from automated tools must be validated before submission. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20260619123632.1276476-1-berrange@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Message-ID: <20260619155657.944220-8-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> | 3 个月前 | |
accel/tcg: Make PageFlagsNodes' start and last immutable page_check_range() may race with pageflags_set_clear() as follows: T1 T2 ------------------------------------- -------------------------------- p = pageflags_find(start, last); interval_tree_remove(&p->itree, ...); p->itree.start = last + 1; if (start < p->itree.start) { ret = false; interval_tree_insert(&p->itree, ...); leading to errors like fail indirect write 0x72f0a659aff0 (Bad address) in vma-pthread test. I am able to reliably reproduce this on a machine with 32 SMT threads as follows in about 25 seconds: jobs=32; \ seq "$jobs" | \ time -p parallel \ --jobs="$jobs" \ --halt=now,done=1 \ --ungroup \ ' _={}; while ./qemu-s390x tests/tcg/s390x-linux-user/vma-pthread; do printf .; done ' Also wasmtime project reported a similar failure pattern in their CI [1] with a similar reproducer [2]. There are other races like this. In general, region bounds mutating underneath the reader are very hard to reason about. So fix this by preventing mutations and creating copies instead. Use RCU guards in readers to avoid uses-after-frees. Now, when the reader finds a node, it may fearlessly access its fields and be certain that at some point in time the respective region had the respective bounds and permissions. The downside is slightly more expensive mprotect(), but complexity reduction is worth it. Lockless field accesses should probably be wrapped in qatomic_read(), but this is a pre-existing issue, so do not change it here. [1] https://github.com/bytecodealliance/wasmtime/issues/10000 [2] https://gist.github.com/alexcrichton/f14f23a892ffb9df2522754572d51b1c Cc: qemu-stable@nongnu.org Reported-by: Alex Crichton <alex@alexcrichton.com> Reported-by: Ulrich Weigand <ulrich.weigand@de.ibm.com> Fixes: 67ff2186b0a4 ("accel/tcg: Use interval tree for user-only page tracking") Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20260706165445.57418-2-iii@linux.ibm.com> | 2 个月前 | |
audio: Use unsigned PCM bias Clang warns for the uint32_t clip_ instantiations because HALF cannot be represented with mixeng_real: [1115/2559] Compiling C object libqemuaudio.a.p/audio_mixeng.c.o In file included from ../../qemu/audio/mixeng.c:147: ../../qemu/audio/mixeng_template.h:68:70: warning: implicit conversion from 'unsigned int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion] 68 | return ENDIAN_CONVERT((IN_T)((v * ((mixeng_real)IN_MAX / 2.f)) + HALF)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ ../../qemu/audio/mixeng_template.h:31:22: note: expanded from macro 'HALF' 31 | #define HALF (IN_MAX >> 1) | ^ ../../qemu/audio/mixeng.c:146:28: note: expanded from macro 'ENDIAN_CONVERT' 146 | #define ENDIAN_CONVERT(v) (v) | ^ In file included from ../../qemu/audio/mixeng.c:152: ../../qemu/audio/mixeng_template.h:68:70: warning: implicit conversion from 'unsigned int' to 'float' changes value from 2147483647 to 2147483648 [-Wimplicit-const-int-float-conversion] 68 | return ENDIAN_CONVERT((IN_T)((v * ((mixeng_real)IN_MAX / 2.f)) + HALF)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ ../../qemu/audio/mixeng_template.h:31:22: note: expanded from macro 'HALF' 31 | #define HALF (IN_MAX >> 1) | ^ ../../qemu/audio/mixeng.c:151:36: note: expanded from macro 'ENDIAN_CONVERT' 151 | #define ENDIAN_CONVERT(v) bswap32 (v) | ~~~~~~~~~^~ /Users/person/v/qemu/include/qemu/bswap.h:10:39: note: expanded from macro 'bswap32' 10 | #define bswap32(_x) __builtin_bswap32(_x) | ^~ 2 warnings generated. HALF is not the right value here anyway. IN_MAX is odd, so the integer sample range has two middle codes. Unsigned PCM normally uses the upper middle code as the "bias": 0x80, 0x8000, or 0x80000000. HALF is instead defined as the lower middle code: 0x7f, 0x7fff, or 0x7fffffff. Replace HALF with BIAS, defined as the upper middle code. This fixes the warnings, since the value can be exactly represented with mixeng_real. Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260423-audio-v1-3-e1d6b65c76f9@rsg.ci.i.u-tokyo.ac.jp> | 4 个月前 | |
qom: drop user_creatable_add_type method This can be replaced by object_new_with_props_from_qdict, which does functionally the same job, but the caller does not own the returned reference, instead the parent object owns it. In one case we can use object_new_with_props_from_qdict_owned instead since the object is not intended to have any parent. Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | 4 个月前 | |
backends/rng: cap request size to avoid oversized allocation rng_backend_request_entropy() uses the requested size to allocate a buffer with g_malloc(). With virtio-rng, this size comes from guest-supplied descriptor lengths. A malicious guest can set a very large descriptor length, causing QEMU to attempt a multi-gigabyte allocation and abort. Cap the allocation to 64 KiB. The virtio-rng queue size is hardcoded to 8 entries, the EGD backend protocol limits requests to 255 bytes, the Linux kernel hwrng framework requests at most SMP_CACHE_BYTES per call (64 bytes on x86_64), and the Windows viorng driver uses a 4 KiB buffer. The worst legitimate case is 8 x 4 KiB = 32 KiB, so 64 KiB is well above any legitimate use. Fixes: 14417039653d ("virtio-rng: use virtqueue_get_avail_bytes, fix migration") Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3983 Reported-by: dong ling <dongling226655@outlook.com> Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20260715141300.2295392-1-lvivier@redhat.com> | 1 个月前 | |
dirty-bitmap: fix integer overflow in serialization coverage The chunk size is an int and is shifted left by 3 before the result is widened, so a chunk size of 1 << 28 or above overflows. parallels passes s->cluster_size, which parallels_open() lets reach 2 GiB. With a bitmap needing two L1 entries the bogus limit makes the "bm_size - offset" in parallels_load_bitmap_data() underflow; both wrong values slip past the assertions in serialization_chunk() and the resulting index lands outside the hbitmap, so a 128 KiB image memsets unrelated memory through hbitmap_deserialize_ones(). Widen the shift. qcow2, the only other caller, never exceeds a 2 MiB cluster. Fixes: 35f428ba3971 ("qcow2-bitmap: make bytes_covered_by_bitmap_cluster() public") Cc: Eric Blake <eblake@redhat.com> Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Message-ID: <20260811173857.396571-4-den@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 1 个月前 | |
common-user: Move guest_base, have_guest_base to probe-guest-base.c Unify the definitions of guest_base and have_guest_base. Reviewed-by: Helge Deller <deller@gmx.de> Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 2 个月前 | |
char-win-stdio: fix typo in spelling of 'stdio' Signed-off-by: Filip Hejsek <filip.hejsek@gmail.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> | 2 个月前 | |
common-user: Move guest_base, have_guest_base to probe-guest-base.c Unify the definitions of guest_base and have_guest_base. Reviewed-by: Helge Deller <deller@gmx.de> Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 2 个月前 | |
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> | 2 个月前 | |
virtio-gpu: reject requests with short/truncated control headers A short control request can leave command data partially initialized. For the common header, guest-controlled flags can then cause stale fence metadata to be returned to the guest. The command fill helpers detect a short copy but only log and return. For the common header this leaves the request without any completion; for type-specific commands the caller still completes the request but reports VIRTIO_GPU_RESP_OK_NODATA, masking the error. Make VIRTIO_GPU_FILL_CMD() clear the partially copied object and complete the request with ERR_INVALID_PARAMETER. Make VUGPU_FILL_CMD() report the same error through the existing vhost-user-gpu dispatcher. This also rejects truncated type-specific commands. The vhost-user-gpu common header is copied outside VUGPU_FILL_CMD(), so clear it and complete the request directly when that copy is short. Fixes: CVE-2026-18054 Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4094 Reported-by: Ankur Saini <ankur98saini@gmail.com> Suggested-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Signed-off-by: Ankur Saini <ankur98saini@gmail.com> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20260803-virtio-gpu-short-header-v3-1-936c1daa8e61@gmail.com> | 1 个月前 | |
crypto/cipher-gnutls: Implement AES-GCM Add the AES-GCM AEAD mode to the gnutls backend so it is available when QEMU is built with gnutls (neither gcrypt nor nettle). GCM uses the incremental gnutls_cipher_* API with the GNUTLS_CIPHER_AES_*_GCM algorithms: gnutls_cipher_set_iv() sets the nonce, gnutls_cipher_add_auth() feeds the associated data, gnutls_cipher_encrypt2()/decrypt2() process the message, and gnutls_cipher_tag() reads back the authentication tag. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260811060115.1849266-12-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com> | 1 个月前 | |
hexagon: print info on "-d in_asm" for disabled IEEE FP instructions When cpu->cfg.ieee_fp_extension is off, IEEE FP instructions don't get executed. Let's print that info on the "-d in_asm" output to help users. This will generate an output like the following: 0x00020e30: 0x1f82e1c0 { V0.sf = vadd(V1.sf,V2.sf) (disabled: no ieee_fp) } Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com> Signed-off-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com> Link: https://lore.kernel.org/qemu-devel/1bdc772e4a795ecd9f5bf2b7e7143cc4b297318c.1776339451.git.matheus.bernardino@oss.qualcomm.com Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com> | 1 个月前 | |
Merge tag 'next-pull-request' of https://gitlab.com/peterx/qemu into staging migration/mem pull for 11.2 v2: fixes macos build error - Dongli's patch to add cpr-transfer support for HMP - Fabiano's doc update for migration on security issues - Gavin's fix for MMIO access support for memory APIs, reverting ram_device ops - Sam's migration test build fix for !ASN1 - Peter's a few migration hardening fixes # -----BEGIN PGP SIGNATURE----- # # iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCan3KARIccGV0ZXJ4QHJl # ZGhhdC5jb20ACgkQO1/MzfOr1wa76QD/eBLnPtDvmpNHNH3+bm/3XC3zwyy7v69U # bGK3ocwI3sQA/j9o5FCc7xDCA0QaW6RMeerlLXvXR0uwH46UESKKDloF # =/Jbs # -----END PGP SIGNATURE----- # gpg: Signature made Thu 13 Aug 2026 06:43:29 AM PDT # gpg: using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706 # gpg: issuer "peterx@redhat.com" # gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [unknown] # gpg: aka "Peter Xu <peterx@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: B918 4DC2 0CC4 57DA CF7D D1A9 3B5F CCCD F3AB D706 * tag 'next-pull-request' of https://gitlab.com/peterx/qemu: migration: Fix rare hang of migration_channel_read_peek() migration/ram: Check for RAMBlock size mismatch when parsing migration/multifd: Replace assert() with error_setg() in recv paths migration/multifd: Validate next_packet_size in zlib/zstd recv tests/qtest/migration: Only build tls_no_hostname test with TASN1 system/memory: Make ram device region directly accessible system/memory: Use qemu_ram_move() for directly accessible regions system/memory: Use memmove() for directly accessible regions migration/cpr: Add HMP support for cpr-transfer docs: Add security considerations for migration Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 1 个月前 | |
dump: fix misleading VMCOREINFO phys_base parse error When qemu_strtou64() fails on the value after NUMBER(phys_base)= or NUMBER(PHYS_OFFSET)=, report a parse failure and include the malformed value. The previous message suggested the field name itself could not be read. Fixes: d9feb51772 ("dump: update phys_base header field based on VMCOREINFO content") Signed-off-by: yujun <yujun@kylinos.cn> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260629114646.288664-1-yujun@kylinos.cn> | 2 个月前 | |
ebpf: fix swapped toeplitz/indirection args in set_data trace trace_ebpf_rss_set_data() passes its third and fourth arguments to the toeplitz-ptr and indirection-ptr fields defined in trace-events. ebpf_rss_set_all() passed indirections_table and toeplitz_key in the opposite order, so tracing mislabeled the two pointers. Match the argument order already used by trace_ebpf_rss_mmap(). Fixes: f5cae19d10 ("ebpf: improve trace event coverage to all key operations") Signed-off-by: yujun <yujun@kylinos.cn> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260629090116.266561-1-yujun@kylinos.cn> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> | 2 个月前 | |
fpu: Handle all rounding modes in partsN_round_to_int_normal Missed float_round_nearest_even_max and float_round_to_odd_inf in both switch statements. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-id: 20260608190155.637067-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 3 个月前 | |
hw/9pfs: add max_xattr option Previous patch introduced a limit of max. 1024 simultaneous xattr FIDs. This patch introduces an option "max_attr" that allows to override this limit, just for the case that some user might run into this limit for some reason, even if unlikely; or for reducing the limit further down (e.g. that default limit of 1024 would cap at max. 64 MiB host memory, at least on Linux hosts where the limit per xattr is 64k). This new "max_xattr" option can be specified with both -fsdev and -virtfs command line options, with the "local" and the "synth" fs drivers. The previous limit of 1024 is preserved as the default value. Link: https://lore.kernel.org/qemu-devel/b7631ac0d8dde0629bc7c4f2c4185d9f57b962b4.1781361555.git.qemu_oss@crudebyte.com Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> | 2 个月前 | |
monitor: pass chardev ID into monitor constructor instead of object Current the monitor_new_hmp/monitor_new_qmp constructors accept a Chardev object pointer. To facilitate the next commit which will introduce a QOM property for the character device ID, switch to accepting an chardev ID in the constructor. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20260706135824.2623960-7-berrange@redhat.com> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> | 2 个月前 | |
meson: Drop host_arch rename for riscv64 This requires renaming several directories: tcg/riscv, linux-user/include/host/riscv, and common-user/host/riscv. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 8 个月前 | |
hw/core/machine: Move EHCI migration compat properties to 11.1 The x-migrate-fetch-addr-64bit compatibility properties for sysbus-ehci-usb and pci-ehci-usb were reviewed before the QEMU 11.1 release and were therefore initially added to hw_compat_11_0. However, the EHCI migration change was merged after the QEMU 11.1 release. As a result, these compatibility properties belong in hw_compat_11_1 rather than hw_compat_11_0. Move both properties to hw_compat_11_1 so that migration compatibility is associated with the correct machine version. Fixes: 38ed803aebb2 ("usb/hcd-ehci: Change descriptor addresses to 64-bit") Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260814032559.3381363-1-jamin_lin@aspeedtech.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> | 1 个月前 | |
hw/elf_ops: defend against weird elf headers According to the ELF spec: PT_LOAD The array element specifies a loadable segment, described by p_filesz and p_memsz. The bytes from the file are mapped to the beginning of the memory segment. If the segment's memory size (p_memsz) is larger than the file size (p_filesz), the ``extra'' bytes are defined to hold the value 0 and to follow the segment's initialized area. The file size may not be larger than the memory size. Loadable segment entries in the program header table appear in ascending order, sorted on the p_vaddr member. which implies while both p_filesz and p_memsz can be zero we should never see a case where p_filesz is greater than the in memory size. Indeed it has been reported such a hand crafted ELF can blow up, for example during rom_reset(): address_space_set(rom->as, rom->addr + rom->datasize, 0, rom->romsize - rom->datasize, MEMTXATTRS_UNSPECIFIED); which could trigger and underflow leaving QEMU slowly filling a very large buffer. Cc: qemu-stable@nongnu.org Fixes: https://gitlab.com/qemu-project/qemu/-/work_items/4056 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260812081405.3811787-1-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> | 1 个月前 | |
io: add missing coroutine annotation Fixes: 1edf0df28409 ("io: Add qio_channel_wait_cond() helper") Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> | 1 个月前 | |
libdecnumber: replace FSF postal address with licenses URL Some of the GPLv2 boiler-plate still contained the obsolete "51 Franklin Street" postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei <me@sean.taipei> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250613.qemu.patch.03@sean.taipei> Signed-off-by: Thomas Huth <thuth@redhat.com> | 1 年前 | |
linux-headers: Update to Linux v7.2-rc1 with KVM_S390_VM_CPU_FEAT_ASTFLEIE2 Update headers to retrieve new architecture feature definitions. KVM_S390_VM_CPU_FEAT_ASTFLEIE2 is specifically needed here. Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com> Message-ID: <20260701-astfleie2-v3-1-f692dc7f4f24@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com> | 2 个月前 | |
Merge tag 'linux-user-pull-request' of https://github.com/hdeller/qemu-hppa into staging linux-user patches Patches from Mat Turner to support the mount_setattr() syscall and to add floating-point registers to core dumps on alpha, mips, hppa, riscv and sh4. # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCanzZYQAKCRD3ErUQojoP # X+x4AP9UqX4OuUUZy+HA33eW+54JIT9xfF88VnU6VhZdQpPhlQEA3cYz393TjIpT # uXlgPvwCVa6C3/qUSq//00v3KQsF+Q0= # =4lE3 # -----END PGP SIGNATURE----- # gpg: Signature made Wed 12 Aug 2026 01:36:49 PM PDT # gpg: using EDDSA key BCE9123E1AD29F07C049BBDEF712B510A23A0F5F # gpg: Good signature from "Helge Deller <deller@gmx.de>" [unknown] # gpg: aka "Helge Deller <deller@kernel.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 4544 8228 2CD9 10DB EF3D 25F8 3E5F 3D04 A7A2 4603 # Subkey fingerprint: BCE9 123E 1AD2 9F07 C049 BBDE F712 B510 A23A 0F5F * tag 'linux-user-pull-request' of https://github.com/hdeller/qemu-hppa: linux-user/sh4: write the floating-point registers to a core dump linux-user/riscv: write the floating-point registers to a core dump linux-user/hppa: write the floating-point registers to a core dump linux-user/mips: write the floating-point registers to a core dump linux-user/alpha: write the floating-point registers to a core dump linux-user: support writing floating-point registers to a core dump linux-user: implement mount_setattr(2) Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 1 个月前 | |
migration/block-dirty-bitmap: reject bitmap load onto ro node dirty_bitmap_load_start() creates an incoming migrated bitmap with bdrv_create_dirty_bitmap() and, if the source marked it persistent, calls bdrv_dirty_bitmap_set_persistence() without checking whether the destination node can be written to. Same gap as qmp_block_dirty_bitmap_add(), reached via incoming migration: a persistent bitmap for a read-only destination (e.g. a migrated CD-ROM-class attachment with dirty-bitmaps migration enabled) ends up writable in memory on a node that can never store it. Reject it the same way, with one difference from the QMP path: every destination node is BDRV_O_INACTIVE until migration completes, so bdrv_is_writable() would reject every incoming persistent bitmap, not just read-only ones. Check bdrv_is_read_only() alone. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Eric Blake <eblake@redhat.com> CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> CC: John Snow <jsnow@redhat.com> CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Message-ID: <20260716112242.3000035-3-den@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 1 个月前 | |
monitor: Replace container_of(MonitorHMP, parent_obj) -> MONITOR_HMP() By replacing the container_of(MonitorHMP) use in ui/ui-hmp-cmds.c we can remove its incorrect inclusion of "monitor/monitor-internal.h" header, using the public "monitor/monitor.h" instead. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812211708.92824-23-philmd@oss.qualcomm.com> | 1 个月前 | |
block: Add flags parameter to blk_*_pdiscard() All existing callers pass 0, but we need a way to pass BDRV_REQ_NO_QUEUE for discard requests. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20260421161132.99878-4-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 4 个月前 | |
net/vhost-vdpa: Include missing 'qemu/iov.h' header vhost-vdpa.c uses methods declared in the "qemu/iov." header. Include it otherwise we get when refactoring unrelated headers: ../net/vhost-vdpa.c: In function ‘vhost_vdpa_net_load_cmd’: ../net/vhost-vdpa.c:714:24: error: implicit declaration of function ‘iov_size’ 714 | size_t data_size = iov_size(data_sg, data_num), cmd_size; | ^~~~~~~~ ../net/vhost-vdpa.c:714:24: error: nested extern declaration of ‘iov_size’ ../net/vhost-vdpa.c:742:5: error: implicit declaration of function ‘iov_from_buf’ 742 | iov_from_buf(out_cursor, 1, 0, &ctrl, sizeof(ctrl)); | ^~~~~~~~~~~~ ../net/vhost-vdpa.c:742:5: error: nested extern declaration of ‘iov_from_buf’ ../net/vhost-vdpa.c:744:5: error: implicit declaration of function ‘iov_to_buf’ 744 | iov_to_buf(data_sg, data_num, 0, | ^~~~~~~~~~ ../net/vhost-vdpa.c:744:5: error: nested extern declaration of ‘iov_to_buf’ ../net/vhost-vdpa.c:748:5: error: implicit declaration of function ‘iov_copy’ 748 | iov_copy(&out, 1, out_cursor, 1, 0, cmd_size); | ^~~~~~~~ Fixes: bd907ae4b00 ("vdpa: manual forward CVQ buffers") Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812211708.92824-3-philmd@oss.qualcomm.com> | 1 个月前 | |
pc-bios/s390-ccw.img: update s390x bios Update the s390 bios with recent fixes for out-of-bounds accesses. Signed-off-by: Eric Farman <farman@linux.ibm.com> | 1 个月前 | |
plugins: use int64_t for the syscall filter return value The syscall return value passed back through the syscall filter callback is semantically signed: negative values encode errno codes. Declaring the sysret pointer as uint64_t * is therefore misleading and forces callers to launder the value through an unsigned temporary. Change the sysret pointer to int64_t * across the public plugin API typedef (qemu_plugin_vcpu_syscall_filter_cb_t), the internal qemu_plugin_vcpu_syscall_filter() prototypes and stub, its implementation in plugins/core.c, the linux-user caller, and the in-tree example plugins. Signed-off-by: Ziyang Zhang <functioner@sjtu.edu.cn> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Link: https://lore.kernel.org/qemu-devel/20260618082426.790315-2-functioner@sjtu.edu.cn Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> | 3 个月前 | |
po: update Italian translation Reported-by: bovirus <https://gitlab.com/bovirus> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2451 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 2 年前 | |
tests: switch from -mon to -object monitor-qmp Use the new preferred low level option for configuring the QMP service in libqtest and the python Machine class used by tests. This will avoid triggering deprecation warnings after the subsequent commit. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20260706135824.2623960-34-berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> | 2 个月前 | |
meson, mkvenv: add functests custom target add the "pyvenv_functests_group" target to meson. This target will invoke mkvenv.py to install the associated dependency group to the build/pyvenv directory. A "pyvenv_tooling_group" is not included here as it is the plan to always install this group by default, so it will not need an on-demand trigger. Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260218213416.674483-7-jsnow@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> | 6 个月前 | |
block/monitor: reject persistent bitmap add on a read-only node qmp_block_dirty_bitmap_add() marks a new bitmap persistent without checking write access to its node. bdrv_create_dirty_bitmap() always creates bitmaps writable, so a persistent bitmap added to an already read-only node stays writable in memory on a node that can never store it, and the next global inactivation fails: Lost persistent bitmaps during inactivation of node '<node>': No write access migration_block_inactivate: bdrv_inactivate_all() failed: -22 Forcing it read-only instead does not help: it was never stored, so it stays unpromotable on the next reopen to read-write and can trip bdrv_set_dirty()'s readonly assert on the first write. Reject the add instead, for both read-only and inactive nodes -- an already-inactive node skips qcow2_inactivate() on close, so a bitmap added during that window would never get stored either. Wrapped in a transaction, this denies the whole transaction, since qmp_transaction() is already all-or-none. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Eric Blake <eblake@redhat.com> CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> CC: John Snow <jsnow@redhat.com> CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Message-ID: <20260716112242.3000035-2-den@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 1 个月前 | |
qga/vss: Drop unused define uuid(x) There is no place in code where we use uuid(x), at the same time MSVC vss.h use it and this define broke compilation. Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> Link: https://lore.kernel.org/r/20260330113906.168002-8-kkostiuk@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 3 个月前 | |
json-parser: fix formatting of comment Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20260713114622.1950506-1-pbonzini@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Mea culpa] Signed-off-by: Markus Armbruster <armbru@redhat.com> | 2 个月前 | |
qom/object.c: rename object_class_property_uint*_ptr() to object_class_static_property_uint*_ptr() This more accurately reflects that these properties are held within the class and not the object. Update the documentation to describe the few cases where static properties should be used. Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20260717135254.508701-7-mark.caveayland@nutanix.com> | 1 个月前 | |
replay: fix use of uninitialized pointer on error When bdrv_snapshot_list() returns a negative error code, sn_tab is uninitialized. The loop does not execute (since i=0 < negative is false), but the code falls through to g_free(sn_tab) which frees an uninitialized pointer. Fixes: f6baed3d1485 ("replay: implement replay-seek command") Signed-off-by: Marc-Andre Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260719113216.1177594-1-marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> | 2 个月前 | |
Update OpenBIOS images to e5ac46dd built from submodule. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2 个月前 | |
system/memory: move RamDiscardManager to separate compilation unit Extract RamDiscardManager and RamDiscardSource from system/memory.c into dedicated a unit. This reduces coupling and allows code that only needs the RamDiscardManager interface to avoid pulling in all of memory.h dependencies. rust-sys bindings are no longer generated for RamDiscardSourceClass at this point, thus we drop the unneeded InterfaceClass use. Reviewed-by: Peter Xu <peterx@redhat.com> Acked-by: David Hildenbrand <david@kernel.org> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260604-rdm5-v5-2-5768e6a0943d@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> | 3 个月前 | |
get_maintainer: add ability to report Git Lab handle With the GitLab mapping files from the previous commit, the get_manitainer.pl script is now able to report the gitlab handle for each maintainer/reviewer when displaying output. For example: $ ./scripts/get_maintainer.pl -f hw/scsi/lsi53c895a.c Paolo Bonzini <pbonzini@redhat.com> (supporter:SCSI, gitlab:@bonzini) Fam Zheng <fam@euphon.net> (reviewer:SCSI, gitlab:@famzheng) qemu-devel@nongnu.org (open list:All patches CC here) Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | 2 个月前 | |
scsi/pr-manager-helper: free path on finalization set_path allocates path via g_strdup, but pr_manager_helper_instance_finalize did not free it. Fixes: 9bad2a6b9d0a ("scsi: add persistent reservation manager using qemu-pr-helper") Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> | 4 个月前 | |
accel/tcg: Move cpu_loop_exit_*() out of 'exec/cpu-common.h' Move the following TCG-specific cpu_loop_exit_*() declarations out of the generic "exec/cpu-common.h" header, to the recently created "accel/tcg/cpu-loop.h" one, documenting them: - cpu_loop_exit_noexc() - cpu_loop_exit_atomic() - cpu_loop_exit_restore() - cpu_loop_exit() Include "accel/tcg/cpu-loop.h" where appropriate. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260617171438.75914-11-philmd@oss.qualcomm.com> | 3 个月前 | |
qapi: Move include/qapi/qmp/ to include/qobject/ The general expectation is that header files should follow the same file/path naming scheme as the corresponding source file. There are various historical exceptions to this practice in QEMU, with one of the most notable being the include/qapi/qmp/ directory. Most of the headers there correspond to source files in qobject/. This patch corrects most of that inconsistency by creating include/qobject/ and moving the headers for qobject/ there. This also fixes MAINTAINERS for include/qapi/qmp/dispatch.h: scripts/get_maintainer.pl now reports "QAPI" instead of "No maintainers found". Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Acked-by: Halil Pasic <pasic@linux.ibm.com> #s390x Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20241118151235.2665921-2-armbru@redhat.com> [Rebased] | 1 年前 | |
monitor: rename monitor_init* to monitor_new* The current "monitor_init" functions will clash with the methods of the same name that are required by QOM. To ease the transition to QOM, rename them out of the way. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org> Tested-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20260706135824.2623960-5-berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> | 2 个月前 | |
monitor: implement "user creatable" interface for adding monitors Implement the user creatable QOM interface and define the monitor-qmp and monitor-hmp types in QAPI. This unlocks the ability to create them on the command line with -object or in HMP/QMP with object_add. For example: $QEMU -chardev stdio,id=monchr0 -object monitor-hmp,id=mon0,chrdev=monchr0 Initially the "prepare_delete" callback is hardcoded to return an error which means -object and object_add can be used, but object_del will fail. Support for deleting monitors will be introduced in subsequent commits. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20260706135824.2623960-24-berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> | 2 个月前 | |
libvduse: validate vq size libvduse assumes that vq size (aka vq num) is below VIRTQUEUE_MAX_SIZE and maps logs large enough based on this assumption. However, vduse_queue_enable() accepts the vq size returned through VDUSE_VQ_GET_INFO without validation, so a value above VIRTQUEUE_MAX_SIZE (1024) overruns the inflight log and causes out-of-bounds writes in vduse_queue_inflight_get(). According to the virtio spec, vq size can only be reduced, not increased, so vq size must not exceed the previously configured max_size, but the kernel vduse module does not validate this for us, and we should not trust another process to follow the spec. Validate and reject vq size values above VIRTQUEUE_MAX_SIZE. Fixes: CVE-2026-61402 Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3652 Reported-by: Jia Jia <physicalmtea@gmail.com> Message-ID: <bf7e71b3139875e5e00fd53970c772d6c90dc2a1.1784888961.git.mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> | 1 个月前 | |
system: Move runstate-related code from cpus.c to runstate.c Keep cpus.c focused on vCPUs handling, move code related to VM state to runstate.c where similar code lives. Fix few checkpatch.pl warnings: WARNING: Block comments use a leading /* on a separate line WARNING: Block comments use * on subsequent lines #327: FILE: system/runstate.c:541: +/* does a state transition even if the VM is already stopped, + current state is forgotten forever */ Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812211708.92824-17-philmd@oss.qualcomm.com> | 1 个月前 | |
hexagon: Remove unnecessary 'monitor/monitor.h' header The Monitor type is used in these 2 files, as a pointer. Since the type is forward-declared in "qemu/typedefs.h", which all source files include via "qemu/osdep.h", we do not need to include it. Do however include "exec/hwaddr.h" and "exec/mmu-access-type.h" which declare the types used by hex_tlb_find_match prototype: extern bool hex_tlb_find_match(CPUHexagonState *env, uint32_t VA, MMUAccessType access_type, hwaddr *PA, int *prot, ^^^^^^^^^^^^^ ^^^^^^ uint64_t *size, int32_t *excp, int mmu_idx); Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812211708.92824-2-philmd@oss.qualcomm.com> | 1 个月前 | |
tcg/loongarch64: Fix cmp_vec with TCG_COND_NE For NE we need to invert EQ, not swap operands. Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3589 Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20260623140609.645445-1-richard.henderson@linaro.org> | 2 个月前 | |
block/monitor: allow dropping a bitmap never stored on disk block-dirty-bitmap-remove refuses any readonly bitmap outright, via the generic BDRV_BITMAP_RO check in bdrv_dirty_bitmap_check(). That check cannot tell whether the bitmap is actually on disk, so it also blocks dropping one that only ever existed in memory, which needs no write at all. Drop the blanket check and let qcow2 decide: bdrv_remove_persistent_ dirty_bitmap() already treats an absent on-disk entry as a no-op, so such a bitmap is now released with no write attempted. For one that is genuinely stored, qcow2_co_remove_persistent_dirty_bitmap_locked() now checks can_write() before it would update the on-disk directory, so removal still fails there, with a message naming the actual reason instead of just the bitmap's readonly flag. Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Eric Blake <eblake@redhat.com> CC: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> CC: John Snow <jsnow@redhat.com> CC: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Message-ID: <20260716112242.3000035-4-den@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 1 个月前 | |
monitor: drop unused monitor_cur_is_qmp The previous patch dropped the only remaining use of monitor_cur_is_qmp. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20260706135824.2623960-19-berrange@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> | 2 个月前 | |
trace/control: Fix -Wunused-but-set-global warning with clang 23+ ../trace/control.c:41:13: error: variable 'init_trace_on_startup' set but not used [-Werror,-Wunused-but-set-global] 41 | static bool init_trace_on_startup; | ^ 1 error generated. Signed-off-by: Tom Stellard <tstellar@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20260617224145.1419961-1-tstellar@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 3 个月前 | |
monitor: Replace container_of(MonitorHMP, parent_obj) -> MONITOR_HMP() By replacing the container_of(MonitorHMP) use in ui/ui-hmp-cmds.c we can remove its incorrect inclusion of "monitor/monitor-internal.h" header, using the public "monitor/monitor.h" instead. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812211708.92824-23-philmd@oss.qualcomm.com> | 1 个月前 | |
coroutine: fix lost wakeup in qemu_co_sleep_wake() cache_clean_timer_del_and_wait() cancels the cache-cleaner coroutine by setting s->cache_clean_interval = 0 and calling qemu_co_sleep_wake() to cut short its qemu_co_sleep_ns_wakeable(). qemu_co_sleep_wake() is fire-and-forget: it reads w->to_wake and silently returns when it is NULL. A sleeper that is between two iterations -- has just released s->lock but has not yet set w->to_wake inside qemu_co_sleep() -- loses the wake: iothread0 timer coroutine main thread (qcow2 close) ------------------------- ------------------------- while-body (holding s->lock): read interval = 600 wait_ns = 600 * NS release s->lock take s->lock interval = 0 qemu_co_sleep_wake(w): w->to_wake == NULL -> skip return qemu_co_queue_wait(exit, s->lock): release s->lock yield qemu_co_sleep_ns_wakeable: aio_timer_init(+600 s) qemu_co_sleep: cas scheduled NULL -> "qsns" w->to_wake = co yield [sleeps 600 s] cache_clean_timer_del_and_wait() then blocks on cache_clean_timer_exit until the original 600 s expiry fires, and qcow2_close() holds BQL the whole time so the VM stalls behind it. block_copy_kick() has the same shape. Fix the primitive once instead of working around it in each caller. Use a tri-state for QemuCoSleep::to_wake: NULL - idle co - sleeper parked PENDING - wake delivered, no sleeper yet (sticky) qemu_co_sleep_wake() xchgs PENDING into to_wake: a real sleeper is woken, NULL/PENDING is left untouched so the wake stays sticky. qemu_co_sleep() cmpxchg-publishes itself as the sleeper; if a wake was delivered before it got there or races the publish, the cmpxchg observes PENDING and returns without yielding. On normal resume qemu_co_sleep() clears the PENDING the waker left behind so the next sleep starts clean. A double-fire (real wake plus timer callback) is harmless: the first xchg returns the coroutine and wakes it; the second returns PENDING and is a no-op. Cancellation latency through qemu_co_sleep_wake() is now bounded by aio_co_wake() rather than by the sleep duration. Fixes: f86dde9a15 ("qcow2: Fix cache_clean_timer") Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Hanna Czenczek <hreitz@redhat.com> Cc: Kevin Wolf <kwolf@redhat.com> Message-ID: <20260610115850.2410566-2-den@openvz.org> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 1 个月前 | |
b4: Drop linktrailermask When grabbing a patch series, the link trailer is replaced with a Message-ID, which is not useful compared to an URL. Fix that by dropping the linktrailermask config. Cc: Philippe Mathieu-Daudé <philmd@linaro.org> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Fixes: 838cf72b5d2c ("Add a b4 configuration file") Link: https://lore.kernel.org/qemu-devel/20250630172301.519848-1-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com> | 1 年前 | |
Add .dir-locals.el file to configure emacs coding style Some default emacs setups indent by 2 spaces and uses tabs which is counter to the QEMU coding style rules. Adding a .dir-locals.el file in the top level of the GIT repo will inform emacs about the QEMU coding style, and so assist contributors in avoiding common style mistakes before they submit patches. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> | 10 年前 | |
scripts/kernel-doc: Delete the old Perl kernel-doc script We can now delete the old Perl kernel-doc script. For posterity, this is a complete diff of the local changes that we were carrying between the kernel's Perl script as of kernel commit 72b97d0b911872ba (the last time we synced it) and our local copy: --- /tmp/kdoc 2025-08-14 10:42:47.620331939 +0100 +++ scripts/kernel-doc 2025-02-17 10:44:34.528421457 +0000 @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# SPDX-License-Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0-only use warnings; use strict; @@ -224,12 +224,12 @@ my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params my $type_fp_param2 = '\@(\w+->\S+)\(\)'; # Special RST handling for structs with func ptr params my $type_env = '(\$\w+)'; -my $type_enum = '\&(enum\s*([_\w]+))'; -my $type_struct = '\&(struct\s*([_\w]+))'; -my $type_typedef = '\&(typedef\s*([_\w]+))'; -my $type_union = '\&(union\s*([_\w]+))'; -my $type_member = '\&([_\w]+)(\.|->)([_\w]+)'; -my $type_fallback = '\&([_\w]+)'; +my $type_enum = '#(enum\s*([_\w]+))'; +my $type_struct = '#(struct\s*([_\w]+))'; +my $type_typedef = '#(([A-Z][_\w]*))'; +my $type_union = '#(union\s*([_\w]+))'; +my $type_member = '#([_\w]+)(\.|->)([_\w]+)'; +my $type_fallback = '(?!)'; # this never matches my $type_member_func = $type_member . '\(\)'; # Output conversion substitutions. @@ -1745,6 +1745,9 @@ )+ \)\)\s+//x; + # Strip QEMU specific compiler annotations + $prototype =~ s/QEMU_[A-Z_]+ +//; + # Yes, this truly is vile. We are looking for: # 1. Return type (may be nothing if we're looking at a macro) # 2. Function name @@ -2057,7 +2060,7 @@ } elsif (/$doc_decl/o) { $identifier = $1; - if (/\s*([\w\s]+?)(\(\))?\s*-/) { + if (/\s*([\w\s]+?)(\s*-|:)/) { $identifier = $1; } @@ -2067,7 +2070,7 @@ $contents = ""; $section = $section_default; $new_start_line = $. + 1; - if (/-(.*)/) { + if (/[-:](.*)/) { # strip leading/trailing/multiple spaces $descr= $1; $descr =~ s/^\s*//; These changes correspond to: 06e2329636f license: Update deprecated SPDX tag GPL-2.0 to GPL-2.0-only (a bulk change which we won't bother to re-apply to this third-party script) b30df2751e5 scripts/kernel-doc: strip QEMU_ from function definitions 4cf41794411 docs: tweak kernel-doc for QEMU coding standards We have already applied the equivalent of these changes to the Python code in libs/kdoc/ in the preceding commits. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> | 1 年前 | |
qemu: add .exrc I've been using this to get correct indenting with vim in qemu for a while, but it's a bit easier if we put the settings in the central place. Note that 1. you still need to enable 'exrc' and 'secure' options in your vimrc for these settings to take effect. 2. you can create a .vimrc file if 'exrc' is on but there's need to bypass this configuration. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> | 13 年前 | |
.gdbinit: load QEMU sub-commands when gdb starts The scripts/qemu-gdb.py file is not easily discoverable. Add a .gdbinit file so GDB either loads qemu-gdb.py automatically or prints a message informing the user how to enable them (some systems disable ./.gdbinit loading for security reasons). Symlink .gdbinit and the scripts directory in order to make out-of-tree builds work. The scripts directory is used to find the qemu-gdb.py file specified by a relative path in .gdbinit. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Eric Blake <eblake@redhat.com> Message-id: 20170517124042.1430-1-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 9 年前 | |
metadata: add .git-blame-ignore-revs Someone mentioned this on IRC so I thought I would try it out with a few commits that are pure code style fixes. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230403134920.2132362-7-alex.bennee@linaro.org> | 3 年前 | |
rust: patch bilge-impl to allow compilation with 1.63.0 Apply a patch that removes "let ... else" constructs, replacing them with "if let ... else" or "let ... = match ...". "let ... else" was stabilized in Rust 1.65.0. Reviewed-by: Junjie Mao <junjie.mao@hotmail.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 1 年前 | |
configure: rename --enable-pypi to --enable-download, control subprojects too The behavior of --{enable,disable}-pypi is similar to that of -Dwrapmode={default,nodownload} respectively. In particular, in both cases a feature needs to be explicitly enabled for the dependency to be downloaded. So, use a single option to control both cases. Now, --enable-slirp will trigger cloning and building of libslirp if the .pc file is not found on the machine. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 3 年前 | |
docs: Document GitLab custom CI/CD variables We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf ("gitlab: Run Avocado tests manually (except mainstream CI)"), but forgot to document it properly. Do it now. Suggested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210727142431.1672530-2-philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> | 5 年前 | |
gitlab: introduce files mapping GitLab accounts to real names It is desirable to be able to discover the GitLab account handle assocaited with a real name in the MAINTAINERS file. Rather that duplicating the same account handle multiple times, inline with the MAINTAINERS file entries, this introduces mapping files: * .gitlab-map-auto - data automatically queried from GitLab using the 'glab' tool and REST API * .gitlab-map-manual - manual overrides/augmentation for cases where the MAINTAINERS real name does not match the GitLab account real name The former would need refreshing when we add new MAINTAINERS entries, if the person had to be added as a GitLab account member. For this purpose scripts/gitlab-map-update can be used, assuming the user has the 'glab' client tool present and configured with an access token. To audit how many maintainers have GitLab handles present/missing scripts/gitlab-map-check can run a report. $ ./scripts/gitlab-map-check Missing GitLab handle for maintainer 'Akihiko Odaki' Missing GitLab handle for maintainer 'Albert Esteve' .... Missing GitLab handle for maintainer 'Zhenzhong Duan' Missing GitLab handle for maintainer 'Zhuoying Cai' GitLab handles missing: 158 / present: 68 Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | 2 个月前 | |
gitlab: introduce files mapping GitLab accounts to real names It is desirable to be able to discover the GitLab account handle assocaited with a real name in the MAINTAINERS file. Rather that duplicating the same account handle multiple times, inline with the MAINTAINERS file entries, this introduces mapping files: * .gitlab-map-auto - data automatically queried from GitLab using the 'glab' tool and REST API * .gitlab-map-manual - manual overrides/augmentation for cases where the MAINTAINERS real name does not match the GitLab account real name The former would need refreshing when we add new MAINTAINERS entries, if the person had to be added as a GitLab account member. For this purpose scripts/gitlab-map-update can be used, assuming the user has the 'glab' client tool present and configured with an access token. To audit how many maintainers have GitLab handles present/missing scripts/gitlab-map-check can run a report. $ ./scripts/gitlab-map-check Missing GitLab handle for maintainer 'Akihiko Odaki' Missing GitLab handle for maintainer 'Albert Esteve' .... Missing GitLab handle for maintainer 'Zhenzhong Duan' Missing GitLab handle for maintainer 'Zhuoying Cai' GitLab handles missing: 158 / present: 68 Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | 2 个月前 | |
.gitmodules: restore qemu-project mirror of u-boot-sam460ex With this change also reference the upstream repo. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20251001170947.2769296-4-alex.bennee@linaro.org> | 11 个月前 | |
.gitpublish: use origin/master as default base This is very much the result of my recent fat finger but I think it's safer to assume that origin/master points to a recent commit (or at least a commit a given branch is based on) than master. Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20251001170947.2769296-2-alex.bennee@linaro.org> | 11 个月前 | |
mailmap: add fix for Zhongyao Chen Fixes: c24f58d5322 (target/riscv: Fix tail handling for vmv.s.x and vfmv.s.f) Cc: chen.zhongyao@zte.com.cn Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20260709080040.4157324-4-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> | 2 个月前 | |
scripts/checkpatch: roll diff tweaking into checkpatch itself Rather than relying on external tweaks lets just do it inside checkpatch's direct commitish handling which is QEMU specific code anyway. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20210623102749.25686-4-alex.bennee@linaro.org> | 5 年前 | |
readthedocs: don't build extra formats We don't build the PDFs ourselves for the hosted docs and it looks like rtd can't manage building PDFs now they have gone over a certain size. Disable the extra formats so we can at least have the online stuff again. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20250804162959.330060-1-alex.bennee@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 1 年前 | |
travis.yml: Remove the aarch64 job According to: https://docs.travis-ci.com/user/billing-overview/#partner-queue-solution only s390x and ppc64le are still part of the free OSS tier in Travis. aarch64 has been removed sometime during the last year. Thus remove the aarch64 job from our .travis.yml file now to avoid that someone burns non-OSS CI credits with this job by accident now. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250530115454.187727-1-thuth@redhat.com> | 1 年前 | |
COPYING: replace FSF postal address with licenses URL The license text in COPYING (GPLv2), COPYING.LIB (LGPLv2.1), and the linux-headers/LICENSES/preferred/GPL-2.0 file are referenced to the obsolete FSF postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei <me@sean.taipei> Message-ID: <20250613.qemu.patch.01@sean.taipei> [thuth: dropped the changes to the linux-headers folder] Signed-off-by: Thomas Huth <thuth@redhat.com> | 1 年前 | |
COPYING: replace FSF postal address with licenses URL The license text in COPYING (GPLv2), COPYING.LIB (LGPLv2.1), and the linux-headers/LICENSES/preferred/GPL-2.0 file are referenced to the obsolete FSF postal address. Replace it with the canonical GNU licenses URL recommended by the FSF: https://www.gnu.org/licenses/ Signed-off-by: Sean Wei <me@sean.taipei> Message-ID: <20250613.qemu.patch.01@sean.taipei> [thuth: dropped the changes to the linux-headers folder] Signed-off-by: Thomas Huth <thuth@redhat.com> | 1 年前 | |
dump: Build stubs once for non-x86 targets Rather than compiling the same content for all targets (unused most of the time, i.e. qemu-system-avr ...), extract the non x86 specific parts to a stub file and build it once for all non-x86 targets. Add a Kconfig symbol to only select the target-specific file with the x86 target (rename this file with '-x86' suffix). Since Kconfig symbols aren't evaluated for user emulation, the file unit is only built for system emulation. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260121215622.92966-3-philmd@linaro.org> | 7 个月前 | |
pvg: do not enable it on cross-architecture targets PVG is not cross-architecture; the PVG guest drivers with x86-64 macOS do not give useful results with the aarch64 macOS host PVG framework, and vice versa. To express this repurpose CONFIG_MAC_PVG, making it true only if the target has the same architecture as the host. Furthermore, remove apple-gfx.m unless one of the devices is actually present. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 1 年前 | |
tcg/LICENSE: Remove out of date claim about TCG subdirectory licensing Since 2008 the tcg/LICENSE file has not changed: it claims that everything under tcg/ is BSD-licensed. This is not true and hasn't been true for years: in 2013 we accepted the tcg/aarch64 target code under a GPLv2-or-later license statement. We also have generic vector optimisation code under the LGPL2.1-or-later, and the TCI backend is GPLv2-or-later. Further, many of the files are not BSD licensed but MIT licensed. We don't really consider the tcg subdirectory to be a distinct part of QEMU anyway. Remove the LICENSE file, since claiming false information about the license of the code is confusing. Update the main project LICENSE file also to be clearer about the licenses used by TCG. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20191025155848.17362-5-peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 6 年前 | |
system: Extract QMP memsave/pmemsave commands to physmem-qmp-cmds.c Keep cpus.c related to vCPU scheduling, move the QMP handlers related to dumping physical memory to file to their own unit. Fix a pair of checkpatch.pl errors doing so: ERROR: braces {} are necessary for all arms of this statement #185: FILE: system/physmem-qmp-cmds.c:51: + if (l > size) [...] Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20260812211708.92824-16-philmd@oss.qualcomm.com> | 1 个月前 | |
Revert "Makefile: include tests/Makefile.include before ninja calculation" This reverts commit fd63125b9089610d63a53c11ff2fda6b53a2265d which broke the ability to run the check-functional-FOO series of tests. We will need to try something else for the MacOS builds. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Tested-by: Cornelia Huck <cohuck@redhat.com> # running tests on an s390x Message-ID: <20260601143129.144786-2-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> | 3 个月前 | |
README.rst: add the missing punctuations Make the README more clearly. Signed-off-by: Zhihai Dong <dongzhihai@eswincomputing.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> | 2 年前 | |
Open 11.2 development tree Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 1 个月前 | |
block: Fix references in bdrv_bsc_*() function comments Some functions are defined in block_int-io.h, so the correct annotation is block_int-io.h rather than block_int.h Signed-off-by: Yunjian Long <long.yunjian@zte.com.cn> Message-ID: <20260325094204300GFCZYBzAE00cSWaldbDcT@zte.com.cn> Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 5 个月前 | |
nbd: Avoid deadlock in client connecting to same-process server See the previous patch for a longer description of the deadlock. Now that QIONetListener supports waiting for clients in the main loop AioContext, NBD can use that to ensure that the server can make progress even when a client is intentionally starving the GMainContext from any activity not tied to an AioContext. Note that command-line arguments and QMP commands like nbd-server-start or nbd-server-stop that manipulate whether the NBD server exists are serviced in the main loop; and therefore, this patch does not fall foul of the restrictions in the previous patch about the inherent unsafe race possible if a QIONetListener can have its async callback modified by a different thread than the one servicing polls. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/3169 Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20251113011625.878876-27-eblake@redhat.com> | 10 个月前 | |
block: Fix BDS use after free during shutdown During shutdown, blockdev_close_all_bdrv_states() drops any block node references that are still owned by the monitor (i.e. the user). However, in doing so, it forgot to also remove the node from monitor_bdrv_states (which qmp_blockdev_del() correctly does), which means that later calls of bdrv_first()/bdrv_next() will still return the (now stale) pointer to the node. Usually there is no such call after this point, but in some cases it can happen. In the reported case, there was an ongoing migration, and the migration thread wasn't shut down yet: migration_shutdown() called by qemu_cleanup() doesn't actually wait for the migration to be shut down, but may just move it to MIGRATION_STATUS_CANCELLING. The next time migration_iteration_finish() runs, it sees the status and tries to re-activate all block devices that migration may have previously inactivated. This is where bdrv_first()/bdrv_next() get called and the access to the already freed node happens. It is debatable if migration_shutdown() should really return before migration has settled, but leaving a dangling pointer in the list of monitor-owned block nodes is clearly a bug either way and fixing it solves the immediate problem, so fix it. Cc: qemu-stable@nongnu.org Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20251215150714.130214-1-kwolf@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 9 个月前 | |
block: rename block/aio-wait.h to qemu/aio-wait.h AIO_WAIT_WHILE is used even outside the block layer; move the header file out of block/ just like the implementation is in util/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 8 个月前 | |
meson, cargo: require Rust 1.83.0 Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250908105005.2119297-4-pbonzini@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 1 年前 | |
tests/docker: ensure container command is probed at most once The '--engine' arg accepts either 'podman' or 'docker', which is not sufficiently granular to map directly to a command. This means that docker.py still has to then probe the exact command to use. Meanwhile the 'probe' command prints out the full command to use but this cannot be passed back to docker.py to avoid probing again, so the caching is only useful in the few case where we run a container directly bypassing docker.py. Address this by replacing --engine with --command for docker.py. This in turn requires the --container-engine configure arg to be replaced with --container-command. With these changes the container command is probed at most once during configure and never again, while running in an unconfigured tree will still probe on demand. Tested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260716102515.1503404-1-berrange@redhat.com Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> | 2 个月前 | |
cpu: Move cpu_breakpoint_test out of line Move the function to cpu-common.c, with the other breakpoint functions. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260705215729.62196-19-philmd@oss.qualcomm.com> | 2 个月前 | |
cpu: Rename CPUState @singlestep_enabled -> @singlestep_flags CPUState::singlestep_enabled contains multiple flags since commit 60897d369f1 ("Debugger single step without interrupts"). Use an unsigned type and rename the field to avoid mistakes. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20260705215729.62196-32-philmd@oss.qualcomm.com> | 2 个月前 | |
qom: replace 'can_be_deleted' with 'prepare_delete' While most objects can perform all their cleanup in the finalizer method, there can be interactions with other resources / subsystems / threads which require that some cleanup be performed on an user creatable object before unparenting it and entering finalization. The current 'can_be_deleted' method runs in the deletion path and is intended to be used to block deletion. While it could be used to perform cleanup tasks, its name suggests it should be free of side-effects. Generalize this by renaming it to 'prepare_delete', explicitly allowing for cleanup to be provided. Existing users of 'can_be_deleted' are re-written, which provides them with more detailed/tailored error messages. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20260706135824.2623960-2-berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> | 2 个月前 | |
scripts/gitdm: migrate from contrib As discussed previously it was suggested scripts might be a better location for this meta data. Link: https://lore.kernel.org/all/CAFEAcA_5HvGriDsWnb1ALuA_dgG320eKv7yuM2kThv=rfOSZQA@mail.gmail.com/ Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260709080040.4157324-10-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> | 2 个月前 | |
monitor: Do not check multiple TARGET_* to build 'info tlb' command This command is filtered at build-time for a selection of binaries. By using the recently introduced HMPCommand::arch_bitmask flag we can filter them at runtime, making it possible to compile hmp-commands-info.hx once. Since the method depends on a pair of distinct targets, define it in its own stub file. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260427080738.77138-19-philmd@linaro.org> | 4 个月前 | |
hw/nmi: Remove @cpu_index argument from nmi_inject() nmi_monitor_handle() is not related to the monitor, rename it as nmi_inject(). Return a boolean value indicating success / failure as recommended by the Error API since commit e3fe3988d7 ("error: Document Error API usage rules"). The 'cpu_index' argument is not used, remove it. This officially drops the current CPU for HMP command. Document nmi_inject() as suggested by Peter Maydell in https://lore.kernel.org/qemu-devel/CAFEAcA-yALySmCJLbitCmYpiZKUXJNOavGJG9RYeo8fKqz7gcw@mail.gmail.com/. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-Id: <20260812121232.71958-5-philmd@oss.qualcomm.com> | 1 个月前 | |
qapi/iothread: introduce poll-weight parameter for aio-poll Introduce a configurable poll-weight parameter for adaptive polling in IOThread. This parameter replaces the hardcoded POLL_WEIGHT_SHIFT constant, allowing runtime control over how much the most recent event interval affects the next polling duration calculation. The poll-weight parameter uses a shift value where larger values decrease the weight of the current interval, enabling more gradual adjustments. When set to 0, a default value of 3 is used (meaning the current interval contributes approximately 1/8 to the weighted average). This patch also removes the hardcoded default value checks from adjust_polling_time(). Instead, poll-grow, poll-shrink, and poll-weight now use default values initialized in iothread.c during IOThread creation. Signed-off-by: Jaehoon Kim <jhkim@linux.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20260423195918.661299-4-jhkim@linux.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 4 个月前 | |
qapi job: Elide redundant has_FOO in generated C The has_FOO for pointer-valued FOO are redundant, except for arrays. They are also a nuisance to work with. Recent commit "qapi: Start to elide redundant has_FOO in generated C" provided the means to elide them step by step. This is the step for qapi/job.json. Said commit explains the transformation in more detail. The invariant violations mentioned there do not occur here. Cc: John Snow <jsnow@redhat.com> Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-Id: <20221104160712.3005652-15-armbru@redhat.com> | 3 年前 | |
job: keep job paused across overlapping pause requests job_pause_point_locked() sets job->paused before yielding and clears it unconditionally on wake, before re-checking whether a pause is still pending. job_pause() re-enters a parked job only while it is not yet paused, so the wake that resumes one comes from a drain *ending* (job_resume() -> job_enter_cond()). If the next drain begins before that wake runs, the woken coroutine clears job->paused while pause_count is already > 0 again: AioContext change (BQL thread) job coroutine (iothread) ----------------------------- ------------------------ parked in job_pause_point(): paused=1, pause_count=1, yielded drain ends -> job_resume(): pause_count = 0 job_enter_cond(): queue wake ..> (wake pending) bdrv_try_change_aio_context(): bdrv_drain_all_begin(): job_pause() per node pause_count = N (> 0) wake runs, leaves job_do_yield(): paused = 0 (pause_count == N) tran_commit -> job_set_aio_context(): assert(paused || completed) --> abort: paused == 0 bdrv_try_change_aio_context() drains precisely to quiesce the job before changing its AioContext, but that brief paused==0 window trips the assertion. It is guest-triggerable: a virtio-blk reset (virtio_blk_stop_ioeventfd() -> blk_set_aio_context()) racing a running mirror/blockCopy job hits it, as do x-blockdev-set-iothread, blockdev hot-plug/unplug and job completion. Keep job->paused set while a pause is still pending: loop the yield until job_should_pause_locked() is false (or the job is cancelled), and only then clear job->paused. Drained-state consumers then never observe a pending-pause job as unpaused. Signed-off-by: Denis V. Lunev <den@openvz.org> Message-ID: <20260623152406.1180235-2-den@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 1 个月前 | |
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging * meson: propagate qemu_ldflags to Rust link step * target/i386: helper_sysret(): Check that RCX contains a canonical address when emulating an Intel CPU * target/i386: tcg: remove FIXME * scsi-disk: protect against guest sending truncated data for MODE SELECT commands * scsi-disk: fix off by one in assertion # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCgAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmpgcwoUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroPfhwf+PLJ73Xf71TyKsRp0q+aEBHuT0v+h # KYSAzjqhKF3MvzTJXm/NBpnCQjxQ1FCypwcUvbDF/amOBjP/FQnFUORZMrFNkRIr # LQqnuI4SSLkYBsx+/uCnZ2WsoELh0te/I/WqhjuimUhjQau93qLPByBaE0p3ifl6 # kWqeq7lgiLFSgJxOZPXfyFZPmYvfLQatO0LVArydkcNjIMhPi1sZ2ZEBrqbV/QnA # pEpKkbeiS2t7x/kYCQ+X2scLiReWfVz1VHnufSI6L8+8/S4UE1Y3FaQcyfuPFFBC # urgInhQqjrs+2e9BQa14yD5A4G9gYOn1+vL6yB/aJ2bYlvPxhw/u7XojNQ== # =mZw/ # -----END PGP SIGNATURE----- # gpg: Signature made Wed 22 Jul 2026 03:36:42 EDT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: scsi-disk: fix off by one in assertion scsi-disk: protect against guest sending truncated data for MODE SELECT commands target/i386: helper_sysret(): Check that RCX contains a canonical address when emulating an Intel CPU meson: propagate qemu_ldflags to Rust link step target/i386: tcg: remove FIXME Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 2 个月前 | |
Remove the deprecated glusterfs block driver Glusterfs has been marked as deprecated since QEMU v9.2, and as far as I know, nobody spoke up 'til today that it should be kept. The listed e-mail address integration@gluster.org in our MAINTAINERS file seems to be bouncing nowadays, and looking at their website https://www.gluster.org/ the most recent news are from 2020 / 2021 ... so it seems like there is really hardly any interest in Glusterfs anymore. Thus it's time to remove the code now from QEMU. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20260511063013.39805-1-thuth@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 4 个月前 | |
all: Clean up includes Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1454089805-5470-16-git-send-email-peter.maydell@linaro.org | 10 年前 | |
os: add an ability to lock memory on_fault This will be used in the following commits to make it possible to only lock memory on fault instead of right away. Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Link: https://lore.kernel.org/r/20250212143920.1269754-2-d-tatianin@yandex-team.ru [peterx: fail os_mlock(on_fault=1) when not supported] [peterx: use G_GNUC_UNUSED instead of "(void)on_fault", per Dan] Signed-off-by: Peter Xu <peterx@redhat.com> | 1 年前 | |
include/qemu/osdep.h: Add Emscripten-specific OS dependencies On emscripten, some implementations in os-posix.c can't be used such as daemonizing and changing user. This commit introduces os-wasm.c and os-wasm.h which are forked from os-posix.c and os-posix.h and patched for targetting Emscripten. Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com> Link: https://lore.kernel.org/r/9fc7b106ecf86675b4532bd6778b7b5945442f89.1745820062.git.ktokunaga.mail@gmail.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 1 年前 | |
include: Rename sysemu/ -> system/ Headers in include/sysemu/ are not only related to system *emulation*, they are also used by virtualization. Rename as system/ which is clearer. Files renamed manually then mechanical change using sed tool. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Message-Id: <20241203172445.28576-1-philmd@linaro.org> | 1 年前 | |
page-vary: Build finalize_target_page_bits as common code Use target_info->page_bits_init to merge finalize_target_page_bits_common into finalize_target_page_bits in page-vary-common.c. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-ID: <20260217095106.598486-6-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> | 6 个月前 | |
page-vary: Build migration_legacy_page_bits as common code Use target_info->page_bits_init to implement migration_legacy_page_bits. Because this is the last function within the file, rename page-vary-target.c to page-vary-system.c and build once for system mode. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20260217095106.598486-7-richard.henderson@linaro.org> [PMD: Update MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> | 6 个月前 | |
python: bump qemu.qmp to v0.0.6 This release removes some deprecated warnings for our use of the old sendmsg API on older python versions. Acked-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | 4 个月前 | |
qemu-bridge-helper: relocate path to default ACL Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 5 年前 | |
qemu-edid: Restrict input parameter -d to avoid division by zero A zero value for dpi will lead to a division by zero in qemu_edid_dpi_to_mm(). Tested by runnig qemu-edid -dX, X = 0, 100. Resolves: qemu-project/qemu#1249 Suggested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Sebastian Mitterle <smitterl@redhat.com> Message-Id: <20221011151216.64897-1-smitterl@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | 3 年前 | |
qemu-img info: Add cache mode option When querying block limits, different cache modes (in particular O_DIRECT or not) can result in different limits. Add an option to 'qemu-img info' that allows the user to specify a cache mode, so that they can get the block limits for the cache mode they intend to use with their VM. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20251024123041.51254-5-kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 10 个月前 | |
qemu-img: add sub-command --remove-all to 'qemu-img bitmap' From time to time it is needed to remove all bitmaps from the image. Before this patch the process is not very convenient. One should perform qemu-img info and parse the output to obtain all names. After that one should sequentially call qemu-img bitmap --remove for each present bitmap. The patch adds --remove-all sub-command to 'qemu-img bitmap'. The new sub-command also composes with other bitmap actions in the same invocation, so a common "wipe and recreate" workflow can be expressed as qemu-img bitmap --remove-all --add NEW FILE instead of enumerating existing bitmaps, removing them one by one, and only then adding the fresh one. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Hanna Czenczek <hreitz@redhat.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Message-ID: <20260520235952.500250-1-den@openvz.org> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 3 个月前 | |
qemu-io: Add 'aio_discard' command Testing interactions between multiple requests that include discard requests require that qemu-io can do the discard asynchronously, like it already does for reads and writes. To this effect, add an 'aio_discard' command. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20260427170520.101242-3-kwolf@redhat.com> Reviewed-by: Denis V. Lunev <den@openvz.org> Tested-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 4 个月前 | |
qapi: Move include/qapi/qmp/ to include/qobject/ The general expectation is that header files should follow the same file/path naming scheme as the corresponding source file. There are various historical exceptions to this practice in QEMU, with one of the most notable being the include/qapi/qmp/ directory. Most of the headers there correspond to source files in qobject/. This patch corrects most of that inconsistency by creating include/qobject/ and moving the headers for qobject/ there. This also fixes MAINTAINERS for include/qapi/qmp/dispatch.h: scripts/get_maintainer.pl now reports "QAPI" instead of "No maintainers found". Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Acked-by: Halil Pasic <pasic@linux.ibm.com> #s390x Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20241118151235.2665921-2-armbru@redhat.com> [Rebased] | 1 年前 | |
qemu-keymap: Use Linux key codes QemuInputEvent now stores Linux key codes for key events. Use those codes directly instead of translating between internal key code representations. Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20260520-input-v3-27-7c9e4c7abe34@rsg.ci.i.u-tokyo.ac.jp> | 4 个月前 | |
nbd: Defer trace init until after daemonization At least the simple trace backend works by spawning a helper thread, and setting up an atexit() handler that coordinates completion with the helper thread. But since atexit registrations survive fork() but helper threads do not, this means that qemu-nbd configured to use the simple trace will deadlock waiting for a thread that no longer exists when it has daemonized. Better is to follow the example of vl.c: don't call any setup functions that might spawn helper threads until we are in the final process that will be doing the work worth tracing. Tested by configuring with --enable-trace-backends=simple, then running qemu-nbd --fork --trace=nbd_\*,file=qemu-nbd.trace -f raw -r README.rst followed by nbdinfo nbd://localhost, and observing that the trace file is now created without hanging. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-ID: <20250227220625.870246-2-eblake@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> | 1 年前 | |
Merge tag 'mips-20260707' of https://github.com/philmd/qemu into staging MIPS and SuperH patches queue - MIPS Octeon COP2 crypto opcodes - Fix for SH4 FIPR/FTRV vector math opcodes # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmpNQigACgkQ4+MsLN6t # wN5BHA//R59P7ivsi6dET3DDD6KgF5RLXRxa6uEqbFABUc0faXrSyDhBfoL4Bym5 # FTeFdNfOWgq+c5Rj9xSf51nmPCXyhxBFnXRhrGiAwyE0sLUZ5pli2uhQ81AaBpHT # ZtSjNt2pHTr+tIShtDOpaGNFcPyg2w1xGfTUKdlIUAmm7ibjx1qMr5ZKwnMKSMEO # 35SsFkPQaD2b8kInQeefnvs9Qgn50hQxYuY96EJzbNj4GL2pZe+LtKW1tmRDihhY # kMu4EXeXBsew0zPZ9EtGl6CTyE9kViOsH+aG5wxwtvSfTv40lSgLPbPyVJz2cVcN # wg+lzWs7e7+SFLCCnGJiM0PRdaD38KTpGdS7GRrRkgF/FjmpDGXIbWkaavNU2nQ9 # RZ5UAh+6J5LVdUleeBvJg/e5L2LNnpdFbc5YtdN3gAYoNezaUAapUgBKlbGqQ9x/ # MOS+XidI4uA9jtSv91IL2480vDdtDr2u9/K/lEq2ZFCAYRTHkFbnGOKpq0pzPu0l # voev2Xx4R+PNG7VadCJPkDIDUGVIhcjEHNr1ZuCa5SIQyDdgy5Bzh5WyCtgFtTyh # MEVyMkdUS9V94z+1A6XM7zK3r6xLdkn5RcIXhWmbgCHda2a5XlyqqgdP/ZQQzy7l # LyZH0Ji6XShbcwUDQXvRuvuzEfD05CAzFrUjSYrYhQsUWsV5FfM= # =WfqR # -----END PGP SIGNATURE----- # gpg: Signature made Tue 07 Jul 2026 20:15:04 CEST # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] # Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE * tag 'mips-20260707' of https://github.com/philmd/qemu: (23 commits) qemu-options: Do not list -enable-kvm on MIPS binaries target/sh4: fixup tcg for sh4 fipr/ftrv instructions tests/tcg/mips: cover Octeon QMAC instructions target/mips: add Octeon CvmCount RDHWR support target/mips: decode Octeon CHORD and LLM COP2 selectors target/mips: decode Octeon block-cipher COP2 selectors target/mips: decode Octeon ZUC and SNOW3G COP2 selectors target/mips: decode Octeon HSH and SHA3 COP2 selectors target/mips: decode Octeon CRC and GFM COP2 selectors target/mips: decode Octeon COP2 register selectors target/mips: add Octeon CHORD and LLM COP2 helpers target/mips: add Octeon HSH COP2 helpers target/mips: add Octeon Camellia COP2 helpers target/mips: add Octeon 3DES and KASUMI COP2 helpers target/mips: add Octeon SMS4 COP2 helpers target/mips: add Octeon AES COP2 helpers target/mips: add Octeon SNOW3G COP2 helpers target/mips: add Octeon ZUC COP2 helpers target/mips: add Octeon SHA3 COP2 helpers target/mips: add Octeon GFM COP2 helpers ... Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 2 个月前 | |
pc-bios: Move device tree files in their own subdir We have several device tree files already and may have more in the future so add a new dtb subdirectory and move device tree files there so they are not mixed with ROM binaries. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <57f179bd3904c1f2ca062ca4d4ff9592bb4f4daa.1745402140.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> | 1 年前 | |
sasl: remove comment about obsolete kerberos versions This is not relevant to any OS distro that QEMU currently targets. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> | 5 年前 | |
replication: move include out of root directory The replication.h file is included from migration/colo.c and tests/unit/test-replication.c, so it should be in include/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 5 年前 | |
run: introduce a script for running devel commands Various aspects of the development workflow are complicated by the need to set env variables ahead of time, or use specific paths. Meson provides a 'devenv' command that can be used to launch a command with a number of appropriate project specific environment variables preset. By default it will modify $PATH to point to any build directory that contains a binary built by the project. This further augments that to replicate the venv 'activate' script: * Add $BUILD_DIR/pyvenv/bin to $PATH * Set VIRTUAL_ENV to $BUILD_DIR/pyvenv And then makes functional tests more easily executable * Add $SRC_DIR/tests/functional and $SRC_DIR/python to $PYTHONPATH To see the benefits of this consider this command: $ source ./build/pyvenv/bin/activate $ ./scripts/qmp/qmp-shell-wrap ./build/qemu-system-x86_64 which is now simplified to $ ./build/run ./scripts/qmp/qmp-shell-wrap qemu-system-x86_64 [args..] This avoids the need repeat './build' several times and avoids polluting the current terminal's environment and/or avoids errors from forgetting to source the venv settings. As another example running functional tests $ export PYTHONPATH=./python:./tests/functional $ export QEMU_TEST_QEMU_BINARY=./build/qemu-system-x86_64 $ build/pyvenv/bin/python3 ./tests/functional/x86_64/test_virtio_version.py which is now simplified to $ export QEMU_TEST_QEMU_BINARY=qemu-system-x86_64 $ ./build/run ./tests/functional/x86_64/test_virtio_version.py This usefulness of this will be further enhanced with the pending removal of the QEMU python APIs from git, as that will require the use of the python venv in even more scenarios that today. The 'run' script does not let 'meson devenv' directly launch the command to be run because it always requires $BUILD_DIR as the current working directory. It is desired that 'run' script always honour the current working directory of the terminal that invokes is. Thus the '--dump' flag is used to export the devenv variables into the 'run' script's shell. This takes the liberty to assign 'run.in' to the "Build system" section in the MAINTAINERS file, given that it leverages meson's 'devenv' feature. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Link: https://lore.kernel.org/r/20251222113859.182395-1-berrange@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 8 个月前 | |
hw/riscv: Register generic riscv[32|64] QOM interfaces Defines generic 32- and 64-bit riscv machine interfaces for machines to implement. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20260520-hw-riscv-cpu-int-v3-1-d1123ea63d9c@rev.ng> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> | 3 个月前 | |
target-info: introduce TargetInfo in QOM For the single-binary, we want to be able to retrieve at runtime the current target among the different ones available. A consequence is that we can't rely on existing target_info() definition since it will create a conflict once more than one target is available. To solve this, we add TargetInfo in QOM, with this hierarchy. We define one class "target-info-X" per target, that inherits from abstract class "target-info". Using concrete vs abstract class ensure we can easily filter "target-info-X" from all QOM types. Associated TargetInfo is directly set through class initialization, without relying on any instance. For user mode, we simply define target_info() like it was done previously. In this patch, we keep the same definition for system-mode also, and it will be replaced in next commits. We will introduce detection of target from QOM, so we need to make sure those types are registered early. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/qemu-devel/20260514172303.1484273-4-pierrick.bouvier@oss.qualcomm.com Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> | 4 个月前 | |
target-info: Add target_riscv64() Adds a helper function to tell if the binary is targeting riscv64 or not. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20260520-hw-riscv-cpu-int-v3-7-d1123ea63d9c@rev.ng> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> | 3 个月前 | |
cpu: Better name cpu_single_step() trace event cpu_single_step() is not related to breakpoints. Rename the trace event. Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com> Message-ID: <20260705215729.62196-30-philmd@oss.qualcomm.com> | 2 个月前 | |
configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION version.rc can just use existing preprocessor symbols. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 5 年前 |
=========== QEMU README
QEMU is a generic and open source machine & userspace emulator and virtualizer.
QEMU is capable of emulating a complete machine in software without any need for hardware virtualization support. By using dynamic translation, it achieves very good performance. QEMU can also integrate with the Xen and KVM hypervisors to provide emulated hardware while allowing the hypervisor to manage the CPU. With hypervisor support, QEMU can achieve near native performance for CPUs. When QEMU emulates CPUs directly it is capable of running operating systems made for one machine (e.g. an ARMv7 board) on a different machine (e.g. an x86_64 PC board).
QEMU is also capable of providing userspace API virtualization for Linux and BSD kernel interfaces. This allows binaries compiled against one architecture ABI (e.g. the Linux PPC64 ABI) to be run on a host using a different architecture ABI (e.g. the Linux x86_64 ABI). This does not involve any hardware emulation, simply CPU and syscall emulation.
QEMU aims to fit into a variety of use cases. It can be invoked directly by users wishing to have full control over its behaviour and settings. It also aims to facilitate integration into higher level management layers, by providing a stable command line interface and monitor API. It is commonly invoked indirectly via the libvirt library when using open source applications such as oVirt, OpenStack and virt-manager.
QEMU as a whole is released under the GNU General Public License, version 2. For full licensing details, consult the LICENSE file.
Documentation
Documentation can be found hosted online at
<https://www.qemu.org/documentation/>. The documentation for the
current development version that is available at
<https://www.qemu.org/docs/master/> is generated from the docs/
folder in the source tree, and is built by Sphinx <https://www.sphinx-doc.org/en/master/>_.
Building
QEMU is multi-platform software intended to be buildable on all modern Linux platforms, OS-X, Win32 (via the Mingw64 toolchain) and a variety of other UNIX targets. The simple steps to build QEMU are:
.. code-block:: shell
mkdir build cd build ../configure make
Additional information can also be found online via the QEMU website:
<https://wiki.qemu.org/Hosts/Linux>_<https://wiki.qemu.org/Hosts/Mac>_<https://wiki.qemu.org/Hosts/W32>_
Submitting patches
The QEMU source code is maintained under the GIT version control system.
.. code-block:: shell
git clone https://gitlab.com/qemu-project/qemu.git
When submitting patches, one common approach is to use 'git
format-patch' and/or 'git send-email' to format & send the mail to the
qemu-devel@nongnu.org mailing list. All patches submitted must contain
a 'Signed-off-by' line from the author. Patches should follow the
guidelines set out in the style section <https://www.qemu.org/docs/master/devel/style.html>_ of
the Developers Guide.
Additional information on submitting patches can be found online via the QEMU website:
<https://wiki.qemu.org/Contribute/SubmitAPatch>_<https://wiki.qemu.org/Contribute/TrivialPatches>_
The QEMU website is also maintained under source control.
.. code-block:: shell
git clone https://gitlab.com/qemu-project/qemu-web.git
<https://www.qemu.org/2017/02/04/the-new-qemu-website-is-up/>_
A 'git-publish' utility was created to make above process less cumbersome, and is highly recommended for making regular contributions, or even just for sending consecutive patch series revisions. It also requires a working 'git send-email' setup, and by default doesn't automate everything, so you may want to go through the above steps manually for once.
For installation instructions, please go to:
<https://github.com/stefanha/git-publish>_
The workflow with 'git-publish' is:
.. code-block:: shell
$ git checkout master -b my-feature $ # work on new commits, add your 'Signed-off-by' lines to each $ git publish
Your patch series will be sent and tagged as my-feature-v1 if you need to refer back to it in the future.
Sending v2:
.. code-block:: shell
$ git checkout my-feature # same topic branch $ # making changes to the commits (using 'git rebase', for example) $ git publish
Your patch series will be sent with 'v2' tag in the subject and the git tip will be tagged as my-feature-v2.
Bug reporting
The QEMU project uses GitLab issues to track bugs. Bugs found when running code built from QEMU git or upstream released sources should be reported via:
<https://gitlab.com/qemu-project/qemu/-/issues>_
If using QEMU via an operating system vendor pre-built binary package, it is preferable to report bugs to the vendor's own bug tracker first. If the bug is also known to affect latest upstream code, it can also be reported via GitLab.
For additional information on bug reporting consult:
<https://wiki.qemu.org/Contribute/ReportABug>_
ChangeLog
For version history and release notes, please visit
<https://wiki.qemu.org/ChangeLog/>_ or look at the git history for
more detailed information.
Contact
The QEMU community can be contacted in a number of ways, with the two main methods being email and IRC:
<mailto:qemu-devel@nongnu.org>_<https://lists.nongnu.org/mailman/listinfo/qemu-devel>_- #qemu on irc.oftc.net
Information on additional methods of contacting the community can be found online via the QEMU website:
<https://wiki.qemu.org/Contribute/StartHere>_
项目介绍
Official QEMU mirror. Please see https://www.qemu.org/contribute/ for how to submit changes to QEMU. Pull Requests are disabled. Please only use release tarballs from the QEMU website.
定制我的领域