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 (

[PULL 6/8] docs/devel/testing/functional: Add a section about logging

2025-03-19 Thread Thomas Huth
From: Thomas Huth We should tell the users where to find the log file. While we're at it, also rename the "Overview" heading to a more accurate "Introduction to writing tests" instead. Reported-by: Aditya Gupta Message-ID: <20250318092021.53719-1-th...@redhat.com> Reviewed-by: Daniel P. Berrang

[PULL 3/8] tests/functional: remove all class level fields

2025-03-19 Thread Thomas Huth
From: Daniel P. Berrangé A number of fields are set at the class level on QemuBaseTest, even though the exact same named field is then set at the object level later in most cases. The 'self.logger' initialization in ACPI bits test needs to be removed since 'self.log' won't exist at that point in

[PATCH v3 3/6] hw/uefi: fix error handling in uefi_vars_json_load

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

[PATCH v3 2/6] 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 Reviewed-by: Philippe Mathieu-Daudé --- hw/uefi/var-service-json.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hw/uefi/var-service-json.c

[PATCH v3 5/6] hw/uefi-vars-sysbus: allow for loongarch virt

2025-03-19 Thread Gerd Hoffmann
Allow the device being added to loongarch virt VMs. Signed-off-by: Gerd Hoffmann --- hw/loongarch/virt.c | 2 ++ hw/uefi/Kconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index a5840ff96857..b6f5f6a3b546 100644 --- a/hw/lo

[PATCH v3 6/6] docs/firmware: add feature flag for host uefi variable store

2025-03-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- docs/interop/firmware.json | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index 57f55f6c5455..745d21d82232 100644 --- a/docs/interop/firmware.json +++ b/docs/interop/firmware

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

2025-03-19 Thread Anthony PERARD
On Mon, Mar 17, 2025 at 11:34:12AM -0700, Pierrick Bouvier wrote: > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Pierrick Bouvier Reviewed-by: Anthony PERARD Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech

Re: [PATCH 0/2] qga: Add 'guest-get-load' command

2025-03-19 Thread Yan Vugenfirer
Reviewed-by: Yan Vugenfirer On Fri, Mar 14, 2025 at 1:40 PM Konstantin Kostiuk wrote: > > Konstantin Kostiuk (2): > qga-win: implement a 'guest-get-load' command > qga: Add tests for guest-get-load command > > qga/commands-win32.c | 140 + > qga/gu

[PATCH v2 1/3] scripts: render_block_graph: Fix invalid escape sequence warning with python 3.12

2025-03-19 Thread Peter Krempa
From: Peter Krempa Trying to run 'render_block_graph' produces following warnings on machine with python 3.12: $ ./scripts/render_block_graph.py cd-throttle ble.png ./scripts/render_block_graph.py:57: SyntaxWarning: invalid escape sequence '\l' ' w - Write\l' ./scripts/render_block_graph.

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

2025-03-19 Thread Peter Krempa
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) Peter Krempa (3): scripts: render_block_graph: Fix invalid escape sequence warnin

[PATCH v2 2/3] scripts: render_block_graph: Implement proper argument parser

2025-03-19 Thread Peter Krempa
From: Peter Krempa As no argument parsing is employed the script is hard to use and when running without arguments it blurbs: $ ./scripts/render_block_graph.py Traceback (most recent call last): File "/home/pipo/git/qemu.git/./scripts/render_block_graph.py", line 135, in obj = sys.ar

[PATCH v2 3/3] scripts: render_block_graph: Avoid backtrace on error from virsh

2025-03-19 Thread Peter Krempa
From: Peter Krempa An error from virsh spews also backtrace: $ ./scripts/render_block_graph.py --vm doesnotexist error: failed to get domain 'doesnotexist' Traceback (most recent call last): File "/home/pipo/git/qemu.git/./scripts/render_block_graph.py", line 152, in render_blo

[PATCH v2 1/2] util/qemu-sockets: Add support for keep-alive flag to passive sockets

2025-03-19 Thread Juraj Marcin
From: Juraj Marcin Commit aec21d3175 (qapi: Add InetSocketAddress member keep-alive) introduces the keep-alive flag, which enables the SO_KEEPALIVE socket option, but only on client-side sockets. However, this option is also useful for server-side sockets, so they can check if a client is still r

[PATCH v2 0/2] util/qemu-sockets: Introduce configurable TCP keep-alive idle period

2025-03-19 Thread Juraj Marcin
This series extends the work introduced by commit aec21d3175 ("qapi: Add InetSocketAddress member keep-alive") [1] First, it allows the use of the keep-alive flag for server-side sockets. Then it introduces a new keep-alive-idle-period setting, which changes the TCP_KEEPIDLE socket option on platf

Re: [PATCH 0/3] Cleanups around returns

2025-03-19 Thread Peter Maydell
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/test_msa_nloc_b.c | 9 +++ >

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

2025-03-19 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Tuesday, March 18, 2025 6:47 PM > To: ltaylorsimp...@gmail.com; 'Sid Manning' ; > qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@linaro.org; 'Matheus Bernardino > (QUIC)' ; a...@rev.ng; a...@rev.ng; 'Marco > Liebel (QUIC)

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

2025-03-19 Thread Philippe Mathieu-Daudé
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 design here. Why are we introducing this as some device while it is a core compon

Re: [PATCH 1/3] include/hw/pci: Attach BDF to Memory Attributes

2025-03-19 Thread Jason Chien
Ping Jason Chien 於 2025年3月13日 週四 上午12:59寫道: > Ping. > > Michael/Marcel, would you mind taking a look? Thanks! > > > Jason > > Daniel Henrique Barboza 於 2025年3月7日 週五 > 下午8:40寫道: > >> >> >> On 3/2/25 6:12 AM, Jason Chien wrote: >> > This commit adds the BDF to the memory attributes for DMA operat

Re: [PATCH for-10.1 19/32] vfio: Introduce a new file for VFIODevice definitions

2025-03-19 Thread John Levon
On Tue, Mar 18, 2025 at 10:54:02AM +0100, Cédric Le Goater wrote: > diff --git a/hw/vfio/device.c b/hw/vfio/device.c > new file mode 100644 > index > ..daa5bae59ca9c65ef23aa193d4e63976fcefdde0 > --- /dev/null > +++ b/hw/vfio/device.c > @@ -0,0 +1,331 @@ > +

Re: [PATCH-for-10.1 12/12] tcg: Uninline tcg_gen_insn_start()

2025-03-19 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > tcg_gen_insn_start() is now common to all TCG frontends. > We don't need to keep it inlined, move it to tcg.c. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/tcg/tcg-op.h | 15 --- > include/tcg/tcg.h| 2 ++ > tcg/tcg.c| 1

<    1   2   3   >