Re: [PATCH v2 16/21] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-08-15 Thread Nicholas Piggin
On Thu Aug 15, 2024 at 3:25 AM AEST, Alex Bennée wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Aug 14, 2024 at 04:05:34PM +1000, Nicholas Piggin wrote: > >> On Wed Aug 14, 2024 at 6:48 AM AEST, Michael S. Tsirkin wrote: > >> > On Tue, Aug 13, 2024 at 09:23:24PM +0100, Alex Bennée wrote: > >>

Re: [PATCH v3] hw/ppc: Implement -dtb support for PowerNV

2024-08-15 Thread Nicholas Piggin
On Tue Aug 13, 2024 at 11:45 PM AEST, Aditya Gupta wrote: > Currently any device tree passed with -dtb option in QEMU, was ignored > by the PowerNV code. > > Read and pass the passed -dtb to the kernel, thus enabling easier > debugging with custom DTBs. > > The existing behaviour when -dtb is 'not'

Re: [PATCH 1/6] contrib/plugins/execlog: fix warning

2024-08-15 Thread Thomas Huth
On 15/08/2024 01.36, Pierrick Bouvier wrote: Found on debian stable. ../contrib/plugins/execlog.c: In function ‘vcpu_tb_trans’: ../contrib/plugins/execlog.c:236:22: error: declaration of ‘n’ shadows a previous local [-Werror=shadow=local] 236 | for (int n = 0; n < all_reg_names->

Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host

2024-08-15 Thread Thomas Huth
On 15/08/2024 01.36, Pierrick Bouvier wrote: Found on debian stable (i386). ../contrib/plugins/cache.c: In function 'vcpu_tb_trans': ../contrib/plugins/cache.c:477:30: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 477 | effective_addr = (uint

Re: [PATCH 4/6] contrib/plugins/hotblocks: fix warning when compiling on 32bits host

2024-08-15 Thread Thomas Huth
On 15/08/2024 01.36, Pierrick Bouvier wrote: Found on debian stable (i386). ../contrib/plugins/hotblocks.c: In function 'vcpu_tb_trans': ../contrib/plugins/hotblocks.c:117:56: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 117 | cnt = (ExecCount *) g_

Re: [PATCH 3/6] contrib/plugins/hwprofile: fix warning when compiling on 32bits host

2024-08-15 Thread Thomas Huth
On 15/08/2024 01.36, Pierrick Bouvier wrote: Found on debian stable (i386). ../contrib/plugins/hwprofile.c: In function 'new_location': ../contrib/plugins/hwprofile.c:172:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 172 | g_hash_table_insert(tab

Re: [PATCH 2/5] hw/char/serial: Remove unused funtion

2024-08-15 Thread Mark Cave-Ayland
On 14/08/2024 22:38, BALATON Zoltan wrote: On Wed, 14 Aug 2024, Bernhard Beschow wrote: The serial port's frequency is set via the "baudbase" property nowadays. Please keep it as some devices might have registers that set this freq and this function will be needed for emulating that even if

Re: [PATCH 2/2] hw/char: sifive_uart: Print uart charecters async

2024-08-15 Thread Mark Cave-Ayland
On 15/08/2024 02:54, Alistair Francis wrote: The current approach of using qemu_chr_fe_write() and ignoring the return values results in dropped charecters [1]. Let's update the SiFive UART to use a async sifive_uart_xmit() function to transmit the charecters and apply back preassure to the gue

Re: [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines

2024-08-15 Thread Philippe Mathieu-Daudé
On 15/8/24 03:05, Richard Henderson wrote: Do not pass guest_base to the host mmap instead of zero hint. Cc: qemu-sta...@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2353 Signed-off-by: Richard Henderson FTR per https://lore.kernel.org/qemu-devel/6d425bd0-efd0-42ee-af3e

Re: [PATCH 1/1] linux-user: Preserve NULL hit in target_mmap subroutines

2024-08-15 Thread Peter Maydell
On Thu, 15 Aug 2024 at 02:07, Richard Henderson wrote: > > Do not pass guest_base to the host mmap instead of zero hint. > > Cc: qemu-sta...@nongnu.org > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2353 > Signed-off-by: Richard Henderson Typo in subject line: s/hit/hint/. -- PMM

Re: [PATCH v2 0/3] MIPS misc patches

2024-08-15 Thread Philippe Mathieu-Daudé
On 21/6/24 15:11, Jiaxun Yang wrote: Signed-off-by: Jiaxun Yang --- Changes in v2: - v1 was sent in mistake, b4 messed up with QEMU again - Link to v1: https://lore.kernel.org/r/20240621-loongson3-ipi-follow-v1-0-c6e73f2b2...@flygoat.com --- Jiaxun Yang (3): hw/mips/loongson3_virt: Stor

Re: [PATCH-for-9.1 0/4] linux-user/mips: Select correct CPUs

2024-08-15 Thread Philippe Mathieu-Daudé
On 14/8/24 15:39, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (4): linux-user/mips: Do not try to use removed R5900 CPU linux-user/mips: Select Octeon68XX CPU for Octeon binaries linux-user/mips: Select MIPS64R2-generic for Rel2 binaries linux-user/mips: Select Loongson CPU

Re: [PATCH-for-9.1 v4 0/3] target/mips: Use correct MMU index in get_pte()

2024-08-15 Thread Philippe Mathieu-Daudé
On 14/8/24 11:04, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (3): target/mips: Pass page table entry size as MemOp to get_pte() target/mips: Use correct MMU index in get_pte() target/mips: Load PTE as DATA Series queued.

Re: [PATCH 2/5] hw/char/serial: Remove unused funtion

2024-08-15 Thread Philippe Mathieu-Daudé
On 15/8/24 10:24, Mark Cave-Ayland wrote: On 14/08/2024 22:38, BALATON Zoltan wrote: On Wed, 14 Aug 2024, Bernhard Beschow wrote: The serial port's frequency is set via the "baudbase" property nowadays. Please keep it as some devices might have registers that set this freq and this function

Re: [PATCH v2 2/4] target/i386: fix build warning (gcc-12 -fsanitize=thread)

2024-08-15 Thread Thomas Huth
On 15/08/2024 00.41, Pierrick Bouvier wrote: Found on debian stable. ../target/i386/kvm/kvm.c: In function ‘kvm_handle_rdmsr’: ../target/i386/kvm/kvm.c:5345:1: error: control reaches end of non-void function [-Werror=return-type] 5345 | } | ^ ../target/i386/kvm/kvm.c: In function ‘kvm_

Re: [PATCH v2 1/4] meson: hide tsan related warnings

2024-08-15 Thread Thomas Huth
On 15/08/2024 00.41, Pierrick Bouvier wrote: When building with gcc-12 -fsanitize=thread, gcc reports some constructions not supported with tsan. Found on debian stable. qemu/include/qemu/atomic.h:36:52: error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Werror=tsan] 3

Re: [PATCH v2 1/4] meson: hide tsan related warnings

2024-08-15 Thread Peter Maydell
On Wed, 14 Aug 2024 at 23:42, Pierrick Bouvier wrote: > > When building with gcc-12 -fsanitize=thread, gcc reports some > constructions not supported with tsan. > Found on debian stable. > > qemu/include/qemu/atomic.h:36:52: error: ‘atomic_thread_fence’ is not > supported with ‘-fsanitize=thread’

Re: [PATCH v4] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-08-15 Thread Daniil Tatianin
Ping:) 17.07.2024, 10:58, "Daniil Tatianin" :On 5/29/24 6:27 PM, Philippe Mathieu-Daudé wrote:  On 29/5/24 16:34, Markus Armbruster wrote: Daniil Tatianin writes:  On 5/29/24 4:39 PM, Philippe Mathieu-Daudé wrote:  On 29/5/24 14:43, Daniil Tatianin wrote: On 5/29/24 3:36

Re: [PUSH 0/1] linux-user patch queue

2024-08-15 Thread Richard Henderson
gitlab.com/rth7680/qemu.git tags/pull-lu-20240815 for you to fetch changes up to 3aefee3ec01e607529a9918e2978f365c5c3b5e9: linux-user: Preserve NULL hit in target_mmap subroutines (2024-08-15 11:03:47 +1000) linux-user: Preserve N

Re: [PATCH v1 07/15] tcg/riscv: Implement vector mov/dup{m/i}

2024-08-15 Thread LIU Zhiwei
On 2024/8/14 17:11, Richard Henderson wrote: On 8/13/24 21:34, LIU Zhiwei wrote: @@ -641,6 +645,13 @@ static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg)   case TCG_TYPE_I64:   tcg_out_opc_imm(s, OPC_ADDI, ret, arg, 0);   break; +    case TCG_TYPE_

Re: [PATCH v2 1/4] meson: hide tsan related warnings

2024-08-15 Thread Daniel P . Berrangé
On Thu, Aug 15, 2024 at 11:12:39AM +0100, Peter Maydell wrote: > On Wed, 14 Aug 2024 at 23:42, Pierrick Bouvier > wrote: > > > > When building with gcc-12 -fsanitize=thread, gcc reports some > > constructions not supported with tsan. > > Found on debian stable. > > > > qemu/include/qemu/atomic.h:3

Re: [PATCH 0/6] build contrib/plugins using meson

2024-08-15 Thread Alex Bennée
Paolo Bonzini writes: > On Thu, Aug 15, 2024 at 1:37 AM Pierrick Bouvier > wrote: >> Contrib plugins have been built out of tree so far, thanks to a Makefile. >> However, it is quite inconvenient for maintenance, as we may break them, >> especially for specific architectures. >> >> First patches

[PATCH v7 7/7] rust: add PL011 device model

2024-08-15 Thread Manos Pitsidianakis
This commit adds a re-implementation of hw/char/pl011.c in Rust. How to build: 1. Configure a QEMU build with: --enable-system --target-list=aarch64-softmmu --enable-rust 2. Launching a VM with qemu-system-aarch64 should use the Rust version of the pl011 device Co-authored-by: Junjie Mao

[PATCH v7 6/7] rust: add crate to expose bindings and interfaces

2024-08-15 Thread Manos Pitsidianakis
Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and provides some declaration macros for symbols visible to the rest of QEMU. Co-authored-by: Junjie Mao Co-authored-by: Paolo Bonzini Signed-off-by: Junjie Mao Signed-off-by: Paolo Bonzini Signed-off-by: Manos Pitsidianakis

[PATCH v7 3/7] configure, meson: detect Rust toolchain

2024-08-15 Thread Manos Pitsidianakis
From: Paolo Bonzini Include the correct path and arguments to rustc in the native and cross files (native compilation is needed for procedural macros). Signed-off-by: Paolo Bonzini --- configure | 50 -- meson.build | 8 +++- 2 files chang

[PATCH v7 2/7] build-sys: Add rust feature option

2024-08-15 Thread Manos Pitsidianakis
Add rust feature in meson.build, configure, to prepare for adding Rust code in the followup commits. Signed-off-by: Manos Pitsidianakis --- MAINTAINERS | 5 + meson.build | 25 - Kconfig | 1 + Kconfig.host

[PATCH v7 1/7] Require meson version 1.5.0

2024-08-15 Thread Manos Pitsidianakis
From: Paolo Bonzini This is needed for Rust support. Signed-off-by: Paolo Bonzini --- meson.build| 2 +- python/scripts/vendor.py | 4 ++-- python/wheels/meson-1.2.3-py3-none-any.whl | Bin 964928 -> 0 bytes python/wheels/meson-1.5.0-py3-no

[PATCH v7 5/7] .gitattributes: add Rust diff and merge attributes

2024-08-15 Thread Manos Pitsidianakis
Set rust source code to diff=rust (built-in with new git versions) and merge=binary for Cargo.lock files (they should not be merged but auto-generated by cargo) Reviewed-by: Alex Bennée Reviewed-by: Zhao Liu Signed-off-by: Manos Pitsidianakis --- .gitattributes | 3 +++ 1 file changed, 3 inser

[PATCH v7 4/7] rust: add bindgen step as a meson dependency

2024-08-15 Thread Manos Pitsidianakis
Add bindings_rs target for generating rust bindings to target-independent qemu C APIs. The bindings need be created before any rust crate that uses them is compiled. The bindings.rs file will end up in BUILDDIR/bindings.rs and have the same name as a target: ninja bindings.rs Signed-off-by: P

[PATCH v7 0/7] Add Rust build support, ARM PL011 device impl

2024-08-15 Thread Manos Pitsidianakis
Changes === - Incorporated changes by Paolo Bonzini and Junjie Mao as a result of discussion on the previous patch series version - Included two squash patches from <20240814090820.1251026-1-junjie@intel.com> Junjie Mao (2): meson: subprojects: Specify Rust edition by rust_std=20

Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host

2024-08-15 Thread Alex Bennée
Thomas Huth writes: > On 15/08/2024 01.36, Pierrick Bouvier wrote: >> Found on debian stable (i386). >> ../contrib/plugins/cache.c: In function 'vcpu_tb_trans': >> ../contrib/plugins/cache.c:477:30: error: cast from pointer to integer of >> different size [-Werror=pointer-to-int-cast] >>477

Re: [PATCH 3/6] contrib/plugins/hwprofile: fix warning when compiling on 32bits host

2024-08-15 Thread Alex Bennée
Thomas Huth writes: > On 15/08/2024 01.36, Pierrick Bouvier wrote: >> Found on debian stable (i386). >> ../contrib/plugins/hwprofile.c: In function 'new_location': >> ../contrib/plugins/hwprofile.c:172:32: error: cast to pointer from integer >> of different size [-Werror=int-to-pointer-cast] >>

[PATCH] meson.build: Check for the availability of __attribute__((gcc_struct)) on MSYS2

2024-08-15 Thread Thomas Huth
Since quite a while MSYS2 now supports Clang as a compiler, too. Unfortunately, this compiler is lacking the __attribute__((gcc_struct)) that we need for compiling on Windows. But since the compiler is available now, some people started to use it to compile QEMU on MSYS2, apparently ignoring the co

[PATCH for-9.2] kvm: Use 'unsigned long' for request argument in functions wrapping ioctl()

2024-08-15 Thread Peter Maydell
From: Johannes Stoelp Change the data type of the ioctl _request_ argument from 'int' to 'unsigned long' for the various accel/kvm functions which are essentially wrappers around the ioctl() syscall. The correct type for ioctl()'s 'request' argument is confused: * POSIX defines the request argu

[PATCH for-9.2 0/2] accel/kvm: Fix two minor Coverity nits

2024-08-15 Thread Peter Maydell
This patchset fixes a couple of minor Coverity nits: * a can't-happen integer overflow when assigning from a long to an int in kvm_init_vcpu() * some unreachable code in kvm_dirty_ring_reaper_thread() Since there's no actual incorrect behaviour, these are 9.2 material. thanks -- PMM Peter M

[PATCH for-9.2 2/2] kvm: Remove unreachable code in kvm_dirty_ring_reaper_thread()

2024-08-15 Thread Peter Maydell
The code at the tail end of the loop in kvm_dirty_ring_reaper_thread() is unreachable, because there is no way for execution to leave the loop. Replace it with a g_assert_not_reached(). (The code has always been unreachable, right from the start when the function was added in commit b4420f198dd8.)

[PATCH for-9.2 1/2] kvm: Make 'mmap_size' be 'int' in kvm_init_vcpu(), do_kvm_destroy_vcpu()

2024-08-15 Thread Peter Maydell
In kvm_init_vcpu()and do_kvm_destroy_vcpu(), the return value from kvm_ioctl(..., KVM_GET_VCPU_MMAP_SIZE, ...) is an 'int', but we put it into a 'long' logal variable mmap_size. Coverity then complains that there might be a truncation when we copy that value into the 'int ret' which we use for re

[RFC PATCH 0/2] async: rework async event API for replay

2024-08-15 Thread Nicholas Piggin
Continuing the conversation from the thread about record/replay virtio fix. Here is a sketch of how we could improve the naming convention so users of bh don't have to know about record/replay. Thanks, Nick Nicholas Piggin (2): async: rework async event API for replay async: add debugging ass

[RFC PATCH 1/2] async: rework async event API for replay

2024-08-15 Thread Nicholas Piggin
Replace the functions replay_bh_schedule_event() and replay_bh_schedule_oneshot_event() with qemu_bh_schedule_event() and aio_bh_schedule_oneshot_event(), respectively. Signed-off-by: Nicholas Piggin --- docs/devel/replay.rst | 7 --- include/block/aio.h | 35 +

[RFC PATCH 2/2] async: add debugging assertions for record/replay in bh APIs

2024-08-15 Thread Nicholas Piggin
Code using old bh APIs should be updated to account for whether the bh is related to the target machine model or host QEMU operation, for record/replay to work properly. Add some assertions in the old APIs to catch unconverted code when record/replay is active. Some of the bh APIs like cancel and

Re: [PATCH for-9.2 1/2] kvm: Make 'mmap_size' be 'int' in kvm_init_vcpu(), do_kvm_destroy_vcpu()

2024-08-15 Thread Philippe Mathieu-Daudé
On 15/8/24 15:12, Peter Maydell wrote: In kvm_init_vcpu()and do_kvm_destroy_vcpu(), the return value from kvm_ioctl(..., KVM_GET_VCPU_MMAP_SIZE, ...) is an 'int', but we put it into a 'long' logal variable mmap_size. Typo "local". Coverity then complains that there might be a truncation wh

[PATCH for-9.2] hw/vfio/pci.c: Use correct type in trace_vfio_msix_early_setup()

2024-08-15 Thread Peter Maydell
The tracepoint trace_vfio_msix_early_setup() uses "int" for the type of the table_bar argument, but we use this to print a uint32_t. Coverity warns that this means that we could end up treating it as a negative number. We only use this in printing the value in the tracepoint, so mishandling it as

Removing python/qemu/qmp

2024-08-15 Thread John Snow
Hi Paolo, Let's discuss finally dropping the qemu.qmp lib out of qemu.git in favor of using the standalone package at https://gitlab.com/qemu-project/python-qemu-qmp/ To recap, the qemu.qmp lib offers only QMP tooling but no qapi bindings. I make a new release *about* once a year to accommodate n

Re: [PATCH v7 6/7] rust: add crate to expose bindings and interfaces

2024-08-15 Thread Philippe Mathieu-Daudé
Hi Manos, On 15/8/24 13:42, Manos Pitsidianakis wrote: Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and provides some declaration macros for symbols visible to the rest of QEMU. Co-authored-by: Junjie Mao Co-authored-by: Paolo Bonzini Signed-off-by: Junjie Mao Signed-

Re: [PATCH v2 9/9] Avocado tests: allow for parallel execution of tests

2024-08-15 Thread Cleber Rosa
On Mon, Aug 12, 2024 at 6:17 AM Thomas Huth wrote: > ... > > diff --git a/tests/Makefile.include b/tests/Makefile.include > > index 537804d101..545b5155f9 100644 > > --- a/tests/Makefile.include > > +++ b/tests/Makefile.include > > @@ -94,6 +94,9 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results > >

Re: [PULL v2 25/25] qga/linux: Add new api 'guest-network-get-route'

2024-08-15 Thread Peter Maydell
On Mon, 29 Jul 2024 at 10:35, Peter Maydell wrote: > > On Mon, 29 Jul 2024 at 08:40, Konstantin Kostiuk wrote: > > > > Hi Peter, > > > > How to see the full coverity report? In > > https://gitlab.com/qemu-project/qemu/-/artifacts, I see only job.log > > Do you expect to fix these errors for the

Re: Removing python/qemu/qmp

2024-08-15 Thread Philippe Mathieu-Daudé
On 15/8/24 15:58, John Snow wrote: Hi Paolo, Let's discuss finally dropping the qemu.qmp lib out of qemu.git in favor of using the standalone package at https://gitlab.com/qemu-project/python-qemu-qmp/ Thoughts? Lets schedule a call to dis

Re: [PATCH for-9.2] hw/vfio/pci.c: Use correct type in trace_vfio_msix_early_setup()

2024-08-15 Thread Philippe Mathieu-Daudé
On 15/8/24 15:52, Peter Maydell wrote: The tracepoint trace_vfio_msix_early_setup() uses "int" for the type of the table_bar argument, but we use this to print a uint32_t. Coverity warns that this means that we could end up treating it as a negative number. We only use this in printing the value

Re: Removing python/qemu/qmp

2024-08-15 Thread John Snow
On Thu, Aug 15, 2024, 10:18 AM Philippe Mathieu-Daudé wrote: > On 15/8/24 15:58, John Snow wrote: > > Hi Paolo, > > > > Let's discuss finally dropping the qemu.qmp lib out of qemu.git in favor > > of using the standalone package at > > https://gitlab.com/qemu-project/python-qemu-qmp/ > >

Re: [PATCH v2 16/21] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-08-15 Thread Michael S. Tsirkin
On Thu, Aug 15, 2024 at 05:12:32PM +1000, Nicholas Piggin wrote: > Could be a good idea. Although I'm not sure what to do with > all types, maybe we can restrict what is supported. > > > Is this wider re-factoring something that can wait for the next > > developer cycle? > > I would say so. It's

[PATCH for-9.2] accel/tcg: Remove dead code from rr_cpu_thread_fn()

2024-08-15 Thread Peter Maydell
The main loop in rr_cpu_thread_fn() can never terminate, so the code at the end of the function to clean up the RCU subsystem is dead code. Replace it with g_assert_not_reached(). (This is different from the other cpu_thread_fn for e.g. MTTCG or for the KVM accelerator -- those can exit, if the vC

Re: [PATCH 1/2] tests/avocado: exec_command should not consume console output

2024-08-15 Thread Thomas Huth
On 06/08/2024 01.28, Nicholas Piggin wrote: _console_interaction reads data from the console even when there is only an input string to send, and no output data to wait on. This can cause lines to be missed by wait_for_console_pattern calls that follows an exec_command. Fix this by not reading th

[PULL 07/21] target/i386: allow access_ptr to force slow path on failed probe

2024-08-15 Thread Alex Bennée
When we are using TCG plugin memory callbacks probe_access_internal will return TLB_MMIO to force the slow path for memory access. This results in probe_access returning NULL but the x86 access_ptr function happily accepts an empty haddr resulting in segfault hilarity. Check for an empty haddr to

[PULL 09/21] scripts/replay-dump.py: Update to current rr record format

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin The v12 format support for replay-dump has a few issues still. This fixes async decoding; adds event, shutdown, and end decoding; fixes audio in / out events, fixes checkpoint checking of following async events. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin Mess

[PULL 05/21] configure: Fix GDB version detection for GDB_HAS_MTE

2024-08-15 Thread Alex Bennée
From: Gustavo Romero The test gdbstub/test-mte.py requires a GDB version that supports the qIsAddressTagged packet. According to GDB NEWS [0], this packet was first made available in the GDB 15.1 release, not in 15.0, so this commit fixes it in configure. [0] https://www.sourceware.org/gdb/news/

Re: [PATCH] meson.build: Check for the availability of __attribute__((gcc_struct)) on MSYS2

2024-08-15 Thread Stefan Weil via
Am 15.08.24 um 14:27 schrieb Thomas Huth: Since quite a while MSYS2 now supports Clang as a compiler, too. Unfortunately, this compiler is lacking the __attribute__((gcc_struct)) that we need for compiling on Windows. But since the compiler is available now, some people started to use it to comp

[PULL 01/21] tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot

2024-08-15 Thread Alex Bennée
From: Philippe Mathieu-Daudé We disabled all RX tests on commit 9b45cc9931 ("docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS") for being flaky. However I don't recall the U-Boot test to fail (the problematic line checking the 'version' string is already commented out), and I'm run

[PULL 02/21] Makefile: trigger re-configure on updated pythondeps

2024-08-15 Thread Alex Bennée
If we add additional deps for meson we need to ensure we trigger a reconfigure to make sure everything is set up. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240813202329.1237572-3-alex.ben...@linaro.org> diff --git a/Makefile b/

[PULL for 9.1 00/21] Some fixes for 9.1-rc3 (build, replay, docs, plugins)

2024-08-15 Thread Alex Bennée
The following changes since commit b0d6c037ea0a825192285f149af72a73a1baaa04: Update version for v9.1.0-rc2 release (2024-08-15 20:32:37 +1000) are available in the Git repository at: https://gitlab.com/stsquad/qemu.git tags/pull-maintainer-9.1-rc3-150824-1 for you to fetch changes up to f39

[PULL 21/21] plugins: fix race condition with scoreboards

2024-08-15 Thread Alex Bennée
From: Pierrick Bouvier A deadlock can be created if a new vcpu (a) triggers a scoreboard reallocation, and another vcpu (b) wants to create a new scoreboard at the same time. In this case, (a) holds the plugin lock, and starts an exclusive section, waiting for (b). But at the same time, (b) is w

[PULL 08/21] buildsys: Fix building without plugins on Darwin

2024-08-15 Thread Alex Bennée
From: Philippe Mathieu-Daudé Since commit 0082475e26 the plugin symbol list is unconditionally added to the linker flags, leading to a build failure: Undefined symbols for architecture arm64: "_qemu_plugin_entry_code", referenced from: ... ld: symbol(s) not found for architect

[PULL 03/21] configure: Fix arch detection for GDB_HAS_MTE

2024-08-15 Thread Alex Bennée
From: Gustavo Romero GDB_HAS_MTE must only be set if GDB supports the aarch64 arch, so the test if "aarch64" string is present must be against GDB-related '$gdb_arches' variable and not against '$arch' variable. Signed-off-by: Gustavo Romero Message-Id: <20240804161850.2646299-2-gustavo.rom...@

[PULL 04/21] configure: Avoid use of param. expansion when using gdb_version

2024-08-15 Thread Alex Bennée
From: Gustavo Romero $gdb_version is now used in more than one conditional case and its usage in such cases may increase in the future. Therefore, avoid using shell parameter expansion when using it by setting gdb_version to its final form. Signed-off-by: Gustavo Romero Message-Id: <20240804161

[PULL 11/21] tests/avocado: excercise scripts/replay-dump.py in replay tests

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin This runs replay-dump.py after recording a trace, and fails the test if the script fails. replay-dump.py is modified to exit with non-zero if an error is encountered while parsing, to support this. Reviewed-by: Alex Bennée Reviewed-by: Pavel Dovgalyuk Signed-off-by: Nich

[PULL 19/21] docs: Fix some typos (found by typos) and grammar issues

2024-08-15 Thread Alex Bennée
From: Stefan Weil via Fix the misspellings of "overriden" also in code comments. Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Message-Id: <20240813125638.395461-1...@weilnetz.de> Reviewed-by: Peter Xu Reviewed-by: Eric Auger Signed-off-by: Alex Bennée Message-Id: <20240813202329.12

[PULL 14/21] tests/avocado: replay_kernel.py add x86-64 q35 machine test

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin The x86-64 pc machine is flaky with record/replay, but q35 is more stable. Add a q35 test to replay_kernel.py. Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Nicholas Piggin Message-Id: <20240813050638.446172-7-npig...@gmail.com> Signed-off-by: Alex Benné

[PULL 16/21] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin The regular qemu_bh_schedule() calls result in non-deterministic execution of the bh in record-replay mode, which causes replay failure. Reviewed-by: Alex Bennée Reviewed-by: Pavel Dovgalyuk Signed-off-by: Nicholas Piggin Message-Id: <20240813050638.446172-9-npig...@gmai

[PULL 15/21] chardev: set record/replay on the base device of a muxed device

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin chardev events to a muxed device don't get recorded because e.g., qemu_chr_be_write() checks whether the base device has the record flag set. This can be seen when replaying a trace that has characters typed into the console, an examination of the log shows they are not rec

[PULL 06/21] scripts/checkpatch: more checks on files imported from Linux

2024-08-15 Thread Alex Bennée
From: Stefano Garzarella If a file imported from Linux is touched, emit a warning and suggest using scripts/update-linux-headers.sh. Also check that updating imported files from Linux are not mixed with other changes, in which case emit an error. Signed-off-by: Stefano Garzarella Reviewed-by:

[PULL 12/21] replay: allow runstate shutdown->running when replaying trace

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin When replaying a trace, it is possible to go from shutdown to running with a reverse-debugging step. This can be useful if the problem being debugged triggers a reset or shutdown. This can be tested by making a recording of a machine that shuts down, then using -action shut

[PULL 10/21] scripts/replay-dump.py: rejig decoders in event number order

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin Sort decoder functions to be ascending in order of event number, same as the decoder tables. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin Message-Id: <20240813050638.446172-3-npig...@gmail.com> Signed-off-by: Alex Bennée Message-Id: <20240813202329.1237572-11-

Re: [PATCH v7 6/7] rust: add crate to expose bindings and interfaces

2024-08-15 Thread Manos Pitsidianakis
On Thu, 15 Aug 2024 17:01, Philippe Mathieu-Daudé wrote: Hi Manos, On 15/8/24 13:42, Manos Pitsidianakis wrote: Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and provides some declaration macros for symbols visible to the rest of QEMU. Co-authored-by: Junjie Mao Co-aut

[PULL 13/21] Revert "replay: stop us hanging in rr_wait_io_event"

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin This reverts commit 1f881ea4a444ef36a8b6907b0b82be4b3af253a2. That commit causes reverse_debugging.py test failures, and does not seem to solve the root cause of the problem x86-64 still hangs in record/replay tests. The problem with short-cutting the iowait that was taken

[PULL 20/21] docs/devel: update tcg-plugins page

2024-08-15 Thread Alex Bennée
From: Pierrick Bouvier Reflect recent changes on API (inline ops) and new plugins. Signed-off-by: Pierrick Bouvier Message-Id: <20240812231945.169310-1-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240813202329.1237572-21-alex.ben...@linaro.org> diff --git a/docs/abou

[PULL 17/21] virtio-net: Use virtual time for RSC timers

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin Receive coalescing is visible to the target machine, so its timers should use virtual time like other timers in virtio-net, to be compatible with record-replay. Signed-off-by: Nicholas Piggin Message-Id: <20240813050638.446172-10-npig...@gmail.com> Acked-by: Michael S. Tsi

[PULL 18/21] savevm: Fix load_snapshot error path crash

2024-08-15 Thread Alex Bennée
From: Nicholas Piggin An error path missed setting *errp, which can cause a NULL deref. Reviewed-by: Alex Bennée Signed-off-by: Nicholas Piggin Message-Id: <20240813050638.446172-11-npig...@gmail.com> Signed-off-by: Alex Bennée Message-Id: <20240813202329.1237572-19-alex.ben...@linaro.org> d

Re: [PATCH v7 6/7] rust: add crate to expose bindings and interfaces

2024-08-15 Thread Daniel P . Berrangé
On Thu, Aug 15, 2024 at 04:01:17PM +0200, Philippe Mathieu-Daudé wrote: > Hi Manos, > > On 15/8/24 13:42, Manos Pitsidianakis wrote: > > Add rust/qemu-api, which exposes rust-bindgen generated FFI bindings and > > provides some declaration macros for symbols visible to the rest of > > QEMU. > > >

Re: [PATCH] meson: add 'qemuutil' dependency for block.c

2024-08-15 Thread Thomas Huth
On 14/08/2024 12.00, Fiona Ebner wrote: The macro block_module_load() used by block.c is a wrapper around module_load(), which is implemented in util/module.c. Fixes linking for a future binary or downstream binary that does not depend on 'qemuutil' directly, but does depend on 'block'. Signed-

Re: [RFC PATCH 0/2] async: rework async event API for replay

2024-08-15 Thread Michael S. Tsirkin
On Thu, Aug 15, 2024 at 11:28:35PM +1000, Nicholas Piggin wrote: > Continuing the conversation from the thread about record/replay > virtio fix. Here is a sketch of how we could improve the naming > convention so users of bh don't have to know about record/replay. > > Thanks, > Nick The API looks

Re: [PATCH] meson: add 'qemuutil' dependency for block.c

2024-08-15 Thread Daniel P . Berrangé
On Wed, Aug 14, 2024 at 12:00:52PM +0200, Fiona Ebner wrote: > The macro block_module_load() used by block.c is a wrapper around > module_load(), which is implemented in util/module.c. > > Fixes linking for a future binary or downstream binary that does not > depend on 'qemuutil' directly, but doe

Re: [PATCH v2 9/9] Avocado tests: allow for parallel execution of tests

2024-08-15 Thread Thomas Huth
On 15/08/2024 16.08, Cleber Rosa wrote: On Mon, Aug 12, 2024 at 6:17 AM Thomas Huth wrote: ... diff --git a/tests/Makefile.include b/tests/Makefile.include index 537804d101..545b5155f9 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -94,6 +94,9 @@ TESTS_RESULTS_DIR=$(BUILD_

[RFC] Virtualizing tagged disaggregated memory capacity (app specific, multi host shared)

2024-08-15 Thread Jonathan Cameron
Introduction If we think application specific memory (including inter-host shared memory) is a thing, it will also be a thing people want to use with virtual machines, potentially nested. So how do we present it at the Host to VM boundary? This RFC is perhaps premature given we haven

Re: [PATCH RFC/RFT] vfio/pci-quirks: Quirk for ath wireless

2024-08-15 Thread Alex Williamson
On Tue, 13 Aug 2024 20:37:24 -0300 Jason Gunthorpe wrote: > On Tue, Aug 13, 2024 at 03:03:20PM -0600, Alex Williamson wrote: > > > How does the guest know to write a remappable vector format? How does > > the guest know the host interrupt architecture? For example why would > > an aarch64 gues

Re: [PATCH v7 0/7] Add Rust build support, ARM PL011 device impl

2024-08-15 Thread Peter Maydell
On Thu, 15 Aug 2024 at 12:42, Manos Pitsidianakis wrote: > Outstanding issues that are not blocking for merge are: > > - Cross-compilation for aarch64 is not possible out-of-the-box because of > this bug: > in llvm which when > fixed, must be

Re: [PATCH RFC/RFT] vfio/pci-quirks: Quirk for ath wireless

2024-08-15 Thread Jason Gunthorpe
On Thu, Aug 15, 2024 at 10:59:05AM -0600, Alex Williamson wrote: > > This is probably the only way to approach this, trap and emulate the > > places in the device that program additional interrupt sources and do > > a full MSI-like flow to set them up in the kernel. > > Your last sentence here se

Re: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host

2024-08-15 Thread Pierrick Bouvier
On 8/15/24 04:46, Alex Bennée wrote: Thomas Huth writes: On 15/08/2024 01.36, Pierrick Bouvier wrote: Found on debian stable (i386). ../contrib/plugins/cache.c: In function 'vcpu_tb_trans': ../contrib/plugins/cache.c:477:30: error: cast from pointer to integer of different size [-Werror=poin

Re: [PATCH 3/6] contrib/plugins/hwprofile: fix warning when compiling on 32bits host

2024-08-15 Thread Pierrick Bouvier
On 8/15/24 05:03, Alex Bennée wrote: Thomas Huth writes: On 15/08/2024 01.36, Pierrick Bouvier wrote: Found on debian stable (i386). ../contrib/plugins/hwprofile.c: In function 'new_location': ../contrib/plugins/hwprofile.c:172:32: error: cast to pointer from integer of different size [-Werr

Re: [PATCH 0/6] build contrib/plugins using meson

2024-08-15 Thread Pierrick Bouvier
On 8/15/24 04:42, Alex Bennée wrote: Paolo Bonzini writes: On Thu, Aug 15, 2024 at 1:37 AM Pierrick Bouvier wrote: Contrib plugins have been built out of tree so far, thanks to a Makefile. However, it is quite inconvenient for maintenance, as we may break them, especially for specific archit

Re: [PATCH v2 1/4] meson: hide tsan related warnings

2024-08-15 Thread Pierrick Bouvier
On 8/15/24 04:05, Daniel P. Berrangé wrote: On Thu, Aug 15, 2024 at 11:12:39AM +0100, Peter Maydell wrote: On Wed, 14 Aug 2024 at 23:42, Pierrick Bouvier wrote: When building with gcc-12 -fsanitize=thread, gcc reports some constructions not supported with tsan. Found on debian stable. qemu/i

Re: [PATCH v3] hw/ppc: Implement -dtb support for PowerNV

2024-08-15 Thread Cédric Le Goater
On 8/15/24 09:31, Nicholas Piggin wrote: On Tue Aug 13, 2024 at 11:45 PM AEST, Aditya Gupta wrote: Currently any device tree passed with -dtb option in QEMU, was ignored by the PowerNV code. Read and pass the passed -dtb to the kernel, thus enabling easier debugging with custom DTBs. The exist

Re: [PATCH v2 2/4] target/i386: fix build warning (gcc-12 -fsanitize=thread)

2024-08-15 Thread Pierrick Bouvier
On 8/14/24 15:47, Richard Henderson wrote: On 8/15/24 08:41, Pierrick Bouvier wrote: Found on debian stable. ../target/i386/kvm/kvm.c: In function ‘kvm_handle_rdmsr’: ../target/i386/kvm/kvm.c:5345:1: error: control reaches end of non-void function [-Werror=return-type] 5345 | } | ^

Re: [PATCH v2 1/4] meson: hide tsan related warnings

2024-08-15 Thread Peter Maydell
On Thu, 15 Aug 2024 at 12:05, Daniel P. Berrangé wrote: > > On Thu, Aug 15, 2024 at 11:12:39AM +0100, Peter Maydell wrote: > > On Wed, 14 Aug 2024 at 23:42, Pierrick Bouvier > > wrote: > > > > > > When building with gcc-12 -fsanitize=thread, gcc reports some > > > constructions not supported with

Re: [PATCH v2 1/4] meson: hide tsan related warnings

2024-08-15 Thread Pierrick Bouvier
On 8/15/24 02:50, Thomas Huth wrote: On 15/08/2024 00.41, Pierrick Bouvier wrote: When building with gcc-12 -fsanitize=thread, gcc reports some constructions not supported with tsan. Found on debian stable. qemu/include/qemu/atomic.h:36:52: error: ‘atomic_thread_fence’ is not supported with ‘-

Re: [PATCH v2 1/4] meson: hide tsan related warnings

2024-08-15 Thread Pierrick Bouvier
On 8/15/24 10:54, Peter Maydell wrote: On Thu, 15 Aug 2024 at 12:05, Daniel P. Berrangé wrote: On Thu, Aug 15, 2024 at 11:12:39AM +0100, Peter Maydell wrote: On Wed, 14 Aug 2024 at 23:42, Pierrick Bouvier wrote: When building with gcc-12 -fsanitize=thread, gcc reports some constructions no

Re: [PATCH 2/5] hw/char/serial: Remove unused funtion

2024-08-15 Thread Bernhard Beschow
Am 15. August 2024 09:26:38 UTC schrieb "Philippe Mathieu-Daudé" : >On 15/8/24 10:24, Mark Cave-Ayland wrote: >> On 14/08/2024 22:38, BALATON Zoltan wrote: >> >>> On Wed, 14 Aug 2024, Bernhard Beschow wrote: The serial port's frequency is set via the "baudbase" property nowadays. >>> >>>

Re: [PATCH 0/6] build contrib/plugins using meson

2024-08-15 Thread Pierrick Bouvier
On 8/14/24 23:00, Paolo Bonzini wrote: On Thu, Aug 15, 2024 at 1:37 AM Pierrick Bouvier wrote: Contrib plugins have been built out of tree so far, thanks to a Makefile. However, it is quite inconvenient for maintenance, as we may break them, especially for specific architectures. First patches

Re: [PATCH 0/6] build contrib/plugins using meson

2024-08-15 Thread Paolo Bonzini
On Thu, Aug 15, 2024 at 8:04 PM Pierrick Bouvier wrote: > > One argument from moving contrib/plugins to meson is that the Windows > > case depends on libqemu_plugin_api.a which is built with meson(*); > > that said, libqemu_plugin_api.a should be installed - which would > > justify it being used f

Re: [PATCH 1/2] hw/ppc: Consolidate e500 initial mapping creation functions

2024-08-15 Thread Bernhard Beschow
Am 16. Juli 2024 12:07:57 UTC schrieb BALATON Zoltan : >Add booke206_set_tlb() utility function and use it to replace very >similar create_initial_mapping functions in e500 machines. > >Signed-off-by: BALATON Zoltan >--- > hw/ppc/e500.c | 41 +++-- > h

Re: [PATCH 0/6] build contrib/plugins using meson

2024-08-15 Thread Peter Maydell
On Thu, 15 Aug 2024 at 19:38, Paolo Bonzini wrote: > > On Thu, Aug 15, 2024 at 8:04 PM Pierrick Bouvier > wrote: > > > One argument from moving contrib/plugins to meson is that the Windows > > > case depends on libqemu_plugin_api.a which is built with meson(*); > > > that said, libqemu_plugin_api

Re: [RFC V1 0/6] Live update: cpr-transfer

2024-08-15 Thread Peter Xu
On Sat, Jul 20, 2024 at 04:07:50PM -0400, Steven Sistare wrote: > > > The new user-visible interfaces are: > > >* cpr-transfer (MigMode migration parameter) > > >* cpr-uri (migration parameter) > > > > I wonder whether this parameter can be avoided already, maybe we can let > > cpr-transfe

  1   2   >