[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

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

[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 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 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] 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 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 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

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 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 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 >>>

[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

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 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 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 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 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 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 v2 4/4] docs/firmware: add feature flag for qemu variable store

2025-03-19 Thread Daniel P . Berrangé
On Wed, Mar 19, 2025 at 12:01:51PM +0100, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > docs/interop/firmware.json | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json > index 57f55f6c5455..76df1043dae9

[PATCH] tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test

2025-03-19 Thread Thomas Huth
From: Thomas Huth "nc" can either bei GNU netcat, OpenBSD netcat or NMap ncat. At least GNU netcat currently does not work with this test anymore, though the comment in the test says otherwise. GNU netcat seems to be quite unmaintained nowadays, according to its website (https://netcat.sourceforg

[PATCH v2 1/4] hw/uefi: flush variable store to disk in post load

2025-03-19 Thread Gerd Hoffmann
Makes live migration more robust. Commit 4c0cfc72b31a ("pflash_cfi01: write flash contents to bdrv on incoming migration") elaborates in detail on the motivation. Cc: Peter Krempa Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw

[PATCH v2 2/4] hw/uefi: fix error handling in uefi_vars_json_save

2025-03-19 Thread Gerd Hoffmann
Catch lseek errors. Return on errors. Use autoptr for the GString to simplify cleanup. Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-json.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/uefi/var-service-json.c b/hw/uefi/var-service-json.c index 7

[PATCH v2 0/4] [for-10.0] hw/uefi: some bugfixes

2025-03-19 Thread Gerd Hoffmann
Gerd Hoffmann (4): hw/uefi: flush variable store to disk in post load hw/uefi: fix error handling in uefi_vars_json_save hw/uefi: fix error handling in uefi_vars_json_load docs/firmware: add feature flag for qemu variable store hw/uefi/var-service-core.c | 1 + hw/uefi/var-service-jso

Re: [PATCH 0/2] xen: An error handling fix

2025-03-19 Thread Markus Armbruster
Queued for 10.0.

Re: [PATCH] error: Strip trailing '\n' from an error string argument

2025-03-19 Thread Markus Armbruster
Queued for 10.0.

Re: [PATCH v2 4/4] docs/firmware: add feature flag for qemu variable store

2025-03-19 Thread Gerd Hoffmann
On Wed, Mar 19, 2025 at 11:07:05AM +, Daniel P. Berrangé wrote: > On Wed, Mar 19, 2025 at 12:01:51PM +0100, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > --- > > docs/interop/firmware.json | 5 - > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/docs/int

Re: [PULL 14/24] hw/uefi: add var-service-json.c + qapi for NV vars.

2025-03-19 Thread Gerd Hoffmann
On Wed, Mar 19, 2025 at 10:18:08AM +, Peter Maydell wrote: > On Wed, 19 Mar 2025 at 08:29, Gerd Hoffmann wrote: > > qemu_create() works only once in case libvirt hands us a > > file handle instead of a filename. > > If we have to work on a filehandle, we have the problem > that if the host cr

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 4:55 PM, Gupta, Pankaj wrote: > >>> As the commit 852f0048f3 ("RAMBlock: make guest_memfd require >>> uncoordinated discard") highlighted, some subsystems like VFIO may >>> disable ram block discard. However, guest_memfd relies on the >>> discard >>> operation t

Re: [PATCH PoC 1/7] QAPI: gpio JSON

2025-03-19 Thread Daniel P . Berrangé
On Wed, Mar 19, 2025 at 10:57:51AM +0300, Nikita Shubin via B4 Relay wrote: > From: Nikita Shubin > > Signed-off-by: Nikita Shubin > --- > qapi/gpio.json| 68 > +++ > qapi/meson.build | 1 + > qapi/qapi-schema.json | 1 + > 3 files

[PATCH v2 4/4] docs/firmware: add feature flag for qemu variable store

2025-03-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- docs/interop/firmware.json | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index 57f55f6c5455..76df1043dae9 100644 --- a/docs/interop/firmware.json +++ b/docs/interop/firmware.json @@

Re: [PULL 16/24] hw/uefi: add UEFI_VARS to Kconfig

2025-03-19 Thread Gerd Hoffmann
On Wed, Mar 19, 2025 at 11:27:41AM +, Daniel P. Berrangé wrote: > On Tue, Mar 04, 2025 at 01:48:04PM +0100, Gerd Hoffmann wrote: > > diff --git a/hw/uefi/Kconfig b/hw/uefi/Kconfig > > new file mode 100644 > > index ..ca6c2bc46a96 > > --- /dev/null > > +++ b/hw/uefi/Kconfig > > @@ -0

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

2025-03-19 Thread Shameerali Kolothum Thodi via
> -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...@nvidia.com; berra...@redhat.com; nath..

RE: [RFC PATCH v2 04/20] hw/arm/virt: Add support for smmuv3-accel

2025-03-19 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Donald Dutile > Sent: Tuesday, March 18, 2025 10:50 PM > To: Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org > Cc: eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; > nicol...@nvidia.com; berra...@redhat.com; nath...

RE: [RFC PATCH v2 05/20] hw/arm/smmuv3-accel: Associate a pxb-pcie bus

2025-03-19 Thread Shameerali Kolothum Thodi via
Hi Don, > -Original Message- > From: Donald Dutile > Sent: Tuesday, March 18, 2025 10:12 PM > To: Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org > Cc: eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; > nicol...@nvidia.com; berra...@redhat.com;

Re: test_migration.py not working with netcat-traditional

2025-03-19 Thread Thomas Huth
On 19/03/2025 09.57, Daniel P. Berrangé wrote: On Wed, Mar 19, 2025 at 08:49:53AM +0100, Thomas Huth wrote: On 18/03/2025 22.13, Matheus Tavares Bernardino wrote: Hi, tests/functional/test_migration.py says "The test works for both netcat-traditional and netcat-openbsd packages." But when I ru

Re: [PULL 14/24] hw/uefi: add var-service-json.c + qapi for NV vars.

2025-03-19 Thread Gerd Hoffmann
Hi, > Hi; Coverity points out some problems in this code > (CID 1593154, 1593157): I'll send fixes later today. > Do we absolutely need to be operating on a continuously open > filedescriptor here rather than a filename? If we could make > these functions use uv->jsonfile each time then we cou

[PULL 07/10] target/riscv: refactor VSTART_CHECK_EARLY_EXIT() to accept vl as a parameter

2025-03-19 Thread Alistair Francis
From: Chao Liu Some vector instructions are special, such as the vlm.v instruction, where setting its vl actually sets evl = (vl + 7) >> 3. To improve maintainability, we will uniformly use VSTART_CHECK_EARLY_EXIT() to check for the condition vstart >= vl. This function will also handle cases inv

Re: [PATCH] cryptodev: Fix error handling in cryptodev_lkcf_execute_task()

2025-03-19 Thread Markus Armbruster
Queued for 10.0.

Re: [PATCH v4 4/4] target/loongarch: Set dest error with error_abort in virt_cpu_irq_init

2025-03-19 Thread Markus Armbruster
bibo mao writes: On 2025/3/19 下午2:09, Markus Armbruster wrote: >> Bibo Mao writes: >> >>> In function virt_cpu_irq_init(), there is notification with ipi and extioi >>> interrupt controller for cpu creation. Local variable with error type is >>> used, however there is no check with its return v

[PULL 10/10] target/riscv: Add check for 16-bit aligned PC for different priv versions.

2025-03-19 Thread Alistair Francis
From: Yu-Ming Chang For privilege version 1.12 or newer, C always implies Zca. We can only check ext_zca to allow 16-bit aligned PC addresses. For older privilege versions, we only check C. Signed-off-by: Yu-Ming Chang Reviewed-by: Alistair Francis Message-ID: <174184718265.10540.1012002422166

Re: [PATCH for-10.1 14/32] vfio: Move Host IOMMU type declarations into their respective files

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:57AM +0100, Cédric Le Goater wrote: > These definitions don't have any use outside of their respective > submodules. There is no need to expose them externally. Keep them > private. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

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

2025-03-19 Thread Gupta, Pankaj
As the commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") highlighted, some subsystems like VFIO may disable ram block discard. However, guest_memfd relies on the discard operation to perform page conversion between private and shared memory. This can lead to stale I

[PULL 02/10] optimize the memory probing for vector fault-only-first loads.

2025-03-19 Thread Alistair Francis
From: Paolo Savini Fault-only-first loads in the RISC-V vector extension need to update the vl with the element index that causes an exception. In order to ensure this the emulation of this instruction used to probe the memory covered by the load operation with a loop that iterated over each elem

[PULL 00/10] riscv-to-apply queue

2025-03-19 Thread Alistair Francis
The following changes since commit 1dae461a913f9da88df05de6e2020d3134356f2e: Update version for v10.0.0-rc0 release (2025-03-18 10:18:14 -0400) are available in the Git repository at: https://github.com/alistair23/qemu.git tags/pull-riscv-to-apply-20250319 for you to fetch changes up to

[PULL 04/10] target/riscv: fixes a bug against `ssamoswap` behavior in M-mode

2025-03-19 Thread Alistair Francis
From: Deepak Gupta Commit f06bfe3dc38c ("target/riscv: implement zicfiss instructions") adds `ssamoswap` instruction. `ssamoswap` takes the code-point from existing reserved encoding (and not a zimop like other shadow stack instructions). If shadow stack is not enabled (via xenvcfg.SSE) and effec

[PULL 03/10] target/riscv: fix access permission checks for CSR_SSP

2025-03-19 Thread Alistair Francis
From: Deepak Gupta Commit:8205bc1 ("target/riscv: introduce ssp and enabling controls for zicfiss") introduced CSR_SSP but it mis-interpreted the spec on access to CSR_SSP in M-mode. Gated to CSR_SSP is not gated via `xSSE`. But rather rules clearly specified in section "22.2.1. Shadow Stack Poin

[PULL 01/10] docs/about/emulation: Fix broken link

2025-03-19 Thread Alistair Francis
From: Santiago Monserrat Campanello semihosting link to risc-v changed Signed-off-by: Santiago Monserrat Campanello Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2717 Reviewed-by: Alistair Francis Reviewed-by: Thomas Huth Message-ID: <20250305102632.91376-1-santimons...@gmail.com> S

[PULL 06/10] target/riscv/csr.c: fix OVERFLOW_BEFORE_WIDEN in rmw_sctrdepth()

2025-03-19 Thread Alistair Francis
From: Daniel Henrique Barboza Coverity found the following issue: >>> CID 1593156: Integer handling issues (OVERFLOW_BEFORE_WIDEN) >>> Potentially overflowing expression "0x10 << depth" with type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then used in a c

Re: [PATCH v4 4/4] target/loongarch: Set dest error with error_abort in virt_cpu_irq_init

2025-03-19 Thread bibo mao
On 2025/3/19 下午2:09, Markus Armbruster wrote: Bibo Mao writes: In function virt_cpu_irq_init(), there is notification with ipi and extioi interrupt controller for cpu creation. Local variable with error type is used, however there is no check with its return value. Good catch. When the f

Re: [PATCH v4 2/4] hw/loongarch/virt: Remove unnecessary NULL pointer

2025-03-19 Thread bibo mao
On 2025/3/19 下午2:50, Markus Armbruster wrote: Bibo Mao writes: There is NULL pointer checking function error_propagate() already, it is not necessary to add checking for function parameter. Here remove NULL pointer checking with function parameter. I believe the title "Remove unnecessary

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

2025-03-19 Thread Gupta, Pankaj
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 disable ram block discard. However, guest_memfd relies on the discard operati

Re: [PATCH v2 3/4] hw/uefi: fix error handling in uefi_vars_json_load

2025-03-19 Thread Philippe Mathieu-Daudé
On 19/3/25 12:01, Gerd Hoffmann wrote: Catch lseek errors. Return on read errors. Fixes: CID 1593154 Fixes: CID 1593157 Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-json.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH] tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test

2025-03-19 Thread Matheus Tavares Bernardino
On Wed, 19 Mar 2025 11:56:17 +0100 Thomas Huth wrote: > > From: Thomas Huth > > "nc" can either bei GNU netcat, OpenBSD netcat or NMap ncat. At Small typo s/bei/be/ > least GNU netcat currently does not work with this test anymore, > though the comment in the test says otherwise. GNU netcat se

Re: [PATCH v2 1/4] hw/uefi: flush variable store to disk in post load

2025-03-19 Thread Philippe Mathieu-Daudé
On 19/3/25 12:01, Gerd Hoffmann wrote: Makes live migration more robust. Typo "Make" Commit 4c0cfc72b31a ("pflash_cfi01: write flash contents to bdrv on incoming migration") elaborates in detail on the motivation. Cc: Peter Krempa Signed-off-by: Gerd Hoffmann --- hw/uefi/var-service-cor

Re: [PULL 16/24] hw/uefi: add UEFI_VARS to Kconfig

2025-03-19 Thread Philippe Mathieu-Daudé
On 19/3/25 12:27, Daniel P. Berrangé wrote: On Tue, Mar 04, 2025 at 01:48:04PM +0100, Gerd Hoffmann wrote: Add UEFI_VARS config option, enable by default for x86_64 and aarch64. Signed-off-by: Gerd Hoffmann Message-ID: <20250225163031.1409078-17-kra...@redhat.com> --- hw/Kconfig | 1 +

Re: [PATCH for-10.1 02/32] vfio: Rename vfio_reset_bytes_transferred()

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:53:45AM +0100, Cédric Le Goater wrote: > Enforce a 'vfio_mig_' prefix for the VFIO migration API to better > reflect the namespace these routines belong to. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

Re: [PATCH for-10.1 02/32] vfio: Rename vfio_reset_bytes_transferred()

2025-03-19 Thread Avihai Horon
On 18/03/2025 11:53, Cédric Le Goater wrote: External email: Use caution opening links or attachments Enforce a 'vfio_mig_' prefix for the VFIO migration API to better reflect the namespace these routines belong to. Signed-off-by: Cédric Le Goater Reviewed-by: Avihai Horon Same nit as p

Re: [PATCH v2 4/4] docs/firmware: add feature flag for qemu variable store

2025-03-19 Thread Daniel P . Berrangé
On Wed, Mar 19, 2025 at 12:51:16PM +0100, Gerd Hoffmann wrote: > On Wed, Mar 19, 2025 at 11:37:40AM +, Daniel P. Berrangé wrote: > > > > > > +# @qemu-vars: The firmware expects qemu to provide an efi variable > > > > > +# store, via "uefi-vars-sysbus" or "uefi-vars-x64" > > > > >

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

2025-03-19 Thread Avihai Horon
On 18/03/2025 11:53, Cédric Le Goater wrote: External email: Use caution opening links or attachments vfio_mig_active() is part of the VFIO migration API. Move the definitions where VFIO migration is implemented. Signed-off-by: Cédric Le Goater Reviewed-by: Avihai Horon One nit below th

Re: [PATCH v2 4/4] docs/firmware: add feature flag for qemu variable store

2025-03-19 Thread Gerd Hoffmann
Hi, > > > > There is 'stateless' already for 'firmware image in r/o flash'. > > > > > > What's the behaviour of UEFI if build with JSON vars support, but without > > > QEMU providing any JSON vars backend ? > > > > It will panic. > > In that case, we must not reuse 'stateless' with such build

Re: [PATCH 2/2] target/riscv: Restrict midelegh access to S-mode harts

2025-03-19 Thread Daniel Henrique Barboza
On 3/18/25 4:01 AM, Jay Chang wrote: RISC-V AIA Spec states: "For a machine-level environment, extension Smaia encompasses all added CSRs and all modifications to interrupt response behavior that the AIA specifies for a hart, over all privilege levels. For a supervisor-level environment, exten

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

2025-03-19 Thread Prasad Pandit
On Tue, 18 Mar 2025 at 15:29, Cédric Le Goater wrote: > The migration core subsytem makes uses of the VFIO migration API to * subsytem -> subsystem * uses -> use > collect statistics on the number of bytes transferred. * statistics on the bytes transferred (number of seems redundant) OR stat

[PATCH PoC 7/7] gpiodev: Add gpiobackend over GUSE

2025-03-19 Thread Nikita Shubin via B4 Relay
From: Nikita Shubin Add GUSE (FUSE based kernel module similiar to CUSE) based backend. This allows transparent usage of Linux GPIO UAPI based tools like in kernel tools/gpio or libgpiod. libgpiod requires some modification to allow "/sys/class/guse" in gpiod_check_gpiochip_device(). It requir

Re: [PATCH-for-10.1 02/12] tcg: Always define TARGET_INSN_START_EXTRA_WORDS

2025-03-19 Thread Richard Henderson
On 3/19/25 06:44, Philippe Mathieu-Daudé wrote: Do not define TARGET_INSN_START_EXTRA_WORDS under the hood, have each target explicitly define it. Signed-off-by: Philippe Mathieu-Daudé --- include/tcg/insn-start-words.h | 4 include/tcg/tcg-op.h | 2 +- target/alpha/cpu-param.

RE: [PATCH 28/38] target/hexagon: Initialize htid, modectl regs

2025-03-19 Thread Sid Manning
> -Original Message- > From: Richard Henderson > Sent: Thursday, March 13, 2025 2:07 PM > To: ltaylorsimp...@gmail.com; 'Philippe Mathieu-Daudé' > ; 'Brian Cain' ; qemu- > de...@nongnu.org > Cc: Matheus Bernardino (QUIC) ; > a...@rev.ng; a...@rev.ng; Marco Liebel (QUIC) > ; alex.ben...@l

Re: [PATCH v2 1/3] virtio: add VM state change cb with return value

2025-03-19 Thread Stefano Garzarella
On Fri, Mar 14, 2025 at 06:15:32AM -0400, Haoqian He wrote: This patch contains two changes: 1. Add VM state change cb type VMChangeStateHandlerExt which has return value for virtio devices VMChangeStateEntry. When VM state changes, virtio device will call the _Ext version. 2. Add return value

Re: [PULL 16/24] hw/uefi: add UEFI_VARS to Kconfig

2025-03-19 Thread Daniel P . Berrangé
On Tue, Mar 04, 2025 at 01:48:04PM +0100, Gerd Hoffmann wrote: > Add UEFI_VARS config option, enable by default for x86_64 and aarch64. > > Signed-off-by: Gerd Hoffmann > Message-ID: <20250225163031.1409078-17-kra...@redhat.com> > --- > hw/Kconfig | 1 + > hw/uefi/Kconfig | 3 +++ > 2 files

Re: [PATCH-for-10.1 03/12] tcg: Have tcg_gen_insn_start() take uint64_t arguments

2025-03-19 Thread Richard Henderson
On 3/19/25 06:44, Philippe Mathieu-Daudé wrote: Since restore_state_to_opc()'s rework in commits d29256896..04f105758 and TCGContext::gen_insn_data[] widened in commit c9ad8d27caa ("tcg: Widen gen_insn_data to uint64_t"), tcg_set_insn_start_param()'s 3rd argument is uint64_t, not target_ulong. Us

Re: [PATCH-for-10.1 04/12] tcg: Declare local 'insn_start_words' variable in tcg_gen_insn_start()

2025-03-19 Thread Richard Henderson
On 3/19/25 06:44, Philippe Mathieu-Daudé wrote: In order to keep following commits simple, introduce the 'insn_start_words' local variable in tcg_gen_insn_start(). Signed-off-by: Philippe Mathieu-Daudé --- include/tcg/tcg-op.h | 15 --- 1 file changed, 12 insertions(+), 3 deletio

Re: [PATCH-for-10.1 05/12] tcg: Use TCGContext::insn_start_words in tcg_gen_insn_start()

2025-03-19 Thread Richard Henderson
On 3/19/25 06:44, Philippe Mathieu-Daudé wrote: In tb_gen_code() we set TCGContext::insn_start_words to TARGET_INSN_START_WORDS: 290 TranslationBlock *tb_gen_code(...) 293 { ... 351 tcg_ctx->insn_start_words = TARGET_INSN_START_WORDS; This definition is expanded to: 11 # define TARGET_IN

Re: [RFC PATCH v2 05/20] hw/arm/smmuv3-accel: Associate a pxb-pcie bus

2025-03-19 Thread Donald Dutile
On 3/19/25 5:26 AM, Shameerali Kolothum Thodi wrote: Hi Don, Hey! -Original Message- From: Donald Dutile Sent: Tuesday, March 18, 2025 10:12 PM To: Shameerali Kolothum Thodi ; qemu-...@nongnu.org; qemu-devel@nongnu.org Cc: eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvid

Re: [PATCH-for-10.1 07/12] tcg: Check TARGET_INSN_START_EXTRA_WORDS range at runtime

2025-03-19 Thread Richard Henderson
On 3/19/25 06:45, Philippe Mathieu-Daudé wrote: Define TARGET_INSN_START_WORDS_MAX and use it to check TARGET_INSN_START_EXTRA_WORDS at runtime in tb_gen_code(). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- include/tcg/tcg-op.h | 4 +--- include/tcg/tcg.h

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: [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: [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 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: 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: [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 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: [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: [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 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 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: [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 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

[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

[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 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 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 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 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 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

Re: [PATCH 2/2] hw/riscv/virt-acpi-build: Add support for RIMT

2025-03-19 Thread Daniel Henrique Barboza
On 3/14/25 2:15 AM, Sunil V L wrote: RISC-V IO Mapping Table (RIMT) is a new static ACPI table used to communicate IOMMU information to the OS. Add support for creating this table when the IOMMU is present. The specification is frozen and available at [1]. [1] - https://github.com/riscv-non-

Re: [PATCH 1/2] hw/riscv/virt: Add the BDF of IOMMU to RISCVVirtState structure

2025-03-19 Thread Daniel Henrique Barboza
On 3/14/25 2:15 AM, Sunil V L wrote: When the IOMMU is implemented as a PCI device, its BDF is created locally in virt.c. However, the same BDF is also required in virt-acpi-build.c to support ACPI. Therefore, make this information part of the global RISCVVirtState structure so that it can be

Raspberry Pi 3B energy consumption

2025-03-19 Thread Polzini
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 consumption of QEMU’s Raspberry Pi

[PULL 8/8] tests/functional/test_migration: Use "ncat" instead of "nc" in the exec test

2025-03-19 Thread Thomas Huth
From: Thomas Huth "nc" can either be GNU netcat, OpenBSD netcat or NMap ncat. At least GNU netcat currently does not work with this test anymore, though the comment in the test says otherwise. GNU netcat seems to be quite unmaintained nowadays, according to its website (https://netcat.sourceforge

[PULL 2/8] tests/functional/test_arm_orangepi: rename test class to 'OrangePiMachine'

2025-03-19 Thread Thomas Huth
From: Niek Linnenbank The test class in this file contains all functional test cases for testing the Orange Pi PC board. It should be given a name matching the Qemu machine it covers. This commit sets the test class name to 'OrangePiMachine'. Signed-off-by: Niek Linnenbank Fixes: 380f7268b7b (

  1   2   3   >