Re: [PATCH 08/10] gdbstub: assert earlier in handle_read_all_regs

2025-03-19 Thread Philippe Mathieu-Daudé
On 19/3/25 19:22, Alex Bennée wrote: When things go wrong we want to assert on the register that failed to be able to figure out what went wrong. Signed-off-by: Alex Bennée --- gdbstub/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 06/10] target/ppc: make ppc_maybe_bswap_register static

2025-03-19 Thread Philippe Mathieu-Daudé
On 19/3/25 19:22, Alex Bennée wrote: It's not used outside of the gdbstub code. Signed-off-by: Alex Bennée --- target/ppc/cpu.h | 1 - target/ppc/gdbstub.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] ppc/spapr: Fix RTAS stopped state

2025-03-19 Thread Misbah Anjum N
Thanks for the quick fix. I tested the patch and I am successfully able to boot the KVM guest. Console Logs: # b4 am 20250320043443.88829-1-npig...@gmail.com --outdir patches Analyzing 1 messages in the thread Analyzing 0 code-review messages Checking attestation on all messages, may take a mome

[PATCH] tests/functional/test_ppc64_replay: Mark the e500 test as flaky

2025-03-19 Thread Thomas Huth
The test_ppc64_e500 occasionally fails (it just hangs and finally times out). The same issue could also be reproduced with the former Avocado test already (especially if the host system is under heavy load), so it's not a new regression. It's very likely the issue that has been filed at https://git

Re: [PATCH v5 2/6] hw/loongarch/virt: Fix error handling in cpu plug

2025-03-19 Thread bibo mao
On 2025/3/20 下午2:16, Markus Armbruster wrote: Bibo Mao writes: In function virt_cpu_plug(), it will send cpu plug message to interrupt controller extioi and ipi irqchip. If there is problem in this function, system should continue to run and keep state the same before cpu is added. Object

Re: [PATCH-for-10.1 10/12] tcg: Unify tcg_gen_insn_start() to handle 1 or 2 arguments

2025-03-19 Thread Richard Henderson
On 3/19/25 06:45, Philippe Mathieu-Daudé wrote: Merge the tcg_gen_insn_start() definition using 1 extra word with the definition using 2, using a2=0 in callers. Signed-off-by: Philippe Mathieu-Daudé --- include/tcg/tcg-op.h | 16 target/i386/tcg/translate.c | 2 +

Re: [PATCH 03/10] target/arm: convert 32 bit gdbstub to new helper

2025-03-19 Thread Akihiko Odaki
On 2025/03/20 3:22, Alex Bennée wrote: For some of the helpers we need a temporary variable to copy from although we could add some helpers to return pointers into env in those cases if we wanted to. Signed-off-by: Alex Bennée --- target/arm/gdbstub.c | 57

Re: [PATCH for-10.1 06/32] vfio: Introduce a new header file for internal migration services

2025-03-19 Thread Prasad Pandit
On Wed, 19 Mar 2025 at 22:57, Cédric Le Goater wrote: > you are right. I am not satisfied with the header file names. > > It has been problematic and I would prefer all header files to have > a "vfio-" prefix. Sadly, the gcc command line is making it difficult, > or I misunderstood some parts. > >

Re: [PATCH v5 2/6] hw/loongarch/virt: Fix error handling in cpu plug

2025-03-19 Thread Markus Armbruster
Bibo Mao writes: > In function virt_cpu_plug(), it will send cpu plug message to interrupt > controller extioi and ipi irqchip. If there is problem in this function, > system should continue to run and keep state the same before cpu is > added. > > Object cpuslot::cpu is set at last only when the

Re: [PATCH v5 17/24] hw/uefi: add to meson

2025-03-19 Thread Michael Tokarev
25.02.2025 19:30, Gerd Hoffmann wrote: Wire up uefi-vars in the build system. diff --git a/hw/uefi/meson.build b/hw/uefi/meson.build index a8b168941255..e63708aa164f 100644 --- a/hw/uefi/meson.build +++ b/hw/uefi/meson.build @@ -1 +1,20 @@ system_ss.add(files('hardware-info.c')) + +uefi_vars

Re: [PATCH 6/6] amd_iommu: Do not assume passthrough translation for devices with DTE[TV]=0

2025-03-19 Thread Arun Kodilkar, Sairaj
On 3/11/2025 8:54 PM, Alejandro Jimenez wrote: The AMD I/O Virtualization Technology (IOMMU) Specification (see Table 8: V, TV, and GV Fields in Device Table Entry), specifies that a DTE with V=0, TV=1 does not contain a valid address translation information. If a request requires a table wal

Re: [PATCH for-10.1 24/32] vfio: Introduce new files for dirty tracking definitions and declarations

2025-03-19 Thread Joao Martins
On 18/03/2025 09:54, Cédric Le Goater wrote: > File "common.c" has been emptied of most of its definitions by the > previous changes and the only definitions left are related to dirty > tracking. Rename it to "dirty-tracking.c" and introduce its associated > "dirty-tracking.h" header file for the d

[PATCH] ppc/spapr: Fix RTAS stopped state

2025-03-19 Thread Nicholas Piggin
This change takes the CPUPPCState 'quiesced' field added for powernv hardware CPU core controls (used to stop and start cores), and extends it to spapr to model the "RTAS stopped" state. This prevents the schedulers attempting to run stopped CPUs unexpectedly, which can cause hangs and possibly oth

[PATCH v5 6/6] target/loongarch: Clean up virt_cpu_irq_init() error handling

2025-03-19 Thread Bibo Mao
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. virt_cpu_irq_init() is

[PATCH v5 4/6] hw/loongarch/virt: Eliminate error_propagate()

2025-03-19 Thread Bibo Mao
When there is an error, it is put into a local variable and then propagated to somewhere else. Instead the error can be set right away, error propagation can be removed. Signed-off-by: Bibo Mao --- hw/loongarch/virt.c | 32 +++- 1 file changed, 11 insertions(+), 21 de

[PATCH v5 0/6] target/loongarch: Fix some issues reported from coccinelle

2025-03-19 Thread Bibo Mao
This patch set solves errors reported by coccinelle tool with commands: spatch --sp-file scripts/coccinelle/*.cocci --dir target/loongarch/ spatch --sp-file scripts/coccinelle/*.cocci --dir hw/loongarch/ The main problem is that qemu should fail to run when feature is forced to enabled however

[PATCH v5 1/6] target/loongarch: Fix error handling of KVM feature checks

2025-03-19 Thread Bibo Mao
For some paravirt KVM features, if user forces to enable it however KVM does not support, qemu should fail to run and exit immediately, rather than continue to run. Here set error message and return directly in function kvm_arch_init_vcpu(). Fixes: 6edd2a9bec90 (target/loongarch/kvm: Implement Loo

[PATCH v5 3/6] hw/loongarch/virt: Fix error handling in cpu unplug

2025-03-19 Thread Bibo Mao
In function virt_cpu_unplug(), it will send cpu unplug message to interrupt controller extioi and ipi irqchip. If there is problem in this function, system should continue to run and keep state the same before cpu is removed. If error happends in cpu unplug stage, send cpu plug message to extioi a

Re: [PATCH v3 4/7] memory-attribute-manager: Introduce MemoryAttributeManager to manage RAMBLock with guest_memfd

2025-03-19 Thread Chenyi Qiang
On 3/19/2025 7:56 PM, Gupta, Pankaj wrote: > On 3/19/2025 12:23 PM, Chenyi Qiang wrote: >> >> >> On 3/19/2025 4:55 PM, Gupta, Pankaj wrote: >>> > As the commit 852f0048f3 ("RAMBlock: make guest_memfd require > uncoordinated discard") highlighted, some subsystems like VFIO may >>>

RE: [PATCH 17/39] target/hexagon: Implement software interrupt

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH 3/3] cleanup: Drop pointless label at end of function

2025-03-19 Thread Corey Minyard
On Wed, Mar 19, 2025 at 03:51:45PM -0500, Corey Minyard wrote: > On Wed, Mar 19, 2025 at 08:49:01PM +0100, Markus Armbruster wrote: > > Corey Minyard writes: > > > > > On Wed, Mar 19, 2025 at 08:21:20PM +0100, Markus Armbruster wrote: > > >> Corey Minyard writes: > > >> > > >> > Is this officia

RE: [PATCH 18/39] target/hexagon: Implement exec_interrupt, set_irq

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH 3/3] cleanup: Drop pointless label at end of function

2025-03-19 Thread Alex Bennée
Markus Armbruster writes: > Corey Minyard writes: > >> Is this official coding style? I'm not a big fan of having return >> statements in the middle of functions, I generally only put them at >> the beginning or the end. > > There's nothing in docs/devel/style.rst. > > I count more than 42,000

Re: [PATCH 08/13] target/arm/cpu: flags2 is always uint64_t

2025-03-19 Thread Pierrick Bouvier
On 3/18/25 15:40, Richard Henderson wrote: On 3/17/25 21:51, Pierrick Bouvier wrote: Do not rely on target dependent type, but use a fixed type instead. Since the original type is unsigned, it should be safe to extend its size without any side effect. Signed-off-by: Pierrick Bouvier --- targ

RE: [PATCH 35/39] target/hexagon: Define gen_precise_exception()

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [PATCH 21/39] target/hexagon: Implement hexagon_resume_threads()

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH v2 0/3] scripts: render_block_graph: Fix with new python and improve argument parsing

2025-03-19 Thread Pavel Hrdina
On Wed, Mar 19, 2025 at 05:28:06PM +0100, Peter Krempa wrote: > New python doesn't like '\l' escapes from the 'dot' language. > > While at it improve usability of the script by employing proper argument > parsing. > > v2: > - use mutually exclusive group instead of hardcoding it (Pavel) > > Pet

Re: [PULL 19/25] rust: pl011: switch to safe chardev operation

2025-03-19 Thread Paolo Bonzini
On 3/19/25 20:25, Peter Maydell wrote: On Sun, 9 Mar 2025 at 10:33, Paolo Bonzini wrote: Switch bindings::CharBackend with chardev::CharBackend. This removes occurrences of "unsafe" due to FFI and switches the wrappers for receive, can_receive and event callbacks to the common ones implemente

Re: [PATCH 3/3] cleanup: Drop pointless label at end of function

2025-03-19 Thread Corey Minyard
On Wed, Mar 19, 2025 at 08:49:01PM +0100, Markus Armbruster wrote: > Corey Minyard writes: > > > On Wed, Mar 19, 2025 at 08:21:20PM +0100, Markus Armbruster wrote: > >> Corey Minyard writes: > >> > >> > Is this official coding style? I'm not a big fan of having return > >> > statements in the

Re: [PATCH v6 13/18] system/xen: remove inline stubs

2025-03-19 Thread Pierrick Bouvier
On 3/19/25 06:56, Anthony PERARD wrote: On Mon, Mar 17, 2025 at 11:34:12AM -0700, Pierrick Bouvier wrote: Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier This was a bad copy-paste, thanks. Reviewed-by: Anthony PERARD Thanks,

RE: [PATCH 12/39] target/hexagon: Add implementation of cycle counters

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:28 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH 3/3] cleanup: Drop pointless label at end of function

2025-03-19 Thread Markus Armbruster
Corey Minyard writes: > On Wed, Mar 19, 2025 at 08:21:20PM +0100, Markus Armbruster wrote: >> Corey Minyard writes: >> >> > Is this official coding style? I'm not a big fan of having return >> > statements in the middle of functions, I generally only put them at >> > the beginning or the end.

Re: [PATCH 3/3] cleanup: Drop pointless label at end of function

2025-03-19 Thread Markus Armbruster
Corey Minyard writes: > Is this official coding style? I'm not a big fan of having return > statements in the middle of functions, I generally only put them at > the beginning or the end. There's nothing in docs/devel/style.rst. I count more than 42,000 return statements with indentation > 4.

Re: [PATCH] block: Zero block driver state before reopening

2025-03-19 Thread Eric Blake
On Mon, Mar 10, 2025 at 11:48:58AM +0100, Kevin Wolf wrote: > Block drivers assume in their .bdrv_open() implementation that their > state in bs->opaque has been zeroed; it is initially allocated with > g_malloc0() in bdrv_open_driver(). > > bdrv_snapshot_goto() needs to make sure that it is zeroe

[PATCH 1/2] rust: Kconfig: Factor out whether PL011 is Rust or C

2025-03-19 Thread Peter Maydell
Currently every board that uses the PL011 duplicates the logic that selects the Rust implementation if Rust was enabled and the C implementation if it does not. Factor this out into a separate Kconfig stanza, so that boards can go back to simply doing "select PL011" and get whichever implementatio

Re: [PULL 19/25] rust: pl011: switch to safe chardev operation

2025-03-19 Thread Peter Maydell
On Sun, 9 Mar 2025 at 10:33, Paolo Bonzini wrote: > > Switch bindings::CharBackend with chardev::CharBackend. This removes > occurrences of "unsafe" due to FFI and switches the wrappers for receive, > can_receive and event callbacks to the common ones implemented by > chardev::CharBackend. > > Si

[PATCH 4/4] target/riscv: Enable/Disable S/VS-mode Timer when STCE bit is changed

2025-03-19 Thread Jim Shu
Updating STCE will enable/disable SSTC in S-mode or/and VS-mode, so we also need to update S/VS-mode Timer and S/VSTIP bits in $mip CSR. Signed-off-by: Jim Shu --- target/riscv/csr.c | 44 target/riscv/time_helper.c | 51 ++

[PATCH 2/4] hw/intc: riscv_aclint: Fix mtime write for sstc extension

2025-03-19 Thread Jim Shu
When changing the mtime value, the period of [s|vs]timecmp timers should also be updated like the period of mtimecmp timer. Signed-off-by: Jim Shu --- hw/intc/riscv_aclint.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c index db374a7c2d.

[PATCH 3/4] target/riscv: Fix VSTIP bit in sstc extension.

2025-03-19 Thread Jim Shu
VSTIP is only writable when both [mh]envcfg.STCE is enabled, or it will revert it's defined behavior as if sstc extension is not implemented. Signed-off-by: Jim Shu --- target/riscv/csr.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/riscv/csr.c b/target/risc

[PATCH 1/4] target/riscv: Add the checking into stimecmp write function.

2025-03-19 Thread Jim Shu
Preparation commit to let aclint timer to use stimecmp write function. Aclint timer doesn't call sstc() predicate so we need to check inside the stimecmp write function. Signed-off-by: Jim Shu --- target/riscv/time_helper.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(

Re: [PATCH 0/3] Cleanups around returns

2025-03-19 Thread Markus Armbruster
Peter Maydell writes: > On Wed, 19 Mar 2025 at 15:23, Markus Armbruster wrote: >> >> Markus Armbruster (3): >> cleanup: Re-run return_directly.cocci >> cleanup: Drop pointless return at end of function >> cleanup: Drop pointless label at end of function >> > >> .../user/ase/msa/bit-count/

[PATCH v2 2/2] utils/qemu-sockets: Introduce keep-alive-idle-period inet socket option

2025-03-19 Thread Juraj Marcin
From: Juraj Marcin The default idle period for TCP connection could be even 2 hours. However, in some cases, the application needs to be aware of a connection issue much sooner. This is the case, for example, for postcopy live migration. If there is no traffic from the migration destination gues

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Eric Auger
On 3/18/25 10:22 PM, Donald Dutile wrote: > > > On 3/18/25 3:13 PM, Nicolin Chen wrote: >> On Tue, Mar 18, 2025 at 07:31:36PM +0100, Eric Auger wrote: >>> On 3/17/25 9:19 PM, Nicolin Chen wrote: On Mon, Mar 17, 2025 at 04:24:53PM -0300, Jason Gunthorpe wrote: > On Mon, Mar 17, 2025 at

RE: [PATCH 39/39] target/hexagon: Add pcycle setting functionality

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Nicolin Chen
On Wed, Mar 19, 2025 at 07:09:33PM +0100, Eric Auger wrote: > > Option means something like this: > > -device smmuv3,accel=on > > instead of > > -device "smmuv3-accel" > > ? > > > > Yea, I think that's good. > Yeah actually that's a big debate for not much. From an implementation > pov tha

RE: [PATCH 36/39] target/hexagon: Add TCG overrides for transfer insts

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

[PATCH 04/10] target/arm: convert 64 bit gdbstub to new helper

2025-03-19 Thread Alex Bennée
For some of the helpers we need a temporary variable to copy from although we could add some helpers to return pointers into env in those cases if we wanted to. Signed-off-by: Alex Bennée --- target/arm/gdbstub64.c | 53 ++ 1 file changed, 33 insertions(+)

Re: [PATCH v2 06/42] include/exec: Split out cpu-mmu-index.h

2025-03-19 Thread Pierrick Bouvier
On 3/18/25 18:16, Richard Henderson wrote: On 3/18/25 17:02, Pierrick Bouvier wrote: On 3/18/25 14:31, Richard Henderson wrote: The implementation of cpu_mmu_index was split between cpu-common.h and cpu-all.h, depending on CONFIG_USER_ONLY.  We already have the plumbing common to user and syste

[PATCH 01/10] include/gdbstub: fix include guard in commands.h

2025-03-19 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/gdbstub/commands.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h index 40f0514fe9..bff3674872 100644 --- a/include/gdbstub/commands.h +++ b/include/gdbstub/commands.h @@ -1,5 +1,5

[PATCH 03/10] target/arm: convert 32 bit gdbstub to new helper

2025-03-19 Thread Alex Bennée
For some of the helpers we need a temporary variable to copy from although we could add some helpers to return pointers into env in those cases if we wanted to. Signed-off-by: Alex Bennée --- target/arm/gdbstub.c | 57 1 file changed, 36 insertions(+)

Re: [PATCH 0/3] Cleanups around returns

2025-03-19 Thread Richard Henderson
On 3/19/25 08:21, Markus Armbruster wrote: Markus Armbruster (3): cleanup: Re-run return_directly.cocci cleanup: Drop pointless return at end of function cleanup: Drop pointless label at end of function Reviewed-by: Richard Henderson r~

[PATCH 10/10] target/microblaze: convert gdbstub to new helper

2025-03-19 Thread Alex Bennée
This is a pretty simple conversion which will be trivial to update once TARGET_BIGENDIAN is replaced with a helper function. Signed-off-by: Alex Bennée --- target/microblaze/gdbstub.c | 44 ++--- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git a/targ

[PATCH 05/10] target/ppc: expand comment on FP/VMX/VSX access functions

2025-03-19 Thread Alex Bennée
Mainly as an aid to myself getting confused too many bswaps deep into the code. Signed-off-by: Alex Bennée --- target/ppc/cpu.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index efab54a068..1e833ade04 100644 --- a/target/ppc/cpu.h

[PATCH 08/10] gdbstub: assert earlier in handle_read_all_regs

2025-03-19 Thread Alex Bennée
When things go wrong we want to assert on the register that failed to be able to figure out what went wrong. Signed-off-by: Alex Bennée --- gdbstub/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 3d7b1028e4..8561d9d527 100

[PATCH 02/10] gdbstub: introduce target independent gdb register helper

2025-03-19 Thread Alex Bennée
The current helper.h functions rely on hard coded assumptions about target endianess to use the tswap macros. We also end up double swapping a bunch of values if the target can run in multiple endianess modes. Avoid this by getting the target to pass the endianess and size via a MemOp and fixing up

[PATCH 09/10] include/exec: fix assert in size_memop

2025-03-19 Thread Alex Bennée
We can handle larger sized memops now, expand the range of the assert. Fixes: 4b473e0c60 (tcg: Expand MO_SIZE to 3 bits) Signed-off-by: Alex Bennée --- include/exec/memop.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/memop.h b/include/exec/memop.h index 4

[PATCH 07/10] target/ppc: convert gdbstub to new helper (!hacky)

2025-03-19 Thread Alex Bennée
By passing the explicit state of LE/BE via the memop we can avoid the messing about we do with ppc_maybe_bswap_register() at least for supplying register values to gdbstub. The fact we still need the helper for setting the values probably indicates we could do with a reverse helper, possibly to se

[PATCH 00/10] gdbstub: conversion to runtime endianess helpers

2025-03-19 Thread Alex Bennée
The aim of this work is to get rid of the endian aware helpers in gdbstub/helpers.h which due to their use of tswap() mean target gdbstubs need to be built multiple times. While this series doesn't actually build each stub once it introduces a new helper - gdb_get_register_value() which takes a Mem

Re: [PATCH for-10.1 03/32] vfio: Introduce a new header file for external migration services

2025-03-19 Thread Cédric Le Goater
On 3/19/25 13:37, Avihai Horon wrote: On 18/03/2025 11:53, Cédric Le Goater wrote: External email: Use caution opening links or attachments The migration core subsytem makes uses of the VFIO migration API to collect statistics on the number of bytes transferred. These services are declared in

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Eric Auger
Hi Nicolin, On 3/19/25 6:14 PM, Nicolin Chen wrote: > On Wed, Mar 19, 2025 at 05:45:51PM +0100, Eric Auger wrote: >> >> >> On 3/17/25 8:10 PM, Nicolin Chen wrote: >>> On Mon, Mar 17, 2025 at 07:07:52PM +0100, Eric Auger wrote: On 3/17/25 6:54 PM, Nicolin Chen wrote: > On Wed, Mar 12, 202

Re: [PATCH v3 1/3] hw/arm/imx8mp-evk: Fix reference count of SoC object

2025-03-19 Thread Peter Maydell
On Tue, 18 Mar 2025 at 20:57, Bernhard Beschow wrote: > > TYPE_FSL_IMX8MP is created using object_new(), so must be realized with > qdev_realize_and_unref() to keep the reference counting intact. > > Signed-off-by: Bernhard Beschow > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: Raspberry Pi 3B energy consumption

2025-03-19 Thread Alex Bennée
Polzini writes: > Dear Sir/Madam, My name is Clément Aldebert, and I am a third-year computer > science student at Paul Sabatier University. > Together with my teammate Laurent Polzin, we are working on a project > supervised by Millian Poquet. Our project focuses on > reducing the energy consu

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Eric Auger
Hi Shameer, On 3/19/25 5:53 PM, Shameerali Kolothum Thodi wrote: > >> -Original Message- >> From: Eric Auger >> Sent: Wednesday, March 19, 2025 4:46 PM >> To: Nicolin Chen >> Cc: Shameerali Kolothum Thodi >> ; qemu-...@nongnu.org; >> qemu-devel@nongnu.org; peter.mayd...@linaro.org; j...

Re: [PATCH 0/4] Integrate IOMMUs with PCI hosts that have ATUs

2025-03-19 Thread Michael S. Tsirkin
On Thu, Mar 20, 2025 at 01:19:18AM +0800, Jason Chien wrote: > Ping > > Jason Chien 於 2025年3月8日週六上午4:40寫道: > > The struct PCIIOMMUOps is designed for use by an IOMMU, but many PCI hosts > also utilize it to implement their ATUs, preventing coexistence with > IOMMUs. > Overwriting

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Eric Auger
On 3/19/25 6:34 PM, Jason Gunthorpe wrote: > On Wed, Mar 19, 2025 at 06:26:48PM +0100, Eric Auger wrote: >> Effectively with ASID invalidation you potentially need to do both qemu >> IOTLB invalidation and host invalidation propagation. >> but this code is already in place in the code and used

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Eric Auger
On 3/19/25 6:12 PM, Shameerali Kolothum Thodi wrote: > >> -Original Message- >> From: Eric Auger >> Sent: Wednesday, March 19, 2025 5:01 PM >> To: Jason Gunthorpe ; Donald Dutile >> >> Cc: Nicolin Chen ; Shameerali Kolothum Thodi >> ; qemu-...@nongnu.org; >> qemu-devel@nongnu.org; pet

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Eric Auger
Hi, On 3/19/25 1:23 AM, Jason Gunthorpe wrote: > On Tue, Mar 18, 2025 at 05:22:51PM -0400, Donald Dutile wrote: > >> I agree with Eric that 'accel' isn't needed -- this should be >> ascertained from the pSMMU that a physical device is attached to. > I seem to remember the point was made that we d

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Jason Gunthorpe
On Wed, Mar 19, 2025 at 06:26:48PM +0100, Eric Auger wrote: > Effectively with ASID invalidation you potentially need to do both qemu > IOTLB invalidation and host invalidation propagation. > but this code is already in place in the code and used in vhost mode: Let's not forget the focus here, the

Re: [PATCH for-10.1 06/32] vfio: Introduce a new header file for internal migration services

2025-03-19 Thread Cédric Le Goater
On 3/19/25 15:05, Avihai Horon wrote: On 18/03/2025 11:53, Cédric Le Goater wrote: External email: Use caution opening links or attachments Gather all VFIO migration related declarations into "migration.h" to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". Reviewed-by: Avihai

Re: [PATCH for-10.1 06/32] vfio: Introduce a new header file for internal migration services

2025-03-19 Thread Cédric Le Goater
[ .. ] * Change looks okay. The header name 'migration.h' is rather generic, vfio-migration.h could be better. Looking at - #include "migration.h" - it is not clear which migration.h is being included. There is also a migration/migration.h header. But I'll leave that to you. (just sharing though

Re: [PATCH v2 39/42] include/system: Remove ifndef CONFIG_USER_ONLY in qtest.h

2025-03-19 Thread Pierrick Bouvier
On 3/19/25 00:26, Philippe Mathieu-Daudé wrote: On 18/3/25 22:32, Richard Henderson wrote: This is include/system, so CONFIG_USER_ONLY will never be true. Signed-off-by: Richard Henderson --- include/system/qtest.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/system/qtest.

Re: [PATCH 0/4] Integrate IOMMUs with PCI hosts that have ATUs

2025-03-19 Thread Jason Chien
Ping Jason Chien 於 2025年3月8日 週六 上午4:40寫道: > The struct PCIIOMMUOps is designed for use by an IOMMU, but many PCI hosts > also utilize it to implement their ATUs, preventing coexistence with > IOMMUs. > Overwriting a PCI host’s PCIIOMMUOps disrupts its translation rules. > > This patch series int

Re: [PATCH v2 11/42] accel/tcg: Perform aligned atomic reads in translator_ld

2025-03-19 Thread Pierrick Bouvier
On 3/18/25 14:31, Richard Henderson wrote: Perform aligned atomic reads in translator_ld, if possible. According to https://lore.kernel.org/qemu-devel/20240607101403.1109-1-jim@sifive.com/ this is required for RISC-V Ziccif. Signed-off-by: Richard Henderson --- accel/tcg/translator.c |

Re: [PATCH] hw/misc/edu: Rename macros indicating the direction of DMA operations

2025-03-19 Thread Jason Chien
This is a virtual device designed for educational purposes. The only spec I found is in QEMU documentation: https://github.com/qemu/qemu/blob/master/docs/specs/edu.rst According to the documentation: direction (0: from RAM to EDU, 1: from EDU to RAM) The macros confused me and my goal is to make th

Re: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Nicolin Chen
On Wed, Mar 19, 2025 at 05:45:51PM +0100, Eric Auger wrote: > > > > On 3/17/25 8:10 PM, Nicolin Chen wrote: > > On Mon, Mar 17, 2025 at 07:07:52PM +0100, Eric Auger wrote: > >> On 3/17/25 6:54 PM, Nicolin Chen wrote: > >>> On Wed, Mar 12, 2025 at 04:15:10PM +0100, Eric Auger wrote: > On 3/1

Re: [RFC PATCH v2 00/20] hw/arm/virt: Add support for user-creatable accelerated SMMUv3

2025-03-19 Thread Eric Auger
Hi Philippe, On 3/19/25 5:40 PM, Philippe Mathieu-Daudé wrote: > Hi, > > On 11/3/25 15:10, Shameer Kolothum via wrote: >> Hi All, >> >> This patch series introduces initial support for a user-creatable >> accelerated SMMUv3 device (-device arm-smmuv3-accel) in QEMU. > > I'm a bit confused by the

RE: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Eric Auger > Sent: Wednesday, March 19, 2025 5:01 PM > To: Jason Gunthorpe ; Donald Dutile > > Cc: Nicolin Chen ; Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org; peter.mayd...@linaro.org; > berra...@redhat.com; nath...@nvidia.com;

RE: [PATCH 34/39] target/hexagon: Add TLB, k0 {un,}lock

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

RE: [RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-19 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Eric Auger > Sent: Wednesday, March 19, 2025 4:46 PM > To: Nicolin Chen > Cc: Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org; peter.mayd...@linaro.org; j...@nvidia.com; > ddut...@redhat.com; berra...@redhat.com; nath...@nvidia.com

Re: [PATCH for-10.1 10/32] vfio: Introduce new files for VFIORegion definitions and declarations

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:53AM +0100, Cédric Le Goater wrote: > Gather all VFIORegion related declarations and definitions into their > own files to reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". > > These declarations are made available externally (for "sysbus-fdt.c"). > This

Re: [PATCH for-10.1 25/32] vfio: Move vfio_set_migration_error() into migration.c

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:08AM +0100, Cédric Le Goater wrote: > This routine is related to VFIO migration. It belongs to "migration.c". > While at it, rename it to better reflect the namespace it belongs to. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

Re: [PATCH for-10.1 11/32] vfio: Introduce a new header file for VFIOcontainer declarations

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:54AM +0100, Cédric Le Goater wrote: > Gather all VFIOcontainer related declarations into "container.h" to > reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". > > These declarations are made available externally for PPC and s390x. > > Signed-off-by: Cédri

Re: [PATCH for-10.1 23/32] vfio: Move vfio_de/attach_device() into device.c

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:06AM +0100, Cédric Le Goater wrote: > These routines are VFIODevice related. Move their definitions into > "device.c". > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

Re: [PATCH 05/39] target/hexagon: Implement modify SSR

2025-03-19 Thread Richard Henderson
On 3/19/25 09:39, ltaylorsimp...@gmail.com wrote: I caution against putting a level of indirection into CPUHexagonState for the HVX registers. The HVX TCG implementation relies on an offset from the start of CPUHexagonState to identify the operands. This would be a very significant rewrite i

Re: [PATCH for-10.1 32/32] vfio: Rename RAM discard related services

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:15AM +0100, Cédric Le Goater wrote: > Rename some routines to better reflect the namespace they belong to. > > Signed-off-by: Cédric Le Goater > --- > hw/vfio/dirty-tracking.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/hw

[PATCH 20/21] hw/arm/beckhoff_CX7200: Add dummy DDR CTRL to CX7200

2025-03-19 Thread Corvin Köhne
From: YannickV The CX7200 polls for statusregisters in the DDR Controller. To avaid endless polling loops, a dummy DDR Controller is added. Signed-off-by: Yannick Voßen --- hw/arm/beckhoff_CX7200.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/arm/beckhoff_CX7200.c b/hw

Re: [PATCH for-10.1 26/32] vfio: Rename vfio-common.h to vfio-device.h

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:09AM +0100, Cédric Le Goater wrote: > "hw/vfio/vfio-common.h" has been emptied of most of its declarations > by the previous changes and the only declarations left are related to > VFIODevice. Rename it to "hw/vfio/vfio-device.h" and make the > necessary adjustments.

Re: [PATCH for-10.1 06/32] vfio: Introduce a new header file for internal migration services

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:49AM +0100, Cédric Le Goater wrote: > Gather all VFIO migration related declarations into "migration.h" to > reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". > > Signed-off-by: Cédric Le Goater LGTM modulo the other's comments. regards john

Re: [PATCH for-10.1 28/32] vfio: Make vfio_devices_query_dirty_bitmap() static

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:11AM +0100, Cédric Le Goater wrote: > vfio_devices_query_dirty_bitmap() is only used in "dirty-tracking.c". > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

RE: [PATCH 33/39] target/hexagon: initialize sys/guest reg TCGvs

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH v3 1/3] hw/arm/imx8mp-evk: Fix reference count of SoC object

2025-03-19 Thread Bernhard Beschow
Am 18. März 2025 20:57:07 UTC schrieb Bernhard Beschow : >TYPE_FSL_IMX8MP is created using object_new(), so must be realized with >qdev_realize_and_unref() to keep the reference counting intact. > Fixes: a4eefc69b237 "hw/arm: Add i.MX 8M Plus EVK board" >Signed-off-by: Bernhard Beschow >--- >

Re: [PATCH 1/2] qga-win: implement a 'guest-get-load' command

2025-03-19 Thread Konstantin Kostiuk
On Wed, Mar 19, 2025 at 5:02 PM Daniel P. Berrangé wrote: > On Fri, Mar 14, 2025 at 01:38:46PM +0200, Konstantin Kostiuk wrote: > > Windows has no native equivalent API, but it would be possible to > > simulate it as illustrated here (BSD-3-Clause): > > > > https://github.com/giampaolo/psutil/p

VDPA MAC address problem

2025-03-19 Thread Konstantin Shkolnyy
I’m observing a problem while testing VDPA with Nvidia ConnectX-6 (mlx5) on s390. Upon start, virtio_net_device_realize() tries to set a new MAC address by VHOST_VDPA_SET_CONFIG which doesn’t do anything. Later, the VM gets started and learns about the old address from virtio_net_get_config(

Re: [PATCH v2 1/2] hw/arm/fsl-imx8mp: Derive struct FslImx8mpState from TYPE_SYS_BUS_DEVICE

2025-03-19 Thread Bernhard Beschow
Am 18. März 2025 15:29:17 UTC schrieb Peter Maydell : >On Tue, 18 Mar 2025 at 15:27, Peter Maydell wrote: >> >> On Fri, 14 Mar 2025 at 18:32, Bernhard Beschow wrote: >> > >> > Deriving from TYPE_SYS_BUS_DEVICE fixes the SoC object to be reset upon >> > machine >> > reset. It also makes the So

Re: [PATCH] Fix duplicate symbol error on MacOS build

2025-03-19 Thread Peter Maydell
On Wed, 19 Mar 2025 at 14:02, Tanish Desai wrote: > > It will work for PL011 but there are other devices using the same method for > selecting rust or c++ file like HPET in timer. > You can check this:- > https://github.com/qemu/qemu/blob/master/hw/timer/Kconfig > Wouldn’t it create inconsistenci

Re: [RFC PATCH v2 13/20] hw/arm/smmuv3-accel: Introduce helpers to batch and issue cache invalidations

2025-03-19 Thread Donald Dutile
On 3/19/25 5:48 AM, Shameerali Kolothum Thodi wrote: -Original Message- From: Donald Dutile Sent: Wednesday, March 19, 2025 1:31 AM To: Shameerali Kolothum Thodi ; qemu-...@nongnu.org; qemu-devel@nongnu.org Cc: eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; nicol

Re: [PATCH for-10.1 05/32] vfio: Make vfio_viommu_preset() static

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:48AM +0100, Cédric Le Goater wrote: > This routine is only used in file "migration.c". Move it there. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

Re: [RFC PATCH v2 13/20] hw/arm/smmuv3-accel: Introduce helpers to batch and issue cache invalidations

2025-03-19 Thread Nicolin Chen
On Wed, Mar 19, 2025 at 12:24:32PM -0400, Donald Dutile wrote: > > > On 3/11/25 10:10 AM, Shameer Kolothum wrote: > > > > From: Nicolin Chen > > > > > > > > Inroduce an SMMUCommandBatch and some helpers to batch and issue > > > the > > > Introduce > > > > commands. Currently separat

RE: [PATCH 32/39] target/hexagon: Define system, guest reg names

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Friday, February 28, 2025 11:29 PM > To: qemu-devel@nongnu.org > Cc: brian.c...@oss.qualcomm.com; richard.hender...@linaro.org; > phi...@linaro.org; quic_mathb...@quicinc.com; a...@rev.ng; a...@rev.ng; > quic_mlie...@quicinc.com; ltaylorsi

Re: [PATCH for-10.1 17/32] vfio: Move vfio_kvm_device_add/del_fd() to helpers.c

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:00AM +0100, Cédric Le Goater wrote: > vfio_kvm_device_add/del_fd() are low level routines. Move them with > the other helpers. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

  1   2   3   >