Re: [PATCH] migration: Ensure vmstate_save() sets errp

2024-10-15 Thread Peter Xu
On Tue, Oct 15, 2024 at 04:15:15PM +0200, Hanna Czenczek wrote: > migration/savevm.c contains some calls to vmstate_save() that are > followed by migrate_set_error() if the integer return value indicates an > error. migrate_set_error() requires that the `Error *` object passed to > it is set. The

Re: [PATCH] target/mips: Remove unused MEMOP_IDX() macro

2024-10-15 Thread Philippe Mathieu-Daudé
On 14/10/24 21:09, Richard Henderson wrote: On 10/14/24 16:22, Philippe Mathieu-Daudé wrote: MEMOP_IDX() is unused since commit 948f88661c6 ("target/mips: Use cpu_*_data_ra for msa load/store"), remove it. Signed-off-by: Philippe Mathieu-Daudé ---   target/mips/tcg/msa_helper.c | 8   1

Re: [PATCH] linux-user: Clean up unused header

2024-10-15 Thread Richard Henderson
On 10/15/24 07:09, Gustavo Romero wrote: Clean up unused (already commented-out) header from syscall.c. Signed-off-by: Gustavo Romero --- linux-user/syscall.c | 1 - 1 file changed, 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1354e75694..d1b0f7c5bb 100644 --

Re: [PATCH 0/3] target: Use tcg_constant_tl() instead of tcg_gen_movi_tl()

2024-10-15 Thread Philippe Mathieu-Daudé
On 4/10/24 17:26, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (3): target/mips: Use tcg_constant_tl() instead of tcg_gen_movi_tl() target/tricore: Use tcg_constant_tl() instead of tcg_gen_movi_tl() target/ppc: Use tcg_constant_tl() instead of tcg_gen_movi_tl() Series queued,

Re: [PATCH v3 0/2] gdbstub: Introduce ldtul_$endian_p() helpers

2024-10-15 Thread Philippe Mathieu-Daudé
On 10/10/24 14:52, Philippe Mathieu-Daudé wrote: Only unreviewed patches from v2: https://lore.kernel.org/qemu-devel/20241004163042.85922-1-phi...@linaro.org/ Philippe Mathieu-Daudé (2): exec/tswap: Massage target_needs_bswap() definition gdbstub/helpers: Introduce ldtul_$endian_p() helper

RE: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan

2024-10-15 Thread Salil Mehta via
Hi Igor, > From: Igor Mammedov > Sent: Tuesday, October 15, 2024 3:34 PM > To: Salil Mehta > > On Tue, 15 Oct 2024 09:41:24 + > Salil Mehta wrote: > > > HI Igor, > > > > > From: Igor Mammedov > > > Sent: Tuesday, October 15, 2024 10:31 AM > > > To: Salil Mehta > > > Cc:

Re: [PATCH] rust/wrapper.h: define memory_order enum

2024-10-15 Thread Paolo Bonzini
On 10/15/24 14:07, Manos Pitsidianakis wrote: Add stub definition of memory_order enum in wrapper.h. Creating Rust bindings from C code is done by passing the wrapper.h header to `bindgen`. This fails when library dependencies that use compiler headers are enabled, and the libclang that bindgen

RE: [PATCH v6] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-10-15 Thread Jamin Lin
Hi Cedric, > Subject: Re: [PATCH v6] hw/misc/aspeed_hace: Fix SG Accumulative hashing > > + Aspeed reviewers. Sorry about that. > > C. > > > On 10/11/24 07:38, Cédric Le Goater wrote: > > From: Alejandro Zeise > > > > Make the Aspeed HACE module use the new qcrypto accumulative hashing > > fu

[PATCH] testing: Enhance gdb probe script

2024-10-15 Thread Gustavo Romero
Use list and set comprehension to simplify code. Also, gently handle invalid gdb filenames. Signed-off-by: Gustavo Romero --- scripts/probe-gdb-support.py | 75 +++- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/scripts/probe-gdb-support.py b/scr

Re: [PATCH] hw/sd/sdcard: Allow user creation of eMMCs

2024-10-15 Thread Philippe Mathieu-Daudé
On 15/10/24 10:56, Jan Luebbe wrote: For testing eMMC-specific functionality (such as handling boot partitions), it would be very useful to attach them to generic VMs such as x86_64 via the sdhci-pci device: ... -drive if=none,id=emmc-drive,file=emmc.img,format=raw \ -device sdhci-pci \ -

Re: [PATCH] hw/sd/sdcard: Allow user creation of eMMCs

2024-10-15 Thread Cédric Le Goater
On 10/15/24 17:00, Philippe Mathieu-Daudé wrote: On 15/10/24 10:56, Jan Luebbe wrote: For testing eMMC-specific functionality (such as handling boot partitions), it would be very useful to attach them to generic VMs such as x86_64 via the sdhci-pci device:   ...   -drive if=none,id=emmc-drive,fi

Re: [PATCH] hw/sd/sdcard: Allow user creation of eMMCs

2024-10-15 Thread Daniel P . Berrangé
On Tue, Oct 15, 2024 at 05:17:26PM +0200, Cédric Le Goater wrote: > On 10/15/24 17:00, Philippe Mathieu-Daudé wrote: > > On 15/10/24 10:56, Jan Luebbe wrote: > > > For testing eMMC-specific functionality (such as handling boot > > > partitions), it would be very useful to attach them to generic VMs

Re: [PATCH] hw/sd/sdcard: Allow user creation of eMMCs

2024-10-15 Thread Cédric Le Goater
On 10/15/24 17:20, Daniel P. Berrangé wrote: On Tue, Oct 15, 2024 at 05:17:26PM +0200, Cédric Le Goater wrote: On 10/15/24 17:00, Philippe Mathieu-Daudé wrote: On 15/10/24 10:56, Jan Luebbe wrote: For testing eMMC-specific functionality (such as handling boot partitions), it would be very usef

[PULL 01/33] qemu/bswap: Undefine CPU_CONVERT() once done

2024-10-15 Thread Philippe Mathieu-Daudé
Better undefined macros once we are done with them, like we do few lines later with DO_STN_LDN_P(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20241003234211.53644-2-phi...@linaro.org> --- include/qemu/bswap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PULL 03/33] exec/memop: Remove unused memop_big_endian() helper

2024-10-15 Thread Philippe Mathieu-Daudé
Last use of memop_big_endian() was removed in commit 592134617c9 ("accel/tcg: Reorg system mode store helpers"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20241003234211.53644-3-phi...@linaro.org> --- include/exec/memop.h | 6 -- 1 file changed, 6 deletions

[PULL 05/33] target/alpha: Replace ldtul_p() -> ldq_p()

2024-10-15 Thread Philippe Mathieu-Daudé
The Alpha target is only built for 64-bit. Using ldtul_p() is pointless, replace by ldq_p(). Mechanical change doing: $ sed -i -e 's/ldtul_p/ldq_p/' $(git grep -wl ldtul_p target/alpha/) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241004163042.85922-4-

[PULL 04/33] target/hexagon: Replace ldtul_p() -> ldl_p()

2024-10-15 Thread Philippe Mathieu-Daudé
The Hexagon target is only built for 32-bit. Using ldtul_p() is pointless, replace by ldl_p(). Mechanical change doing: $ sed -i -e 's/ldtul_p/ldl_p/' \ $(git grep -wl ldtul_p target/hexagon/) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241004163

[PULL 07/33] target/alpha: Use explicit little-endian LD/ST API

2024-10-15 Thread Philippe Mathieu-Daudé
The Alpha architecture uses little endianness. Directly use the little-endian LD/ST API. Mechanical change using: $ end=le; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '(l

[PULL 00/33] Endianness cleanup patches for 2024-10-15

2024-10-15 Thread Philippe Mathieu-Daudé
gle-binary-20241015 for you to fetch changes up to 3e8f019be77d1b648bca0af0121da3bb37766509: hw/mips: Have mips_cpu_create_with_clock() take an endianness argument (2024-10-15 12:21:06 -0300) One checkpatch warning due to wide comment: WARNING: line over 80 characters #108: FILE: hw/i386/multi

[PULL 09/33] hw/i386: Use explicit little-endian LD/ST API

2024-10-15 Thread Philippe Mathieu-Daudé
The x86 architecture uses little endianness. Directly use the little-endian LD/ST API. Mechanical change using: $ end=le; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '(ld|

[PULL 10/33] target/avr: Use explicit little-endian LD/ST API

2024-10-15 Thread Philippe Mathieu-Daudé
The AVR architecture uses little endianness. Directly use the little-endian LD/ST API. Mechanical change using: $ end=le; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '(ld|

[PULL 06/33] gdbstub/helpers: Introduce ldtul_$endian_p() helpers

2024-10-15 Thread Philippe Mathieu-Daudé
Introduce ldtul_le_p() and ldtul_be_p() to use directly in place of ldtul_p() when a target endianness is fixed. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Acked-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20241010175246.15779-3-phi...@linaro.org> ---

[PULL 02/33] exec/tswap: Massage target_needs_bswap() definition

2024-10-15 Thread Philippe Mathieu-Daudé
Invert target_needs_bswap() comparison to match the COMPILING_PER_TARGET definition (2 lines upper). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20241010175246.15779-2-phi...@linaro.org> --- include/exec/tswap.h | 2 +- 1 file

[PULL 20/33] target/mips: Replace MO_TE by mo_endian_env() in get_pte()

2024-10-15 Thread Philippe Mathieu-Daudé
Replace compile-time MO_TE evaluation by runtime mo_endian_env() one, which expand target endianness from vCPU env. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-5-phi...@linaro.org> --- t

[PULL 25/33] target/mips: Remove unused MEMOP_IDX() macro

2024-10-15 Thread Philippe Mathieu-Daudé
MEMOP_IDX() is unused since commit 948f88661c6 ("target/mips: Use cpu_*_data_ra for msa load/store"), remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241014232235.51988-1-phi...@linaro.org> --- target/mips/tcg/msa_helper.c | 8 1 file chan

[PULL 08/33] target/hexagon: Use explicit little-endian LD/ST API

2024-10-15 Thread Philippe Mathieu-Daudé
The Hexagon architecture uses little endianness. Directly use the little-endian LD/ST API. Mechanical change using: $ end=le; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '

[PULL 13/33] target/tricore: Use explicit little-endian LD/ST API

2024-10-15 Thread Philippe Mathieu-Daudé
The TriCore architecture uses little endianness. Directly use the little-endian LD/ST API. Mechanical change using: $ end=le; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '

[PULL 22/33] target/mips: Factor mo_endian_rev() out of MXU code

2024-10-15 Thread Philippe Mathieu-Daudé
Instead of swapping the reversed target endianness using MO_BSWAP, directly return the correct endianness. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-7-phi...@linaro.org> --- target/mips/tcg/translate.h

[PULL 21/33] target/mips: Convert mips16e decr_and_load/store() macros to functions

2024-10-15 Thread Philippe Mathieu-Daudé
Functions are easier to rework than macros. Besides, there is no gain here in inlining these. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-6-phi...@linaro.org> --- target/mips/tcg/mips16e

[PULL 19/33] target/mips: Introduce mo_endian_env() helper

2024-10-15 Thread Philippe Mathieu-Daudé
Introduce mo_endian_env() which returns the endian MemOp corresponding to the vCPU env. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-4-phi...@linaro.org> --- target/mips/internal.h | 5 ++

[PULL 15/33] target/ppc: Use tcg_constant_tl() instead of tcg_gen_movi_tl()

2024-10-15 Thread Philippe Mathieu-Daudé
Directly use tcg_constant_tl() for constant integer, this save a call to tcg_gen_movi_tl() and a temp register. Inspired-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241004202621.4321-4-phi...@linaro.org> --- target/ppc/translate.c |

[PULL 14/33] target/tricore: Use tcg_constant_tl() instead of tcg_gen_movi_tl()

2024-10-15 Thread Philippe Mathieu-Daudé
Directly use tcg_constant_tl() for constant integer, this save a call to tcg_gen_movi_tl(). Inspired-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241004202621.4321-3-phi...@linaro.org> --- target/tricore/translate.c | 3 +-- 1 file c

[PULL 24/33] target/mips: Rename unused sysemu argument of OP_LD_ATOMIC()

2024-10-15 Thread Philippe Mathieu-Daudé
In commit 6d0cad12594 ("target/mips: Finish conversion to tcg_gen_qemu_{ld,st}_*") we renamed the argument of the user definition. Rename the system part for coherency. Since the argument is ignored, prefix with 'ignored_'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Mes

[PULL 18/33] target/mips: Rename cpu_is_bigendian() -> disas_is_bigendian()

2024-10-15 Thread Philippe Mathieu-Daudé
Methods using the 'cpu_' prefix usually take a (Arch)CPUState argument. Since this method takes a DisasContext argument, rename it as disas_is_bigendian(). Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-3-ph

[PULL 23/33] target/mips: Explode MO_TExx -> MO_TE | MO_xx

2024-10-15 Thread Philippe Mathieu-Daudé
Extract the implicit MO_TE definition in order to replace it by runtime variable in the next commit. Mechanical change using: $ for n in UW UL UQ UO SW SL SQ; do \ sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \ $(git grep -l MO_TE$n target/mips); \ done manually remove superfluous

[PULL 27/33] target/mips: Replace MO_TE by mo_endian()

2024-10-15 Thread Philippe Mathieu-Daudé
Replace compile-time MO_TE evaluation by runtime mo_endian() one, which expand target endianness from DisasContext. Mechanical change using: $ sed -i -e 's/MO_TE/mo_endian(ctx)/' \ $(git grep -l MO_TE target/mips) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Tested-by:

[PULL 30/33] target/mips: Use tcg_constant_tl() instead of tcg_gen_movi_tl()

2024-10-15 Thread Philippe Mathieu-Daudé
Directly use tcg_constant_tl() for constant integer, this save a call to tcg_gen_movi_tl(), often saving a temp register. Most of the places found using the following Coccinelle spatch script: @@ identifier tmp; constant val; @@ *TCGv tmp = tcg_temp_new(); ... *tcg_gen_

[PULL 33/33] hw/mips: Have mips_cpu_create_with_clock() take an endianness argument

2024-10-15 Thread Philippe Mathieu-Daudé
mips_cpu_create_with_clock() creates a vCPU. Pass it the vCPU endianness requested by argument. Update the board call sites. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-17-phi...@linaro.o

[PULL 16/33] hw/xtensa/xtfpga: Remove TARGET_BIG_ENDIAN #ifdef'ry

2024-10-15 Thread Philippe Mathieu-Daudé
Move code evaluation from preprocessor to compiler so both if() ladders are processed. Mostly style change. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Pierrick Bouvier Message-Id: <20240930073450.33195-8-phi...@linaro.org> --- hw/xtensa/xtfpga.c | 12 +++---

[PULL 12/33] target/loongarch: Use explicit little-endian LD/ST API

2024-10-15 Thread Philippe Mathieu-Daudé
The LoongArch architecture uses little endianness. Directly use the little-endian LD/ST API. Mechanical change using: $ end=le; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE

[PULL 29/33] target/mips: Use gen_op_addr_addi() when possible

2024-10-15 Thread Philippe Mathieu-Daudé
Replace tcg_gen_movi_tl() + gen_op_addr_add() by a single gen_op_addr_addi() call. gen_op_addr_addi() calls tcg_gen_addi_tl() which might optimize if the immediate is zero. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <2024101

[PULL 26/33] target/mips: Introduce mo_endian() helper

2024-10-15 Thread Philippe Mathieu-Daudé
Introduce mo_endian() which returns the endian MemOp corresponding to the vCPU DisasContext. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-10-phi...@linaro.org> --- target/mips/tcg/transla

[PULL 11/33] linux-user/i386: Use explicit little-endian LD/ST API

2024-10-15 Thread Philippe Mathieu-Daudé
The x86 architecture uses little endianness. Directly use the little-endian LD/ST API. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20241003234211.53644-4-phi...@linaro.org> Reviewed-by: Richard Henderson --- linux-user/i386/signal.c | 4 ++-- 1 file changed, 2 i

patchew no longer pushing patches to git branches

2024-10-15 Thread Peter Maydell
It looks like since a few months back patchew stopped pushing patches to git branches: eg https://patchew.org/QEMU/20240526204551.553282-1-richard.hender...@linaro.org/ from four months ago had a git branch created for it, but more recent patches in patchew's UI don't seem to have that. Did this

[PULL 17/33] target/mips: Declare mips_env_is_bigendian() in 'internal.h'

2024-10-15 Thread Philippe Mathieu-Daudé
In order to re-use cpu_is_bigendian(), declare it on "internal.h" after renaming it as mips_env_is_bigendian(). Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-2-phi...@linaro.org> --- targe

[PULL 28/33] target/mips: Have gen_addiupc() expand $pc during translation

2024-10-15 Thread Philippe Mathieu-Daudé
Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-12-phi...@linaro.org> --- target/mips/tcg/translate.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/target/mips/tcg/translate.c

[PULL 31/33] target/mips: Expose MIPSCPU::is_big_endian property

2024-10-15 Thread Philippe Mathieu-Daudé
Add the "big-endian" property and set the CP0C0_BE bit in CP0_Config0. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Reviewed-by: Richard Henderson Message-Id: <20241010215015.44326-15-phi...@linaro.org> --- target/mips/cpu.h | 3 +++ target/mips/cpu.c

[PULL 32/33] hw/mips/cps: Set the vCPU 'cpu-big-endian' property

2024-10-15 Thread Philippe Mathieu-Daudé
Have the CPS expose a 'cpu-big-endian' property so it can set it to the vCPUs it creates. Note, since the number of vCPUs created is dynamic, we can not use QOM aliases. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Tested-by: Jiaxun Yang Reviewed-by: Richard Henderson Message

Re: [PATCH 1/4] hw/net/lan9118: Extract lan9118_phy

2024-10-15 Thread Bernhard Beschow
Am 15. Oktober 2024 09:27:40 UTC schrieb Peter Maydell : >On Mon, 14 Oct 2024 at 19:50, Bernhard Beschow wrote: >> >> >> >> Am 14. Oktober 2024 12:47:52 UTC schrieb Peter Maydell >> : >> >> +typedef struct Lan9118PhyState { >> >> +uint32_t status; >> >> +uint32_t control; >> >> +u

Re: [PATCH v2 8/8] tests/unit/test-char: implement a few mux remove test cases

2024-10-15 Thread Roman Penyaev
Hi, On Tue, Oct 15, 2024, 10:50 Marc-André Lureau wrote: [cut] > qemu_chr_fe_deinit(&chr_be1, false); > > -qemu_chr_fe_deinit(&chr_be2, true); > > + > > +error = NULL; > > Unnecessary assignment, > > > +qmp_chardev_remove("mux-label", &error); > > +g_assert_cmpstr(error_get

Re: [PATCH] tests/qtest: Raise the ide-test timeout

2024-10-15 Thread Thomas Huth
On 15/10/2024 13.37, Peter Maydell wrote: The ide-test occasionally times out: on the system I run vm-build-openbsd on, it usually takes about 18 seconds, but occasionally hits the 60s timeout, likely when the host machine is under heavy load. I have also seen this test hit its time limit on the

Re: [PATCH] tests/qtest: Raise the ide-test timeout

2024-10-15 Thread Peter Maydell
On Tue, 15 Oct 2024 at 12:42, Thomas Huth wrote: > > On 15/10/2024 13.37, Peter Maydell wrote: > > The ide-test occasionally times out: on the system I run > > vm-build-openbsd on, it usually takes about 18 seconds, but > > occasionally hits the 60s timeout, likely when the host machine is > > und

[PATCH] hw/nvme: Remove references to PCI IRQ "pulsing" when asserting

2024-10-15 Thread julia
The NVMe subsystem logs "pulsing IRQ pin" when it is asserting the PCI(e) IRQ. This is confusing as it implies a short pulse, not the level-triggered interrupts PCI(e) uses. Also remove the pci_irq_pulse() function marked with FIXME as it is no longer used by any calls. Signed-off-by: julia ---

[PATCH 2/2] tests: correctly validate result buffer in hash/hmac tests

2024-10-15 Thread Daniel P . Berrangé
Validate that the pre-allocated buffer pointer was not overwritten by the hash/hmac APIs. Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-hash.c | 7 --- tests/unit/test-crypto-hmac.c | 6 -- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/unit/test-cryp

[PATCH 1/2] crypto/hash: avoid overwriting user supplied result pointer

2024-10-15 Thread Daniel P . Berrangé
If the user provides a pre-allocated buffer for the hash result, we must use that rather than re-allocating a new buffer. Reported-by: Dorjoy Chowdhury Signed-off-by: Daniel P. Berrangé --- crypto/hash-gcrypt.c | 15 --- crypto/hash-glib.c | 11 +-- crypto/hash-gnutls.c |

[PATCH 0/2] crypto: fix regression in hash result buffer handling

2024-10-15 Thread Daniel P . Berrangé
Daniel P. Berrangé (2): crypto/hash: avoid overwriting user supplied result pointer tests: correctly validate result buffer in hash/hmac tests crypto/hash-gcrypt.c | 15 --- crypto/hash-glib.c| 11 +-- crypto/hash-gnutls.c | 16

[PATCH] hw/block: m25p80: support RDID_90 for Winbond

2024-10-15 Thread Nikita Shubin
From: Nikita Shubin Make Winbond support RDID_90 as all winbond SPI NOR Flashes support Read Manufacturer/Device ID (90h) command. Signed-off-by: Nikita Shubin --- hw/block/m25p80.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index f712

Re: [PATCH v2] ui/console-vc: Silence warning about sprintf() on OpenBSD

2024-10-15 Thread Alex Bennée
Thomas Huth writes: > The linker on OpenBSD complains: > > ld: warning: console-vc.c:824 (../src/ui/console-vc.c:824)([...]): > warning: sprintf() is often misused, please use snprintf() > > Using g_strdup_printf() is certainly better here, so let's switch > to that function instead. > > Signed

[PATCH 1/2] tests: add 'rust' and 'bindgen' to CI package list

2024-10-15 Thread Daniel P . Berrangé
Although we're not enabling rust by default yet, we can still add rust and bindgen to the CI package list. This demonstrates that we're not accidentally triggering unexpected build behaviour merely from Rust being present. When we do dev work to enable rust by default, this will show we're buildin

[PATCH 0/2] ci: enable Rust in dockerfiles & enable in Fedora job

2024-10-15 Thread Daniel P . Berrangé
This validates that the Rust code is compatible with the current version of Rust in Fedora, as opposed to Rust nightly, as a step towards being able to demonstrate we can enable Rust by default. Rust is added to all other distros too, to demonstrate our build is not accidentally broken by mere exi

[PATCH] hw/riscv: Add Microblaze V 32bit virt board

2024-10-15 Thread Sai Pavan Boddu
Add a basic board with interrupt controller (intc), timer, serial (uartlite), small memory called LMB@0 (128kB) and DDR@0x8000 (configured via command line eg. -m 2g). This is basic configuration which matches HW generated out of AMD Vivado (design tools). But initial configuration is going bey

Re: [PATCH V1 0/4] Arch agnostic ACPI changes to support vCPU Hotplug (on Archs like ARM)

2024-10-15 Thread Miguel Luis
Hi Salil, I’ve ran the usual tests successfully of hotplug/unplug from the number of cold-booted cpus up to maxcpus and migration on ARM. Please feel free to add: Tested-by: Miguel Luis Thanks Miguel > On 14 Oct 2024, at 19:22, Salil Mehta wrote: > > Certain CPU architecture specifications

Re: [PATCH v2 4/6] target/riscv: Add support to record CTR entries.

2024-10-15 Thread Rajnesh Kanwal
Hi Jason, On Wed, Jun 26, 2024 at 4:49 AM Jason Chien wrote: > > Hi Rajnesh, > > On 2024/6/19 下午 11:27, Rajnesh Kanwal wrote: > > This commit adds logic to records CTR entries of different types > > and adds required hooks in TCG and interrupt/Exception logic to > > record events. > > > > This co

Re: tpm-tis-device-swtpm-test timeout

2024-10-15 Thread Stefan Berger
On 10/15/24 2:11 PM, Fabiano Rosas wrote: Hi Stefan, I see the tpm-tis-device-swtpm test timing out, could you take a look? qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-test time out (After 60.0 seconds) 135/138 qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-

[QEMU PATCH] hw/cxl/cxl-mailbox-util: Fix output buffer index update when retrieving DC extents

2024-10-15 Thread nifan . cxl
From: Fan Ni In the function of retrieving DC extents (cmd_dcd_get_dyn_cap_ext_list), the output buffer index was not correctly updated while iterating the extent list on the device, leaving the extents returned incorrect except for the first one. Fixes: 1c9221f19e ("hw/mem/cxl_type3: Add DC ext

Re: [PATCH v2] migration: Ensure vmstate_save() sets errp

2024-10-15 Thread Peter Xu
On Tue, Oct 15, 2024 at 07:04:37PM +0200, Hanna Czenczek wrote: > migration/savevm.c contains some calls to vmstate_save() that are > followed by migrate_set_error() if the integer return value indicates an > error. migrate_set_error() requires that the `Error *` object passed to > it is set. The

Re: tpm-tis-device-swtpm-test timeout

2024-10-15 Thread Fabiano Rosas
Stefan Berger writes: > On 10/15/24 2:11 PM, Fabiano Rosas wrote: >> Hi Stefan, >> >> I see the tpm-tis-device-swtpm test timing out, could you take a look? >> >> qemu:qtest+qtest-aarch64 / qtest-aarch64/tpm-tis-device-swtpm-test time out >> (After 60.0 seconds) >> 135/138 qemu:qtest+qtest-aar

Re: [PATCH] linux-user: Emulate /proc/self/maps under mmap_lock

2024-10-15 Thread Laurent Vivier
Le 14/10/2024 à 22:34, Ilya Leoshkevich a écrit : If one thread modifies the mappings and another thread prints them, a situation may occur that the printer thread sees a guest mapping without a corresponding host mapping, leading to a crash in open_self_maps_2(). Cc: qemu-sta...@nongnu.org Fixe

Re: [PATCH V4] virtio/vhost-user: fix qemu abort when hotunplug vhost-user-net device

2024-10-15 Thread Stefano Garzarella
On Fri, Oct 11, 2024 at 06:29:13PM +0800, yaozhenguo wrote: During the hot-unplugging of vhost-user-net type network cards, the vhost_user_cleanup function may add the same rcu node to the rcu linked list. The function call in this case is as follows: vhost_user_cleanup ->vhost_user_host_noti

Re: [PATCH v6] hw/misc/aspeed_hace: Fix SG Accumulative hashing

2024-10-15 Thread Cédric Le Goater
On 10/15/24 02:52, Andrew Jeffery wrote: On Sat, 2024-10-12 at 08:20 +0200, Cédric Le Goater wrote: + Aspeed reviewers. Sorry about that. All good. Seems sensible in concept and from a cursory glance, so if you want to tack it on: Acked-by: Andrew Jeffery Thanks Andrew, Now I wonder, if

Re: [PATCH v2 8/8] tests/unit/test-char: implement a few mux remove test cases

2024-10-15 Thread Marc-André Lureau
Hi On Mon, Oct 14, 2024 at 7:26 PM Roman Penyaev wrote: > > This patch tests: > > 1. feasibility of removing mux which does not have frontends attached >or frontends were prior detached. > 2. inability to remove mux which has frontends attached (mux is "busy") > > Signed-off-by: Roman Penyaev

[PULL 2/8] chardev/chardev-internal: remove unused `max_size` struct member

2024-10-15 Thread marcandre . lureau
From: Roman Penyaev Clean up forgotten leftovers. Signed-off-by: Roman Penyaev Cc: "Marc-André Lureau" Cc: qemu-devel@nongnu.org Reviewed-by: Marc-André Lureau Message-ID: <20241014152408.427700-3-r.peni...@gmail.com> --- chardev/chardev-internal.h | 1 - 1 file changed, 1 deletion(-) diff

[PULL 1/8] chardev/char: fix qemu_chr_is_busy() check

2024-10-15 Thread marcandre . lureau
From: Roman Penyaev `mux_cnt` struct member never goes negative or decrements, so mux chardev can be !busy only when there are no frontends attached. This patch fixes the always-true check. Fixes: a4afa548fc6d ("char: move front end handlers in CharBackend") Signed-off-by: Roman Penyaev Cc: "Ma

[PATCH] rust/wrapper.h: define memory_order enum

2024-10-15 Thread Manos Pitsidianakis
memory_order_seq_cst, +} memory_order; +#endif /* __CLANG_STDATOMIC_H */ + #include "qemu/osdep.h" #include "qemu/module.h" #include "qemu-io.h" --- base-commit: c155d13167c6ace099e351e28125f9eb3694ae27 change-id: 20241015-rust-wrapper-stdatomic-18d58292c243 -- γαῖα πυρί μιχθήτω

Re: [PATCH] tests/qtest: Raise the ide-test timeout

2024-10-15 Thread Peter Maydell
On Tue, 15 Oct 2024 at 13:01, Peter Maydell wrote: > If it is, it's one where it's intermittent whether it hits or not > (e.g. I grepped a bunch of my local logs for this test and there's > a lot of 18s and a 30s and a couple of 60s) and it tends to hit for > multiple tests in a single CI run when

[PATCH 02/16] meson: remove repeated search for rust_root_crate.sh

2024-10-15 Thread Paolo Bonzini
Avoid repeated lines of the form Program scripts/rust/rust_root_crate.sh found: YES (/home/pbonzini/work/upstream/qemu/scripts/rust/rust_root_crate.sh) in the meson logs. Signed-off-by: Paolo Bonzini --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.b

[PATCH 10/16] rust: introduce alternative implementation of offset_of!

2024-10-15 Thread Paolo Bonzini
offset_of! was stabilized in Rust 1.77.0. Use an alternative implemenation that was found on the Rust forums, and whose author agreed to license as MIT for use in QEMU. The alternative allows only one level of field access, but apart from this can be used just by replacing core::mem::offset_of! w

[PATCH 03/16] rust: pass rustc_args when building all crates

2024-10-15 Thread Paolo Bonzini
rustc_args is needed to smooth the difference in warnings between the various versions of rustc. Always include those arguments. Signed-off-by: Paolo Bonzini --- meson.build | 18 +++--- rust/qemu-api/meson.build | 2 +- rust/qemu-api/src/device_class.

[RFC PATCH 00/16] rust: allow older versions of rustc and bindgen

2024-10-15 Thread Paolo Bonzini
This includes a few fixes to the Rust build system machinery, and removes constructs that were added or stabilized after version 1.63.0: - "let else" (by patching bilge-impl, patch 4; stable in 1.65.0) - std::sync::OnceLock (patch 6; stable in 1.70.0) - core::ffi (patch 7; stable in 1.64.0) - c

[PATCH 15/16] rust: do not use --generate-cstr

2024-10-15 Thread Paolo Bonzini
--generate-cstr is a good idea and generally the right thing to do, but it is not available in Debian 12 and Ubuntu 22.04. Work around the absence. Signed-off-by: Paolo Bonzini --- meson.build | 4 +++- rust/hw/char/pl011/src/device.rs | 1 + rust/qemu-api/src/device_clas

[PATCH 12/16] rust: allow version 1.63.0 of rustc

2024-10-15 Thread Paolo Bonzini
All constructs introduced by newer versions of Rust have been removed. Signed-off-by: Paolo Bonzini --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 175b8d82228..0e279d245b4 100644 --- a/meson.build +++ b/meson.build @@ -76

[PATCH 09/16] rust: introduce a c_str macro

2024-10-15 Thread Paolo Bonzini
This allows CStr constants to be defined easily on Rust 1.63.0, while checking that there are no embedded NULs. c"" literals were only stabilized in Rust 1.77.0. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device.rs | 3 +- rust/hw/char/pl011/src/device_class.rs | 10 +++-- r

[PATCH 01/16] meson: import rust module into a global variable

2024-10-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build | 1 + rust/qemu-api-macros/meson.build | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c85f964bed4..c2e736d2051 100644 --- a/meson.build +++ b/meson.build @@ -15,6 +15,7 @@ me

[PATCH 08/16] rust: build tests for the qemu_api crate

2024-10-15 Thread Paolo Bonzini
Fix some bitrot in tests.rs, and allow the unit tests to be run via "meson test". Signed-off-by: Paolo Bonzini --- rust/qemu-api/meson.build | 3 +++ rust/qemu-api/src/tests.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rust/qemu-api/meson.build b/rust/qemu-api/meson.

[PATCH 05/16] rust: fix cfgs of proc-macro2 for 1.63.0

2024-10-15 Thread Paolo Bonzini
Replay the configuration that would be computed by build.rs when compiling on a 1.63.0 compiler. Signed-off-by: Paolo Bonzini --- subprojects/packagefiles/proc-macro2-1-rs/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/packagefiles/proc-macro2-1-rs

[PATCH 07/16] rust: use std::os::raw instead of core::ffi

2024-10-15 Thread Paolo Bonzini
core::ffi::c_* types were introduced in Rust 1.64.0. Use the older types in std::os::raw, which are now aliases of the types in core::ffi. There is no need to compile QEMU as no_std, so this is acceptable as long as we support a version of Debian with Rust 1.63.0. Signed-off-by: Paolo Bonzini -

[PATCH 11/16] rust: do not use MaybeUninit::zeroed()

2024-10-15 Thread Paolo Bonzini
MaybeUninit::zeroed() is handy, but it introduces unsafe (and has a pretty heavy syntax in general) and anyway it is not available as a "const" function until Rust 1.75.0. Introduce a trait that provides the same functionality while staying within safe Rust. In the future we may want to add autom

[PATCH 04/16] rust: patch bilge-impl to allow compilation with 1.63.0

2024-10-15 Thread Paolo Bonzini
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. Signed-off-by: Paolo Bonzini --- .gitattributes| 2 + subprojects/bilge-impl-0.2-rs.wrap

[PATCH 16/16] rust: allow older version of bindgen

2024-10-15 Thread Paolo Bonzini
Cope with the old version that is provided in Debian 12 and Ubuntu 22.04. --size_t-is-usize is needed on bindgen <0.61.0 (Debian 12, Ubuntu 22.04), and it was removed in bindgen 0.65.0, so check for it in meson.build. Signed-off-by: Paolo Bonzini --- meson.build | 6 +- 1 file changed, 5 ins

[PATCH 06/16] rust: do not use OnceLock for properties

2024-10-15 Thread Paolo Bonzini
Properties are initialized lazily but always accessed within the big QEMU lock. There is no need to have a OnceLock around them, and also OnceCell/OnceLock were only stabilized in 1.70.0; so remove it. Signed-off-by: Paolo Bonzini --- rust/qemu-api/src/device_class.rs | 13 +++-- 1 file

[PATCH 13/16] rust: do not use TYPE_CHARDEV unnecessarily

2024-10-15 Thread Paolo Bonzini
In the invocation of qdev_prop_set_chr(), "chardev" is the name of a property rather than a type and has to match the name of the property in device_class.rs. Do not use TYPE_CHARDEV here, just like in the C version of pl011_create. Signed-off-by: Paolo Bonzini --- rust/hw/char/pl011/src/device

[PATCH 14/16] rust: do not use --no-size_t-is-usize

2024-10-15 Thread Paolo Bonzini
This not necessary, and adds an extra cast since size_of and align_of already return the right type. Signed-off-by: Paolo Bonzini --- meson.build | 1 - rust/qemu-api/src/definitions.rs | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/meson.build b/

[PATCH] hw/net: Extend ethernetlite driver with PHY layer

2024-10-15 Thread Sai Pavan Boddu
From: Michal Simek Add missing optional MDIO lines. Without it U-Boot is not working. Signed-off-by: Edgar E. Iglesias Signed-off-by: Michal Simek --- hw/net/xilinx_ethlite.c | 240 1 file changed, 240 insertions(+) diff --git a/hw/net/xilinx_ethlite.

Re: [PATCH 1/4] hw/net/lan9118: Extract lan9118_phy

2024-10-15 Thread Peter Maydell
On Mon, 14 Oct 2024 at 19:50, Bernhard Beschow wrote: > > > > Am 14. Oktober 2024 12:47:52 UTC schrieb Peter Maydell > : > >> +typedef struct Lan9118PhyState { > >> +uint32_t status; > >> +uint32_t control; > >> +uint32_t advertise; > >> +uint32_t ints; > >> +uint32_t int_mask

Re: [PULL 00/20] UI patches

2024-10-15 Thread Peter Maydell
On Mon, 14 Oct 2024 at 14:39, wrote: > > From: Marc-André Lureau > > The following changes since commit 3860a2a8de56fad71db42f4ad120eb7eff03b51f: > > Merge tag 'pull-tcg-20241013' of https://gitlab.com/rth7680/qemu into > staging (2024-10-14 11:12:34 +0100) > > are available in the Git reposit

Re: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan

2024-10-15 Thread Igor Mammedov
On Mon, 14 Oct 2024 20:05:58 + Salil Mehta wrote: > Hi Igor, > > > From: qemu-devel-bounces+salil.mehta=huawei@nongnu.org > devel-bounces+salil.mehta=huawei@nongnu.org> On Behalf Of Igor > > Mammedov > > Sent: Monday, October 14, 2024 10:38 AM > > > > On Mon, 14 Oct 2024 16:5

RE: [PULL v2 40/61] hw/acpi: Update GED _EVT method AML with CPU scan

2024-10-15 Thread Salil Mehta via
Hi Bibo, > From: maobibo > Sent: Tuesday, October 15, 2024 2:20 AM > To: Salil Mehta ; qemu-devel@nongnu.org > > Hi Salil, > > On 2024/10/15 上午3:59, Salil Mehta wrote: > > Hi Bibo, > > > >> From: maobibo > >> Sent: Monday, October 14, 2024 9:53 AM > >> To: qemu-devel@nongnu.o

Re: [PATCH v2] plugins: fix qemu_plugin_reset

2024-10-15 Thread Robbin Ehn
On Tue, Oct 15, 2024 at 2:38 AM Pierrick Bouvier wrote: > > 34e5e1 refactored the plugin context initialization. After this change, > tcg_ctx->plugin_insn is not reset inconditionnally anymore, but only if > one plugin at least is active. > > When uninstalling the last plugin active, we stopped re

Re: [PATCH v2 2/3] target/i386: Use probe_access_full_mmu in ptw_translate

2024-10-15 Thread Alex Bennée
Richard Henderson writes: > The probe_access_full_mmu function was designed for this purpose, > and does not report the memory operation event to plugins. > > Cc: qemu-sta...@nongnu.org > Fixes: 6d03226b422 ("plugins: force slow path when plugins instrument memory > ops") > Signed-off-by: Richar

Re: [PATCH] ui/console-vc: Silence warning about sprintf() on OpenBSD

2024-10-15 Thread Daniel P . Berrangé
On Mon, Oct 14, 2024 at 10:50:44PM +0300, Michael Tokarev wrote: > On 14.10.2024 18:15, Daniel P. Berrangé wrote: > > > These two lines are the only place in the code that uses the > > > > char response[40]; > > > > so even better than switching to snprintf, how about just taking > > buffer

  1   2   3   >