[PATCH 1/5] migration/multifd: Separate compression ops from non-compression

2024-01-26 Thread Fabiano Rosas
For multifd we currently choose exclusively between migration using compression or migration without compression. The compression method is chosen via the multifd_compression parameter (none, zlib, zstd). We've been using the 'none' value to mean the regular socket migration. Rename the

[PATCH 4/5] migration/multifd: Simplify zero copy send

2024-01-26 Thread Fabiano Rosas
During the multifd send phase, the multifd packet header is included as the first element of the iovec, except in the special case of a socket migration with zero copy enabled. In that case the packet header is sent separately. To avoid the first position of the iovec being empty, we play with the

[PATCH 0/5] migration/multifd: Prerequisite cleanups for ongoing work

2024-01-26 Thread Fabiano Rosas
Hi, Here are two cleanups that are prerequiste for the fixed-ram work, but also affect the other series on the list at the moment, so I want to make sure it works for everyone: 1) Separate multifd_ops from compression. The multifd_ops are currently coupled with the multifd_compression

[PATCH 3/5] migration/multifd: Add multifd_ops->send

2024-01-26 Thread Fabiano Rosas
The zero page feature is not supported by the compression methods. It is exclusive to the socket migration. Add a 'send' hook so we can move that complexity into a multifd_socket_send() function. Signed-off-by: Fabiano Rosas --- migration/multifd-zlib.c | 10 ++ migration/multifd-zstd.c

[PATCH 5/5] migration/multifd: Move zero copy flag into multifd_socket_setup

2024-01-26 Thread Fabiano Rosas
The generic multifd save setup code should not be responsible for deciding how the client code is going to send the data. Since the zero copy feature is supported only by the socket migration, move the setting of the flag into the socket specific function. Signed-off-by: Fabiano Rosas ---

[PATCH 2/5] migration/multifd: Move multifd_socket_ops to socket.c

2024-01-26 Thread Fabiano Rosas
Code movement only. Signed-off-by: Fabiano Rosas --- migration/multifd.c | 59 --- migration/multifd.h | 2 ++ migration/socket.c | 61 - 3 files changed, 62 insertions(+), 60 deletions(-) diff --git

Re: [PATCH v4 4/4] hw/misc/pvpanic: add support for normal shutdowns

2024-01-26 Thread Alejandro Jimenez
Hi Thomas, On 1/7/24 09:05, Thomas Weißschuh wrote: Shutdown requests are normally hardware dependent. By extending pvpanic to also handle shutdown requests, guests can submit such requests with an easily implementable and cross-platform mechanism. Signed-off-by: Thomas Weißschuh ---

Re: Re: [PATCH v4 4/4] hw/misc/pvpanic: add support for normal shutdowns

2024-01-26 Thread Thomas Weißschuh
Hi Alejandro, On 2024-01-26 13:47:33-0500, Alejandro Jimenez wrote: > On 1/7/24 09:05, Thomas Weißschuh wrote: > > Shutdown requests are normally hardware dependent. > > By extending pvpanic to also handle shutdown requests, guests can > > submit such requests with an easily implementable and

[PATCH v2 03/23] bulk: Call in place single use cpu_env()

2024-01-26 Thread Philippe Mathieu-Daudé
Avoid CPUArchState local variable when cpu_env() is used once. Mechanical patch using the following Coccinelle spatch script: @@ type CPUArchState; identifier env; expression cs; @@ { -CPUArchState *env = cpu_env(cs); ... when != env - env + cpu_env(cs) ... when

Re: hexagon: modeling a shared lock state

2024-01-26 Thread Richard Henderson
On 1/26/24 02:28, Brian Cain wrote: static void do_hwlock(CPUHexagonState *env, bool *lock) { bql_lock(); if (*lock) { env->hwlock_pending = true; cs->halted = true; cs->exception_index = EXCP_HALTED; bql_unlock(); cpu_loop_exit(cs);

[PATCH 0/3] Add device DM163 (led driver, matrix colors shield & display)

2024-01-26 Thread Inès Varhol
This device implements the IM120417002 colors shield v1.1 for Arduino (which relies on the DM163 8x3-channel led driving logic) and features a simple display of an 8x8 RGB matrix. This color shield can be plugged on the Arduino board (or the B-L475E-IOT01A board) to drive an 8x8 RGB led matrix.

[PATCH 2/3] hw/arm : Connect DM163 to STM32L4x5

2024-01-26 Thread Inès Varhol
Signed-off-by: Arnaud Minier Signed-off-by: Inès Varhol --- hw/arm/Kconfig | 1 + hw/arm/stm32l4x5_soc.c | 55 +- include/hw/arm/stm32l4x5_soc.h | 3 ++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/hw/arm/Kconfig

[PATCH 3/3] tests/qtest : Add testcase for DM163

2024-01-26 Thread Inès Varhol
`test_dm163_bank()` Checks that the pin "sout" of the DM163 led driver outputs the values received on pin "sin" with the expected latency (depending on the bank). `test_dm163_gpio_connection()` Check that changes to relevant STM32L4x5 GPIO pins are prpagated to the DM163 device. Signed-off-by:

[PATCH 1/3] hw/display : Add device DM163

2024-01-26 Thread Inès Varhol
This device implements the IM120417002 colors shield v1.1 for Arduino (which relies on the DM163 8x3-channel led driving logic) and features a simple display of an 8x8 RGB matrix. The columns of the matrix are driven by the DM163 and the rows are driven externally. Signed-off-by: Arnaud Minier

Re: [PATCH v6 0/4] accel/tcg: Move perf and debuginfo support to tcg

2024-01-26 Thread Richard Henderson
On 1/25/24 15:46, Philippe Mathieu-Daudé wrote: Since v5: - Use v4 instead of v3... - Rebased on commit 53e8868d69 ("meson: remove OS definitions from config_targetos") Ilya Leoshkevich (4): accel/tcg: Make use of qemu_target_page_mask() in perf.c tcg: Make tb_cflags() usable from

[PATCH v2 18/23] target/rx: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/rx/gdbstub.c | 6 ++ target/rx/helper.c| 6 ++ target/rx/translate.c | 3 +-- 3 files changed, 5 insertions(+), 10

[PATCH v2 17/23] target/riscv: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/arch_dump.c | 6 ++ target/riscv/cpu.c | 17 + target/riscv/cpu_helper.c | 14 --

[PATCH v2 11/23] target/m68k: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/m68k/cpu.c | 30 ++ target/m68k/gdbstub.c | 6 ++ target/m68k/helper.c| 3 +--

[PATCH v2 06/23] target/avr: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/avr/cpu.c | 27 +++ target/avr/gdbstub.c | 6 ++ target/avr/helper.c | 10 +++--- 3 files changed,

[PATCH v2 19/23] target/s390x: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/cpu-dump.c| 3 +-- target/s390x/gdbstub.c | 6 ++ target/s390x/helper.c | 3 +--

Re: [PATCH v2 1/2] target/s390x: Emulate CVDG

2024-01-26 Thread Richard Henderson
On 1/25/24 22:29, Ilya Leoshkevich wrote: CVDG is the same as CVD, except that it converts 64 bits into 128, rather than 32 into 64. Create a new helper, which uses Int128 wrappers. Reported-by: Ido Plat Signed-off-by: Ilya Leoshkevich --- target/s390x/helper.h| 1 +

[PATCH v2 00/23] hw, target: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Use cpu_env() -- which is fast path -- when possible. Bulk conversion using Coccinelle spatch (script included). Since v1: - Avoid CPU() cast (Paolo) - Split per targets (Thomas) Philippe Mathieu-Daudé (23): hw/acpi/cpu: Use CPUState typedef scripts/coccinelle: Add cpu_env.cocci_template

[PATCH v2 01/23] hw/acpi/cpu: Use CPUState typedef

2024-01-26 Thread Philippe Mathieu-Daudé
QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé --- include/hw/acpi/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/acpi/cpu.h b/include/hw/acpi/cpu.h

[PATCH v2 21/23] target/tricore: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/cpu.c | 20 target/tricore/gdbstub.c | 6 ++ target/tricore/helper.c| 3 +--

Re: [PATCH 2/2] bulk: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
On 26/1/24 18:09, Thomas Huth wrote: On 25/01/2024 17.56, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé ---   114 files changed, 273 insertions(+), 548

[PATCH v2 22/23] target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/dbg_helper.c | 3 +-- target/xtensa/exc_helper.c | 3 +-- target/xtensa/gdbstub.c| 6 ++ target/xtensa/helper.c | 9

[PATCH v2 10/23] target/i386: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/vmx.h | 13 +++--- hw/i386/vmmouse.c | 6 ++--- hw/i386/xen/xen-hvm.c | 3

[PATCH v2 16/23] target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/mpc8544_guts.c | 3 +-- hw/ppc/pnv.c | 3 +-- hw/ppc/pnv_xscom.c| 5 + hw/ppc/ppce500_spin.c

[PATCH v2 20/23] target/sh4: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/cpu.c | 15 +-- target/sh4/gdbstub.c | 6 ++ target/sh4/helper.c| 11 +++

[PATCH v2 23/23] target/sparc: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/cpu.c | 14 -- target/sparc/gdbstub.c | 3 +-- target/sparc/int32_helper.c | 3 +--

[PATCH v2 04/23] target/alpha: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/alpha/cpu.c| 31 +++ target/alpha/gdbstub.c| 6 ++ target/alpha/helper.c | 12

Re: [PULL 00/17] aspeed queue

2024-01-26 Thread Ninad Palsule
' of https://repo.or.cz/qemu/armbru into staging (2024-01-26 10:21:27 +) are available in the Git repository at:    https://github.com/legoater/qemu/ tags/pull-aspeed-20240126 for you to fetch changes up to b40769f4b49d15485ffaaa7acade3e3593ee6daa:    hw/fsi: Update MAINTAINER list (2024-01-26

[PATCH] target/arm: Reinstate "vfp" property on AArch32 CPUs

2024-01-26 Thread Peter Maydell
In commit 4315f7c614743 we restructured the logic for creating the VFP related properties to avoid testing the aa32_simd_r32 feature on AArch64 CPUs. However in the process we accidentally stopped exposing the "vfp" QOM property on AArch32 TCG CPUs. This mostly hasn't had any ill effects because

Re: spapr watchdog vs watchdog_perform_action() / QMP watchdog-set-action

2024-01-26 Thread Markus Armbruster
Peter Maydell writes: > Hi; one of the "bitesized tasks" we have listed is to convert > watchdog timers which directly call qemu_system_reset_request() on > watchdog timeout to call watchdog_perform_action() instead. This > means they honour the QMP commands that let the user specifiy > the

[PATCH v2 13/23] target/mips: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.c | 11 +++--- target/mips/gdbstub.c | 6 ++ target/mips/kvm.c

[PATCH v2 08/23] target/hppa: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/hppa/cpu.c| 8 ++-- target/hppa/int_helper.c | 8 ++-- target/hppa/mem_helper.c | 3 +-- 3 files changed, 5

[PATCH v2 07/23] target/cris: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/cris/cpu.c | 5 + target/cris/gdbstub.c | 9 +++-- target/cris/helper.c| 12 target/cris/translate.c

[PATCH v2 14/23] target/nios2: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/nios2/cpu.c| 15 +++ target/nios2/helper.c | 3 +-- target/nios2/nios2-semi.c | 6 ++ 3 files changed, 6

[PATCH v2 12/23] target/microblaze: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/helper.c| 3 +-- target/microblaze/translate.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH v2 15/23] target/openrisc: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/openrisc/gdbstub.c | 3 +-- target/openrisc/interrupt.c | 6 ++ target/openrisc/translate.c | 3 +-- 3 files changed, 4

[PATCH v2 02/23] scripts/coccinelle: Add cpu_env.cocci_template script

2024-01-26 Thread Philippe Mathieu-Daudé
Add a Coccinelle script to convert the following slow path (due to the QOM cast macro): _CPU(..)->env to the following fast path: cpu_env(..) Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + scripts/coccinelle/cpu_env.cocci_template | 92

[PATCH v2 05/23] target/arm: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Philippe Mathieu-Daudé
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/arm_gicv3_cpuif_common.c | 5 + target/arm/cpu.c | 19 +-- target/arm/debug_helper.c| 8

[PATCH v2 09/23] target/i386/hvf: Use CPUState typedef

2024-01-26 Thread Philippe Mathieu-Daudé
QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/x86.h | 26 +- target/i386/hvf/x86_descr.h | 14 +++--- target/i386/hvf/x86_emu.h |

Re: [PATCH 0/2] Enable -Wvla, forbidding use of variable length arrays

2024-01-26 Thread Richard Henderson
On 1/26/24 03:32, Peter Maydell wrote: Peter Maydell (2): tests/qtest/xlnx-versal-trng-test.c: Drop use of variable length array meson: Enable -Wvla Reviewed-by: Richard Henderson r~

Re: [PATCH v2 04/23] target/alpha: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/alpha/cpu.c| 31 +++ target/alpha/gdbstub.c|

Re: [PATCH v2 10/23] target/i386: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/vmx.h | 13 +++--- hw/i386/vmmouse.c |

Re: [PATCH v2 17/23] target/riscv: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/arch_dump.c | 6 ++ target/riscv/cpu.c | 17 +

Re: [PATCH v2 19/23] target/s390x: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:04, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/cpu-dump.c| 3 +-- target/s390x/gdbstub.c | 6 ++

Re: [PATCH v2 18/23] target/rx: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:04, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/rx/gdbstub.c | 6 ++ target/rx/helper.c| 6 ++ target/rx/translate.c |

Re: [PATCH v2 11/23] target/m68k: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/m68k/cpu.c | 30 ++ target/m68k/gdbstub.c | 6

Re: [PATCH v2 12/23] target/microblaze: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/helper.c| 3 +-- target/microblaze/translate.c | 3 +-- 2 files

Re: [PATCH v2 23/23] target/sparc: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:04, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/cpu.c | 14 -- target/sparc/gdbstub.c | 3 +--

Re: [PATCH 00/10] Clean up includes

2024-01-26 Thread Michael Tokarev
25.01.2024 19:33, Peter Maydell : This series makes a bunch of automated edits with the clean-includes script. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such

Re: [PATCH] {linux,bsd}-user: Fail mmap() if size doesn't fit into host's size_t

2024-01-26 Thread Richard Henderson
On 1/26/24 06:07, Ilya Leoshkevich wrote: s390x's branch-relative-long test fails with the following error message on 32-bit hosts: qemu-s390x: ../accel/tcg/user-exec.c:493: page_set_flags: Assertion `last <= GUEST_ADDR_MAX' failed. The root cause is that the size passed to mmap() by

Re: [PATCH] target/arm: Reinstate "vfp" property on AArch32 CPUs

2024-01-26 Thread Richard Henderson
On 1/27/24 05:34, Peter Maydell wrote: In commit 4315f7c614743 we restructured the logic for creating the VFP related properties to avoid testing the aa32_simd_r32 feature on AArch64 CPUs. However in the process we accidentally stopped exposing the "vfp" QOM property on AArch32 TCG CPUs. This

Re: [PATCH v2 03/23] bulk: Call in place single use cpu_env()

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Avoid CPUArchState local variable when cpu_env() is used once. Mechanical patch using the following Coccinelle spatch script: @@ type CPUArchState; identifier env; expression cs; @@ { -CPUArchState *env = cpu_env(cs);

Re: [PATCH v2 22/23] target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:04, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/xtensa/dbg_helper.c | 3 +-- target/xtensa/exc_helper.c | 3 +--

Re: [PATCH v2 21/23] target/tricore: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:04, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/cpu.c | 20 target/tricore/gdbstub.c | 6 ++

Re: [PATCH] target/arm: Add ID_AA64ZFR0_EL1.B16B16 to the exposed-to-userspace set

2024-01-26 Thread Richard Henderson
On 1/25/24 23:43, Peter Maydell wrote: In kernel commit 5d5b4e8c2d9ec ("arm64/sve: Report FEAT_SVE_B16B16 to userspace") Linux added ID_AA64ZFR0_el1.B16B16 to the set of ID register fields which it exposes to userspace. Update our exported_bits mask to include this. (This doesn't yet change

Re: [PATCH v2 13/23] target/mips: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.c | 11 +++--- target/mips/gdbstub.c

Re: [PATCH 04/10] aspeed: Clean up includes

2024-01-26 Thread Richard Henderson
On 1/26/24 02:34, Peter Maydell wrote: This commit was created with scripts/clean-includes. All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes

Re: [PATCH 05/10] acpi: Clean up includes

2024-01-26 Thread Richard Henderson
On 1/26/24 02:34, Peter Maydell wrote: This commit was created with scripts/clean-includes: ./scripts/clean-includes --git acpi include/hw/*/*acpi.h hw/*/*acpi.c All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h

Re: [PATCH v2] cpu-exec: simplify jump cache management

2024-01-26 Thread Richard Henderson
On 1/23/24 07:57, Richard Henderson wrote: On 1/23/24 01:34, Paolo Bonzini wrote: Unless I'm missing something egregious, the jmp cache is only every populated with a valid entry by the same thread that reads the cache. Therefore, the contents of any valid entry are always consistent and there

Re: [PATCH v2 05/23] target/arm: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/arm_gicv3_cpuif_common.c | 5 + target/arm/cpu.c | 19

Re: [PATCH v2 09/23] target/i386/hvf: Use CPUState typedef

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/x86.h | 26 +- target/i386/hvf/x86_descr.h

Re: [PATCH v2 08/23] target/hppa: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/hppa/cpu.c| 8 ++-- target/hppa/int_helper.c | 8 ++--

Re: [PATCH v2 20/23] target/sh4: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:04, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/sh4/cpu.c | 15 +-- target/sh4/gdbstub.c | 6 ++

Re: [PATCH 02/10] hyperv: Clean up includes

2024-01-26 Thread Richard Henderson
On 1/26/24 02:34, Peter Maydell wrote: This commit was created with scripts/clean-includes: ./scripts/clean-includes --git hyperv hw/hyperv/*.[ch] All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. * Including

Re: [PATCH 03/10] disas/riscv: Clean up includes

2024-01-26 Thread Richard Henderson
On 1/26/24 02:34, Peter Maydell wrote: This commit was created with scripts/clean-includes: ./scripts/clean-includes --git disas/riscv disas/riscv*[ch] All .c should include qemu/osdep.h first. The script performs three related cleanups: * Ensure .c files include qemu/osdep.h first. *

Re: [PATCH v2 01/23] hw/acpi/cpu: Use CPUState typedef

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: QEMU coding style recommend using structure typedefs: https://www.qemu.org/docs/master/devel/style.html#typedefs Signed-off-by: Philippe Mathieu-Daudé --- include/hw/acpi/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v2 06/23] target/avr: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/avr/cpu.c | 27 +++ target/avr/gdbstub.c | 6 ++

Re: [PATCH v2 07/23] target/cris: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/cris/cpu.c | 5 + target/cris/gdbstub.c | 9 +++--

Re: [PATCH v2 16/23] target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/mpc8544_guts.c | 3 +-- hw/ppc/pnv.c | 3 +--

Re: [PATCH v2 15/23] target/openrisc: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/openrisc/gdbstub.c | 3 +-- target/openrisc/interrupt.c | 6 ++

Re: [PATCH v2 14/23] target/nios2: Prefer fast cpu_env() over slower CPU QOM cast macro

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Signed-off-by: Philippe Mathieu-Daudé --- target/nios2/cpu.c| 15 +++ target/nios2/helper.c | 3 +--

Re: [PATCH v2 02/23] scripts/coccinelle: Add cpu_env.cocci_template script

2024-01-26 Thread Richard Henderson
On 1/27/24 08:03, Philippe Mathieu-Daudé wrote: Add a Coccinelle script to convert the following slow path (due to the QOM cast macro): _CPU(..)->env to the following fast path: cpu_env(..) Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 +

Re: [RFC PATCH 14/34] exec: [CPUTLB] Move PAGE_* macros to common header

2024-01-26 Thread Richard Henderson
On 1/24/24 09:54, Richard Henderson wrote: On 1/20/24 00:40, Anton Johansson wrote: These don't vary across targets and are used in soon-to-be common code (cputlb.c). Signed-off-by: Anton Johansson ---   include/exec/cpu-all.h    | 24   include/exec/cpu-common.h | 30

Re: [PATCH v11 04/11] hw/fsi: Introduce IBM's fsi-slave model

2024-01-26 Thread Cédric Le Goater
On 1/26/24 04:40, Ninad Palsule wrote: This is a part of patchset where IBM's Flexible Service Interface is introduced. The FSI slave: The slave is the terminal point of the FSI bus for FSI symbols addressed to it. Slaves can be cascaded off of one another. The slave's configuration registers

Re: [PATCH v11 05/11] hw/fsi: Introduce IBM's cfam

2024-01-26 Thread Cédric Le Goater
On 1/26/24 04:40, Ninad Palsule wrote: This is a part of patchset where IBM's Flexible Service Interface is introduced. The Common FRU Access Macro (CFAM), an address space containing various "engines" that drive accesses on busses internal and external to the POWER chip. Examples include the

Re: [PATCH v2] mailmap: Fix Stefan Weil email

2024-01-26 Thread Michael Tokarev
23.01.2024 11:21, Philippe Mathieu-Daudé: Commit 5204b499a6 ("mailmap: Fix Stefan Weil author email") corrected authorship for patch received at qemu-devel@nongnu.org, correct now for patch received at qemu-triv...@nongnu.org. Update other authorship email for Stefan's commits. Applied to

[PATCH 1/3] target/arm: Move v7m-related code from cpu32.c into a separate file

2024-01-26 Thread Thomas Huth
Move the code to a separate file so that we do not have to compile it anymore if CONFIG_ARM_V7M is not set. Signed-off-by: Thomas Huth --- target/arm/tcg/cpu-v7m.c | 292 + target/arm/tcg/cpu32.c | 261 -

[PATCH 0/3] target/arm: Allow compilation without CONFIG_ARM_V7M

2024-01-26 Thread Thomas Huth
We've got a switch to disable v7m code since a long time - but it currently cannot be disabled since linking then fails due to missing functions. But thanks to the clean-ups that have been done during the past years, it's not that difficult anymore to finally make it possible to disable

[PATCH 3/3] target/arm/Kconfig: Stop requiring CONFIG_ARM_V7M

2024-01-26 Thread Thomas Huth
Now that we made sure that ARM_V7M code only gets compiled if really needed, we can drop the hard requirement for CONFIG_ARM_V7M in the Kconfig file. Signed-off-by: Thomas Huth --- target/arm/Kconfig | 4 1 file changed, 4 deletions(-) diff --git a/target/arm/Kconfig b/target/arm/Kconfig

[PATCH 2/3] target/arm/tcg/m_helper.c: Include the full helpers only with CONFIG_ARM_V7M

2024-01-26 Thread Thomas Huth
If CONFIG_ARM_V7M is not set, we don't want to include the full-fledged helper functions that require additional functions for linking. The reduced set of the linux-user functions works fine as stubs in this case, so change the #ifdef statement accordingly. Signed-off-by: Thomas Huth ---

Re: [PATCH v11 02/11] hw/fsi: Introduce IBM's scratchpad device

2024-01-26 Thread Cédric Le Goater
On 1/26/24 04:40, Ninad Palsule wrote: This is a part of patchset where IBM's Flexible Service Interface is introduced. The scratchpad provides a set of non-functional registers. The firmware is free to use them, hardware does not support any special management support. The scratchpad registers

Re: [PATCH v11 03/11] hw/fsi: Introduce IBM's FSI Bus

2024-01-26 Thread Cédric Le Goater
On 1/26/24 04:40, Ninad Palsule wrote: This is a part of patchset where FSI bus is introduced. The FSI bus is a simple bus where FSI master is attached. Signed-off-by: Andrew Jeffery [ clg: - removed include/hw/fsi/engine-scratchpad.h and hw/fsi/engine-scratchpad.c -

Re: [PATCH v2] qemu-docs: Update options for graphical frontends

2024-01-26 Thread Michael Tokarev
22.01.2024 07:22, Yihuan Pan wrote: The command line options `-ctrl-grab` and `-alt-grab` have been removed in QEMU 7.1. Instead, use the `-display sdl,grab-mod=` option to specify the grab modifiers. Applied to trivial-patches, thanks! /mjt Resolves:

Re: Why invtsc (CPUID_APM_INVTSC) is unmigratable?

2024-01-26 Thread Xiaoyao Li
On 1/25/2024 6:05 AM, Marcelo Tosatti wrote: On Wed, Jan 24, 2024 at 10:52:46PM +0800, Xiaoyao Li wrote: On 1/23/2024 11:39 PM, Marcelo Tosatti wrote: On Sat, Jan 20, 2024 at 05:44:07PM +0800, Xiaoyao Li wrote: On 1/20/2024 12:14 AM, Marcelo Tosatti wrote: On Fri, Jan 19, 2024 at 02:46:22PM

Re: [PATCH] qapi/migration.json: Fix the member name for MigrationCapability

2024-01-26 Thread Michael Tokarev
19.01.2024 16:53, Han Han: s/@compression/@compress/ Fixes: 864128df46 Please post all patches to qemu-devel@. I'm picking this one up because it is an obvious an trivial fix, but it's still a good idea to let the migration/qapi people to know. Thanks, /mjt Signed-off-by: Han Han ---

Re: [PATCH v11 01/11] hw/fsi: Introduce IBM's Local bus

2024-01-26 Thread Cédric Le Goater
On 1/26/24 04:40, Ninad Palsule wrote: This is a part of patchset where IBM's Flexible Service Interface is introduced. The LBUS is modelled to maintain mapped memory for the devices. The memory is mapped after CFAM config, peek table and FSI slave registers. Signed-off-by: Andrew Jeffery [

Re: [PATCH v11 06/11] hw/fsi: Introduce IBM's FSI master

2024-01-26 Thread Cédric Le Goater
On 1/26/24 04:40, Ninad Palsule wrote: This is a part of patchset where IBM's Flexible Service Interface is introduced. This commit models the FSI master. CFAM is hanging out of FSI master which is a bus controller. The FSI master: A controller in the platform service processor (e.g. BMC)

RE: FW: [PATCH] vhost-user: add VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature

2024-01-26 Thread Wentao Jia
Hi, Eugenio Thanks for you comments, Our team has made new change about the patch, these features in hw/virtio/virtio.h:DEFINE_VIRTIO_COMMON_FEATURES, they are turned off by default , and can be turned on from at qemu command line Do you have comments about this patch? Best Regards Wentao Jia

Re: [PATCH v11 04/11] hw/fsi: Introduce IBM's fsi-slave model

2024-01-26 Thread Ninad Palsule
Hello Cedric, + +static void fsi_slave_reset(DeviceState *dev) +{ +    FSISlaveState *s = FSI_SLAVE(dev); +    int i; + +    /* Initialize registers */ +    for (i = 0; i < FSI_SLAVE_CONTROL_NR_REGS; i++) { +    s->regs[i] = 0; +    } memset would be better. Replaced for loop with

Re: [PATCH v11 07/11] hw/fsi: Aspeed APB2OPB & On-chip peripheral bus

2024-01-26 Thread Ninad Palsule
Hello Cedric, + +static void fsi_aspeed_apb2opb_realize(DeviceState *dev, Error **errp) +{ +    SysBusDevice *sbd = SYS_BUS_DEVICE(dev); +    AspeedAPB2OPBState *s = ASPEED_APB2OPB(dev); +    int i; + Please add a comment regarding the OPBus model here, something like : /*  * TODO: The

[PATCH v12 08/11] hw/arm: Hook up FSI module in AST2600

2024-01-26 Thread Ninad Palsule
This patchset introduces IBM's Flexible Service Interface(FSI). Time for some fun with inter-processor buses. FSI allows a service processor access to the internal buses of a host POWER processor to perform configuration or debugging. FSI has long existed in POWER processes and so comes with

[PATCH v12 07/11] hw/fsi: Aspeed APB2OPB & On-chip peripheral bus

2024-01-26 Thread Ninad Palsule
This is a part of patchset where IBM's Flexible Service Interface is introduced. An APB-to-OPB bridge enabling access to the OPB from the ARM core in the AST2600. Hardware limitations prevent the OPB from being directly mapped into APB, so all accesses are indirect through the bridge. The

Re: [PATCH v3 05/46] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2024-01-26 Thread David Woodhouse
On Fri, 2024-01-26 at 11:43 +0100, Thomas Huth wrote: > On 08/01/2024 21.26, David Woodhouse wrote: > > From: David Woodhouse > > > > Eliminate direct access to nd_table[] and nb_nics by processing the the > > Xen and ISA NICs first and then calling pci_init_nic_devices() for the > > rest. > >

Re: [PATCH v3 05/46] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2024-01-26 Thread Thomas Huth
On 26/01/2024 12.13, David Woodhouse wrote: On Fri, 2024-01-26 at 11:43 +0100, Thomas Huth wrote: On 08/01/2024 21.26, David Woodhouse wrote: From: David Woodhouse Eliminate direct access to nd_table[] and nb_nics by processing the the Xen and ISA NICs first and then calling

Re: [PATCH trivial 1/2] close_all_open_fd(): move to oslib-posix.c

2024-01-26 Thread Daniel P . Berrangé
On Fri, Jan 26, 2024 at 08:44:13AM +0100, Laurent Vivier wrote: > Le 25/01/2024 à 23:29, Michael Tokarev a écrit : > > Initially in async-teardown.c, but the same construct is used > > elsewhere too. > > > > Signed-off-by: Michael Tokarev > > --- > > include/sysemu/os-posix.h | 1 + > >

Re: [PATCH v11 01/11] hw/fsi: Introduce IBM's Local bus

2024-01-26 Thread Ninad Palsule
Hello Cedric,     - included an empty hw/fsi/trace-events ] Signed-off-by: Cédric Le Goater Signed-off-by: Ninad Palsule Reviewed-by: Cédric Le Goater Added tag. Thank you for the review. Regards, Ninad

  1   2   3   4   >