Re: [PATCH 0/5] target/riscv: Smepmp fixes to match specification

2025-03-12 Thread Loïc Lefort
On Tue, Feb 25, 2025 at 5:00 PM Loïc Lefort wrote: > Hi, > > These patches fix Smepmp implementation to make it compliant with the spec. > > First patch limits RLB to CSR changes since RLB should not affect privilege > evaluation. Patch 2 extracts some common code into a function (to be used > in

Re: [PATCH v2] tests/qtest/cpu-plug-test: Add cpu hotplug support for LoongArch

2025-03-12 Thread bibo mao
On 2025/3/12 下午2:29, Thomas Huth wrote: On 12/03/2025 04.44, Bibo Mao wrote: Add cpu hotplug testcase support for LoongArch system, it passes to run with command "make check-qtest-loongarch64" as following:    qemu:qtest+qtest-loongarch64 / qtest-loongarch64/cpu-plug-test OK 0.38s 1 subtests

Re: [RFC PATCH] tests/functional: Don't fail any precaching errors

2025-03-12 Thread Nicholas Piggin
On Wed Mar 12, 2025 at 4:36 PM AEST, Thomas Huth wrote: > On 12/03/2025 00.41, Nicholas Piggin wrote: > ... >> I think *no* precaching errors including 404 should cause >> failure because you would still want other tests to proceed >> (in some cases). >> >> But the failure should be caught when th

[PATCH v11 1/8] hw/core: Add config stream

2025-03-12 Thread Ethan Chen via
Make other device can use /hw/core/stream.c by select this config. Reviewed-by: Alistair Francis Signed-off-by: Ethan Chen --- hw/Kconfig | 1 + hw/core/Kconfig | 3 +++ hw/core/meson.build | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/Kconfig b/hw/Kconfi

[PATCH v11 4/8] target/riscv: Add support for IOPMP

2025-03-12 Thread Ethan Chen via
Signed-off-by: Ethan Chen Reviewed-by: Alistair Francis --- target/riscv/cpu.c| 3 +++ target/riscv/cpu_cfg.h| 2 ++ target/riscv/cpu_helper.c | 18 +++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 09de

[PATCH v11 7/8] hw/misc/riscv_iopmp_dispatcher: Device for redirect IOPMP transaction infomation

2025-03-12 Thread Ethan Chen via
This device determines the target IOPMP device for forwarding information based on: * Address: For parallel IOPMP devices * Stage: For cascading IOPMP devices Signed-off-by: Ethan Chen --- hw/misc/meson.build | 1 + hw/misc/riscv_iopmp_dispatcher.c | 139 ++

[PATCH v11 6/8] hw/misc/riscv_iopmp: Add RISC-V IOPMP device

2025-03-12 Thread Ethan Chen via
Support IOPMP specification v0.7. The specification url: https://github.com/riscv-non-isa/iopmp-spec/releases/tag/v0.7 The IOPMP checks whether memory access from a device or CPU is valid. This implementation uses an IOMMU to modify the address space accessed by the device. For device access with

[PATCH v11 8/8] hw/riscv/virt: Add IOPMP support

2025-03-12 Thread Ethan Chen via
- Add 'iopmp=on' option to enable IOPMP. It adds iopmp devices virt machine to protect all regions of system memory. Signed-off-by: Ethan Chen --- docs/specs/index.rst | 1 + docs/specs/riscv-iopmp.rst | 60 ++ docs/system/riscv/virt.rst | 9 + hw/riscv/

Re: [PULL 31/43] hw/arm: Add i.MX 8M Plus EVK board

2025-03-12 Thread Thomas Huth
On 25/02/2025 19.04, Peter Maydell wrote: From: Bernhard Beschow As a first step, implement the bare minimum: CPUs, RAM, interrupt controller, serial. All other devices of the A53 memory map are represented as TYPE_UNIMPLEMENTED_DEVICE, i.e. the whole memory map is provided. This allows for run

Bad error handling in loongarch's kvm_arch_init_vcpu(), need advice

2025-03-12 Thread Markus Armbruster
scripts/coccinelle/error-use-after-free.cocci led me to target/loongarch/kvm/kvm.c: int kvm_arch_init_vcpu(CPUState *cs) { uint64_t val; int ret; Error *local_err = NULL; ret = 0; qemu_add_vm_change_state_handler(kvm_loongarch_vm_stage_change, cs);

[PATCH 5/5] hw/intc/loongarch_pch: Replace legacy reset callback with new api

2025-03-12 Thread Bibo Mao
Replace legacy reset callback register device_class_set_legacy_reset() with new function resettable_class_set_parent_phases(). With new API, it will call reset callback of parent object. The internal state has been cleared in parent object LOONGARCH_PIC_COMMON, here parent_phases.hold() is directl

Re: Building QEMU as a Shared Library

2025-03-12 Thread Pierrick Bouvier
On 3/11/25 21:31, Saanjh Sengupta wrote: Hi, Thank you for the clarification. Regarding the last time /"Stoptrigger might be a better fit for what you want to do, and instead of exiting, you want to resume emulation after N insn. The function qemu_clock_advance_virtual_time() can only be use

Re: [PATCH 1/3] tests/functional/asset: Fail assert fetch when retries are exceeded

2025-03-12 Thread Daniel P . Berrangé
On Wed, Mar 12, 2025 at 03:17:36PM +1000, Nicholas Piggin wrote: > Currently the fetch code does not fail gracefully when retry limit is > exceeded, it just falls through the loop with no file, which ends up > hitting other errors. > > In preparation for adding more cases where a download gets ret

Re: [PATCH 1/2] vfio/migration: Add also max in-flight VFIO device state buffers size limit

2025-03-12 Thread Avihai Horon
On 11/03/2025 18:05, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 3/11/25 17:01, Avihai Horon wrote: On 11/03/2025 17:45, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 3/11/25 15:57, Avihai Horon wrote: On 11/

Re: [PATCH v4 0/4] Support HACE to AST2700 (resend)

2025-03-12 Thread Cédric Le Goater
Jamin, On 2/25/25 08:56, Jamin Lin wrote: This patch series is from https://patchwork.kernel.org/project/qemu-devel/cover/20250213033531.3367697-1-jamin_...@aspeedtech.com/. To expedite the review process, I have separated the HACE patches portion from the https://patchwork.kernel.org/project/

Re: Giving your own patches your Reviewed-by

2025-03-12 Thread Daniel P . Berrangé
On Wed, Mar 12, 2025 at 11:03:04AM +0100, Philippe Mathieu-Daudé wrote: > Hi Markus, > > (Cc'ing Yi, Clément and Zhenzhong for commit eda4c9b5b3c) > > On 12/3/25 10:45, Markus Armbruster wrote: > > I stumbled over commits that carry the author's Reviewed-by. > > > > There may be cases where the

Re: Giving your own patches your Reviewed-by

2025-03-12 Thread Philippe Mathieu-Daudé
On 12/3/25 10:45, Markus Armbruster wrote: I stumbled over commits that carry the author's Reviewed-by. There may be cases where the recorded author isn't the lone author, and the recorded author did some meaningful review of the patch's parts that are not theirs. Mind that we do need all autho

RE: [PATCH v4 0/4] Support HACE to AST2700 (resend)

2025-03-12 Thread Jamin Lin
Hi Cedric, > -Original Message- > From: Cédric Le Goater > Sent: Wednesday, March 12, 2025 5:25 PM > To: Jamin Lin ; Peter Maydell > ; Steven Lee ; Troy > Lee ; Andrew Jeffery ; > Joel Stanley ; open list:ASPEED BMCs > ; open list:All patches CC here > > Cc: Troy Lee > Subject: Re: [PAT

Re: [PULL 31/43] hw/arm: Add i.MX 8M Plus EVK board

2025-03-12 Thread Philippe Mathieu-Daudé
+ Cédric for Aspeed On 12/3/25 11:20, Peter Maydell wrote: On Wed, 12 Mar 2025 at 09:40, Thomas Huth wrote: On 25/02/2025 19.04, Peter Maydell wrote: From: Bernhard Beschow As a first step, implement the bare minimum: CPUs, RAM, interrupt controller, serial. All other devices of the A53 me

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

2025-03-12 Thread zhenwei pi
On 3/12/25 18:11, Markus Armbruster wrote: When cryptodev_lkcf_set_op_desc() fails, we report an error, but continue anyway. This is wrong. We then pass a non-null @local_error to various functions, which could easily fail error_setv()'s assertion on failure. Fail the function instead. Whe

Re: [PATCH] qapi/block-core: Improve x-blockdev-change documentation

2025-03-12 Thread Alberto Garcia
On Tue 11 Mar 2025 02:17:15 PM +01, Markus Armbruster wrote: > The description of feature @unstable is three paragraphs. The second > and third became part of the description by accident in commit > 9fb49daabfb (qapi: Mark unstable QMP parts with feature 'unstable'). > > The second paragraph descr

[PATCH-for-10.1 0/2] target/hexagon: Remove use of MO_TE definition

2025-03-12 Thread Philippe Mathieu-Daudé
In order to make QEMU core components endian agnostic, we need to remove the use of the target-specific MO_TE definition. For Hexagon it is easy as it is equivalent of MO_LE, since the target is only little-endian. Philippe Mathieu-Daudé (2): target/hexagon: Explode MO_TExx -> MO_TE | MO_xx ta

[PATCH-for-10.1] target/i386: Replace MO_TE -> MO_LE

2025-03-12 Thread Philippe Mathieu-Daudé
The x86 architecture is only implemented as little-endian. The MO_TE definition always expands to MO_LE. Replace: - MO_TEUQ -> MO_LE | MO_UQ - MO_TE -> MO_LE Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/emit.c.inc | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) di

Re: Giving your own patches your Reviewed-by

2025-03-12 Thread Daniel P . Berrangé
On Wed, Mar 12, 2025 at 10:45:29AM +0100, Markus Armbruster wrote: > I stumbled over commits that carry the author's Reviewed-by. > > There may be cases where the recorded author isn't the lone author, and > the recorded author did some meaningful review of the patch's parts that > are not theirs.

Re: [PULL 31/43] hw/arm: Add i.MX 8M Plus EVK board

2025-03-12 Thread Cédric Le Goater
On 3/12/25 11:27, Philippe Mathieu-Daudé wrote: + Cédric for Aspeed On 12/3/25 11:20, Peter Maydell wrote: On Wed, 12 Mar 2025 at 09:40, Thomas Huth wrote: On 25/02/2025 19.04, Peter Maydell wrote: From: Bernhard Beschow As a first step, implement the bare minimum: CPUs, RAM, interrupt co

Re: Giving your own patches your Reviewed-by

2025-03-12 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus, > (Cc'ing Yi, Clément and Zhenzhong for commit eda4c9b5b3c) > > On 12/3/25 10:45, Markus Armbruster wrote: >> I stumbled over commits that carry the author's Reviewed-by. >> >> There may be cases where the recorded author isn't the lone author, and >>

Re: Bad error handling in loongarch's kvm_arch_init_vcpu(), need advice

2025-03-12 Thread bibo mao
On 2025/3/12 下午4:59, Paolo Bonzini wrote: On 3/12/25 09:39, Markus Armbruster wrote: scripts/coccinelle/error-use-after-free.cocci led me to target/loongarch/kvm/kvm.c: ret = kvm_cpu_check_lsx(cs, &local_err); if (ret < 0) { error_report_err(local_err); Report

[PULL v2 14/14] hw/sd/sdhci: Remove need for SDHCI_VENDOR_IMX definition

2025-03-12 Thread Philippe Mathieu-Daudé
All instances of TYPE_IMX_USDHC set vendor=SDHCI_VENDOR_IMX. No need to special-case it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Reviewed-by: Bernhard Beschow Message-Id: <20250308213640.13138-3-phi...@linaro.org> --- include/hw/sd/sdhci.h | 1 - hw/arm/fsl-imx25.c

[PATCH-for-10.1 2/2] target/hexagon: Replace MO_TE -> MO_LE

2025-03-12 Thread Philippe Mathieu-Daudé
We only build the Hexagon target using little endianness order. The MO_TE definition always expands to MO_LE. Use the latter to simplify. Signed-off-by: Philippe Mathieu-Daudé --- target/hexagon/macros.h | 10 +- target/hexagon/genptr.c | 8 --

[PATCH-for-10.1 v2] hw/arm/armv7m: Expose and access System Control Space as little endian

2025-03-12 Thread Philippe Mathieu-Daudé
We only build ARM system emulators using little endianness, so the MO_TE definition always expands to MO_LE, and DEVICE_TARGET_ENDIAN to DEVICE_LITTLE_ENDIAN. Replace the definitions by their expanded value, making it closer to the Armv7-M Architecture Reference Manual (ARM DDI 0403E) description:

Re: [PATCH-for-10.1 0/2] target/hexagon: Remove use of MO_TE definition

2025-03-12 Thread Anton Johansson via
On 12/03/25, Philippe Mathieu-Daudé wrote: > In order to make QEMU core components endian agnostic, > we need to remove the use of the target-specific MO_TE > definition. For Hexagon it is easy as it is equivalent > of MO_LE, since the target is only little-endian. > > Philippe Mathieu-Daudé (2):

Re: Giving your own patches your Reviewed-by

2025-03-12 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Since you are looking at this, it reminds me an orthogonal discussion > we refresh from time to time at the KVM forum conference: is it OK to > merge unreviewed patches? We should make an effort to get reviews. If we can't get any within a reasonable time, mergi

Re: [PATCH] ppc/spapr: fix default cpu for pre-10.0 machines.

2025-03-12 Thread Harsh Prateek Bora
On 3/12/25 15:39, Philippe Mathieu-Daudé wrote: On 12/3/25 06:58, Harsh Prateek Bora wrote: When POWER10 CPU was made as default, we missed keeping POWER9 as default for older pseries releases (pre-10.0) at that time. This caused breakge in default cpu evaluation for older pseries machines an

[PATCH v11 2/8] memory: Introduce memory region fetch operation

2025-03-12 Thread Ethan Chen via
Allow memory regions to have different behaviors for read and fetch operations. For example, the RISC-V IOPMP could raise an interrupt when the CPU tries to fetch from a non-executable region. If the fetch operation for a memory region is not implemented, the read operation will still be used for

Re: Giving your own patches your Reviewed-by

2025-03-12 Thread Philippe Mathieu-Daudé
On 12/3/25 11:45, Daniel P. Berrangé wrote: On Wed, Mar 12, 2025 at 10:45:29AM +0100, Markus Armbruster wrote: I stumbled over commits that carry the author's Reviewed-by. There may be cases where the recorded author isn't the lone author, and the recorded author did some meaningful review of t

Re: [PATCH-for-10.1 v2] hw/arm/armv7m: Expose and access System Control Space as little endian

2025-03-12 Thread Peter Maydell
On Wed, 12 Mar 2025 at 10:48, Philippe Mathieu-Daudé wrote: > > We only build ARM system emulators using little > endianness, so the MO_TE definition always expands to > MO_LE, and DEVICE_TARGET_ENDIAN to DEVICE_LITTLE_ENDIAN. > > Replace the definitions by their expanded value, making > it closer

Re: [PULL 31/43] hw/arm: Add i.MX 8M Plus EVK board

2025-03-12 Thread Peter Maydell
On Wed, 12 Mar 2025 at 10:44, Cédric Le Goater wrote: > > On 3/12/25 11:27, Philippe Mathieu-Daudé wrote: > > + Cédric for Aspeed > > > > On 12/3/25 11:20, Peter Maydell wrote: > >> The bug is that this is directly inheriting from TYPE_DEVICE, > >> not from TYPE_SYSBUS_DEVICE. Doing the former is

Re: [PATCH v2 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Christian Schoenebeck
On Wednesday, March 12, 2025 3:25:20 PM CET Greg Kurz wrote: > On Wed, 12 Mar 2025 15:11:41 +0100 > Christian Schoenebeck wrote: > > > On Tuesday, March 11, 2025 6:28:09 PM CET Greg Kurz wrote: > > > Enhance the `use-after-unlink` test with a new check for the > > > case where the client wants to

[PATCH v2 0/3] tests/functional/asset: improve partial-download handling

2025-03-12 Thread Nicholas Piggin
v1 discussion: https://lore.kernel.org/qemu-devel/20250312051739.938441-1-npig...@gmail.com/T/#md49b293a64207b578600a8c428bccbce3d471e68 Changes since v1: - Change retry exceeded handling to be a check for no file - Tidied comments and debug leftover from patch 2 - If downloaded size does not ma

Re: [RFC PATCH v2 01/20] backends/iommufd: Introduce iommufd_backend_alloc_viommu

2025-03-12 Thread Eric Auger
Hi, On 3/11/25 3:10 PM, Shameer Kolothum wrote: > From: Nicolin Chen > > Add a helper to allocate a viommu object. > > Signed-off-by: Nicolin Chen > Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger Eric > --- > backends/iommufd.c | 25 + > backends/trace

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

2025-03-12 Thread Eric Auger
Hi Shameer, On 3/11/25 3:10 PM, Shameer Kolothum wrote: > Based on SMMUv3 as a parent device, add a user-creatable smmuv3-accel > device. In order to support vfio-pci dev assignment with a Guest guest > SMMUv3, the physical SMMUv3 has to be configured in nested(S1+s2) nested (s1+s2) > mode, with

Re: [RFC PATCH v2 02/20] backends/iommufd: Introduce iommufd_vdev_alloc

2025-03-12 Thread Eric Auger
Hi Shameer, On 3/11/25 3:10 PM, Shameer Kolothum wrote: > From: Nicolin Chen > > Add a helper to allocate an iommufd device's virtual device (in the user > space) per a viommu instance. > > Signed-off-by: Nicolin Chen > Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger Eric > --- > b

Re: [PATCH v5 2/3] Skip NaN mode check for soft-float

2025-03-12 Thread Peter Maydell
On Wed, 26 Feb 2025 at 17:03, Aleksandar Rakic wrote: > > From: Aleksandar Rakic > > Skip NaN mode check for soft-float since NaN mode is irrelevant if an ELF > binary's FPU mode is soft-float, i.e. it doesn't utilize a FPU. > > Cherry-picked 63492a56485f6b755fccf7ad623f7a189bfc79b6 > from https:

[PATCH 1/1 v2] [RISC-V/RVV] Generate strided vector loads/stores with tcg nodes.

2025-03-12 Thread Paolo Savini
This commit improves the performance of QEMU when emulating strided vector loads and stores by substituting the call for the helper function with the generation of equivalent TCG operations. Signed-off-by: Paolo Savini Reviewed-by: Daniel Henrique Barboza --- target/riscv/insn_trans/trans_rvv.c

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

2025-03-12 Thread Peter Maydell
On Wed, 12 Mar 2025 at 14:35, Markus Armbruster wrote: > > Tracked down with scripts/coccinelle/err-bad-newline.cocci. > > Signed-off-by: Markus Armbruster > --- > net/vmnet-common.m | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/vmnet-common.m b/net/vmnet-common.m

Re: [PATCH v5 1/3] Add support for emulation of CRC32 instructions

2025-03-12 Thread Aleksandar Rakic
Hi, Could you please let us know if you have any comments on the latest version of this patch? Kind regards, Aleksandar Rakic

Re: Cross-compilation artifact is broken

2025-03-12 Thread Daniel P . Berrangé
On Wed, Mar 12, 2025 at 02:05:09PM +, Daniel P. Berrangé wrote: > On Wed, Mar 12, 2025 at 03:52:45PM +0200, Konstantin Kostiuk wrote: > > Hi All, > > > > I cross-compiled qemu-ga from current master branch > > (825b96dbcee23d134b691fc75618b59c5f53da32) and found strange behavior. > > > > Conf

Giving your own patches your Reviewed-by

2025-03-12 Thread Markus Armbruster
I stumbled over commits that carry the author's Reviewed-by. There may be cases where the recorded author isn't the lone author, and the recorded author did some meaningful review of the patch's parts that are not theirs. Mind that we do need all authors to provide their Signed-off-by. When the

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

2025-03-12 Thread Markus Armbruster
zhenwei pi writes: > On 3/12/25 18:11, Markus Armbruster wrote: >> When cryptodev_lkcf_set_op_desc() fails, we report an error, but >> continue anyway. This is wrong. We then pass a non-null @local_error >> to various functions, which could easily fail error_setv()'s assertion >> on failure. >>

Re: [PATCH 1/1] util/cacheflush: Make first DSB unconditional on aarch64

2025-03-12 Thread Richard Henderson
On 3/12/25 07:18, Peter Maydell wrote: On Mon, 10 Mar 2025 at 20:36, Joe Komlodi wrote: On ARM hosts with CTR_EL0.DIC and CTR_EL0.IDC set, this would only cause an ISB to be executed during cache maintenance, which could lead to QEMU executing TBs containing garbage instructions. This seems t

Re: [PATCH 0/2] target/arm: SME vs FP enable fixes

2025-03-12 Thread Peter Maydell
On Fri, 7 Mar 2025 at 19:05, Richard Henderson wrote: > > If SME Streaming Mode is enabled, but FP is disabled, we get two > assertion failures within the translator. Beyond the assertions, > this combination should succeed because we're executing on the > SME co-processor's registers, not the co

Re: Cross-compilation artifact is broken

2025-03-12 Thread Peter Maydell
On Wed, 12 Mar 2025 at 14:24, Daniel P. Berrangé wrote: > > On Wed, Mar 12, 2025 at 02:05:09PM +, Daniel P. Berrangé wrote: > > On Wed, Mar 12, 2025 at 03:52:45PM +0200, Konstantin Kostiuk wrote: > > > Hi All, > > > > > > I cross-compiled qemu-ga from current master branch > > > (825b96dbcee23

Re: [PATCH] Revert "hw/char/pl011: Warn when using disabled receiver"

2025-03-12 Thread Philippe Mathieu-Daudé
On 12/3/25 14:43, Peter Maydell wrote: On Wed, 12 Mar 2025 at 13:36, Peter Maydell wrote: On Tue, 11 Mar 2025 at 15:37, Paolo Bonzini wrote: The guest does not control whether characters are sent on the UART. Sending them before the guest happens to boot will now result in a "guest error" l

[PATCH] block: Fix bdrv_activate() not to fail without medium

2025-03-12 Thread Markus Armbruster
bdrv_activate() returns failure without setting an error when !bs->drv. This is suspicious. Turns out it used to succeed then, until commit 5416645fcf82 changed it to return -ENOMEDIUM. Return zero instead. Fixes: 5416645fcf82 (block: return error-code from bdrv_invalidate_cache) Signed-off-by:

Re: [PATCH v5 2/3] Skip NaN mode check for soft-float

2025-03-12 Thread Aleksandar Rakic
Hi, Could you please let us know if you have any comments on the latest version of this patch? Kind regards, Aleksandar Rakic

[PATCH-for-10.1 v2] target/i386: Replace MO_TE* -> MO_LE*

2025-03-12 Thread Philippe Mathieu-Daudé
The x86 architecture is only implemented as little-endian. The MO_TE definition always expands to MO_LE. Replace: - MO_TEUQ -> MO_LEUQ - MO_TE -> MO_LE Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/emit.c.inc | 6 +++--- 1 file changed, 3 insertio

Re: [PATCH v2 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Greg Kurz
On Wed, 12 Mar 2025 15:11:41 +0100 Christian Schoenebeck wrote: > On Tuesday, March 11, 2025 6:28:09 PM CET Greg Kurz wrote: > > Enhance the `use-after-unlink` test with a new check for the > > case where the client wants to alter the size of an unlinked > > file for which it still has an active

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

2025-03-12 Thread Markus Armbruster
Tracked down with scripts/coccinelle/err-bad-newline.cocci. Signed-off-by: Markus Armbruster --- net/vmnet-common.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmnet-common.m b/net/vmnet-common.m index 54d900ba67..ab33ce2b0c 100644 --- a/net/vmnet-common.m +++ b/net/v

[PATCH v3 4/6] 9pfs: Introduce futimens file op

2025-03-12 Thread Greg Kurz
Add an futimens operation to the fs driver and use if when a fid has a valid file descriptor. This is required to support more cases where the client wants to do an action on an unlinked file which it still has an open file decriptor for. Only 9P2000.L was considered. Reviewed-by: Christian Schoe

[PATCH v3 1/6] 9pfs: local : Introduce local_fid_fd() helper

2025-03-12 Thread Greg Kurz
Factor out duplicated code to a single helper. More users to come. Reviewed-by: Christian Schoenebeck Signed-off-by: Greg Kurz v2: - simplified local_fid_fd() --- hw/9pfs/9p-local.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/9p-local.c

[PATCH v3 0/6] 9pfs: Fix ftruncate-after-unlink

2025-03-12 Thread Greg Kurz
QEMU 9.2 already fixed the long standing limitation of failing fstat() on unlinked files. This series does something similar for ftruncate(). The following program can be straced inside the guest with a shared fs in passthrough mode over 9p2000.L. int main(void) { struct stat st;

[PATCH v3 3/6] 9pfs: Introduce ftruncate file op

2025-03-12 Thread Greg Kurz
Add an ftruncate operation to the fs driver and use if when a fid has a valid file descriptor. This is required to support more cases where the client wants to do an action on an unlinked file which it still has an open file decriptor for. Only 9P2000.L was considered. Reviewed-by: Christian Scho

[PATCH v3 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Greg Kurz
Enhance the `use-after-unlink` test with a new check for the case where the client wants to alter the size of an unlinked file for which it still has an active fid. Suggested-by: Christian Schoenebeck Signed-off-by: Greg Kurz v3: - check the size of the truncated file --- tests/qtest/virtio-9p

[PATCH v3 2/6] 9pfs: Don't use file descriptors in core code

2025-03-12 Thread Greg Kurz
v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid has a valid file descriptor or directory stream. Even though the fields are accessible, this is an implementation detail of the local backend that should not be manipulated directly by the server code. Abstract that with a new h

[PATCH v3 5/6] tests/9p: add 'Tsetattr' request to test client

2025-03-12 Thread Greg Kurz
From: Christian Schoenebeck Add and implement functions to 9pfs test client for sending a 9p2000.L 'Tsetattr' request and receiving its 'Rsetattr' response counterpart. Signed-off-by: Christian Schoenebeck Signed-off-by: Greg Kurz --- tests/qtest/libqos/virtio-9p-client.c | 49 +++

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

2025-03-12 Thread Eric Auger
Hi Shameer, On 3/11/25 3:10 PM, Shameer Kolothum wrote: > Allow cold-plug smmuv3-accel to virt If the machine wide smmuv3 > is not specified. > > No FDT support is added for now. > > Signed-off-by: Shameer Kolothum > --- > hw/arm/virt.c | 12 > hw/core/sysbus-fdt.c | 1 +

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

2025-03-12 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Nicolin Chen > Sent: Tuesday, March 11, 2025 8:23 PM > To: Shameerali Kolothum Thodi > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; > eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; > ddut...@redhat.com; berra...@redhat.com; nath...@nvi

Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-12 Thread Yan Vugenfirer
On Tue, Mar 11, 2025 at 4:02 AM Suthikulpanit, Suravee < suravee.suthikulpa...@amd.com> wrote: > > > On 3/9/2025 8:44 PM, Michael S. Tsirkin wrote: > > On Tue, Mar 04, 2025 at 06:37:47PM +, Suravee Suthikulpanit wrote: > >> The QEMU-emulated AMD IOMMU PCI device is implemented based on the AMD

[PATCH v3 1/3] tests/functional/asset: Fail assert fetch when retries are exceeded

2025-03-12 Thread Nicholas Piggin
Currently the fetch code does not fail gracefully when retry limit is exceeded, it just falls through the loop with no file, which ends up hitting other errors. Add a check for non-existing file, which indicates the retry limit was exceeded. Reviewed-by: Daniel P. Berrangé Signed-off-by: Nichola

[PATCH v3 0/3] tests/functional/asset: improve partial-download handling

2025-03-12 Thread Nicholas Piggin
v2 discussion: https://lore.kernel.org/qemu-devel/20250312122559.944533-1-npig...@gmail.com/T/#m9e610343e190d6e65148eb6c9d2e8f4eb8b857b8 Changes since v2: - Fixed junk in patch 3. - Add R-B. Test results for functional-system-debian and -fedora can be seen here: https://gitlab.com/npiggin/qemu/-

[PATCH v3 3/3] tests/functional/asset: Add AssetError exception class

2025-03-12 Thread Nicholas Piggin
Assets are uniquely identified by human-readable-ish url, so make an AssetError exception class that prints url with error message. A property 'transient' is used to capture whether the client may retry or try again later, or if it is a serious and likely permanent error. This is used to retain th

[PATCH v3 2/3] tests/functional/asset: Verify downloaded size

2025-03-12 Thread Nicholas Piggin
If the server provides a Content-Length header, use that to verify the size of the downloaded file. This catches cases where the connection terminates early, and gives the opportunity to retry. Without this, the checksum will likely mismatch and fail without retry. Reviewed-by: Daniel P. Berrangé

Cross-compilation artifact is broken

2025-03-12 Thread Konstantin Kostiuk
Hi All, I cross-compiled qemu-ga from current master branch (825b96dbcee23d134b691fc75618b59c5f53da32) and found strange behavior. Configure CLI: ./configure --disable-docs --disable-system --disable-user --cross-prefix=x86_64-w64-mingw32- --enable-guest-agent --disable-guest-agent-msi --disable-

Re: [PATCH v2 1/6] 9pfs: local : Introduce local_fid_fd() helper

2025-03-12 Thread Christian Schoenebeck
On Tuesday, March 11, 2025 6:28:04 PM CET Greg Kurz wrote: > Factor out duplicated code to a single helper. More users to come. > > Signed-off-by: Greg Kurz > > v2: - simplified local_fid_fd() > --- Reviewed-by: Christian Schoenebeck > hw/9pfs/9p-local.c | 23 ++- > 1 fil

RE: [PATCH 30/38] target/hexagon: Add a TLB count property

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

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

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

Re: [PATCH v2 2/6] 9pfs: Don't use file descriptors in core code

2025-03-12 Thread Christian Schoenebeck
On Tuesday, March 11, 2025 6:28:05 PM CET Greg Kurz wrote: > v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid > has a valid file descriptor or directory stream. Even though the fields > are accessible, this is an implementation detail of the local backend > that should not be m

Re: Cross-compilation artifact is broken

2025-03-12 Thread Daniel P . Berrangé
On Wed, Mar 12, 2025 at 03:52:45PM +0200, Konstantin Kostiuk wrote: > Hi All, > > I cross-compiled qemu-ga from current master branch > (825b96dbcee23d134b691fc75618b59c5f53da32) and found strange behavior. > > Configure CLI: > ./configure --disable-docs --disable-system --disable-user > --cross-

Re: [PATCH v2 3/6] 9pfs: Introduce ftruncate file op

2025-03-12 Thread Christian Schoenebeck
On Tuesday, March 11, 2025 6:28:06 PM CET Greg Kurz wrote: > Add an ftruncate operation to the fs driver and use if when a fid has > a valid file descriptor. This is required to support more cases where > the client wants to do an action on an unlinked file which it still > has an open file decript

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

2025-03-12 Thread Shameerali Kolothum Thodi via
Hi Eric, > -Original Message- > From: qemu-devel- > bounces+shameerali.kolothum.thodi=huawei@nongnu.org devel-bounces+shameerali.kolothum.thodi=huawei@nongnu.org> On > Behalf Of Eric Auger > Sent: Wednesday, March 12, 2025 3:36 PM > To: Shameerali Kolothum Thodi > ; qemu-...@nongn

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

2025-03-12 Thread Eric Auger
Hi Shameer, On 3/11/25 3:10 PM, Shameer Kolothum wrote: > User must associate a pxb-pcie root bus to smmuv3-accel > and that is set as the primary-bus for the smmu dev. why do we require a pxb-pcie root bus? why can't pci.0 root bus be used for simpler use cases (ie. I just want to passthough a N

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

2025-03-12 Thread Eric Auger
Hi Shameer, On 3/12/25 4:46 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: qemu-devel- >> bounces+shameerali.kolothum.thodi=huawei@nongnu.org > devel-bounces+shameerali.kolothum.thodi=huawei@nongnu.org> On >> Behalf Of Eric Auger >> Sent: Wednesda

[PATCH 0/1 v2] [RISCV/RVV] Generate strided vector loads/stores with tcg nodes.

2025-03-12 Thread Paolo Savini
Previous version: - PATCH v1: https://lore.kernel.org/all/20250211182056.412867-1-paolo.sav...@embecosm.com/ Follwing the suggestion in the following review by Daniel Barboza: https://lore.kernel.org/all/9be2ecc4-fed3-4774-a921-259f36e23...@ventanamicro.com/ we simplified the emulation by tcg

[PATCH] system: fix assertion when cannot get/set rlimit

2025-03-12 Thread Nikita Ostrenkov
If cannot get/set rlinit warn_print called, which uses monitor_lock mutex. monitor_lock mutex initialized in monitor_init_globals, then monitor_init_globals should be called before os_setup_limits. Signed-off-by: Nikita Ostrenkov --- system/runstate.c | 1 - system/vl.c | 2 ++ 2 files c

Re: [PATCH v3 6/6] tests/9p: Test `Tsetattr` can truncate unlinked file

2025-03-12 Thread Christian Schoenebeck
On Wednesday, March 12, 2025 4:29:32 PM CET Greg Kurz wrote: > Enhance the `use-after-unlink` test with a new check for the > case where the client wants to alter the size of an unlinked > file for which it still has an active fid. > > Suggested-by: Christian Schoenebeck > Signed-off-by: Greg Kur

[PATCH 2/2] hw/arm/fsl-imx8mp: Remove unused define

2025-03-12 Thread Bernhard Beschow
The SoC has three SPI controllers, not four. Remove the extra define of an SPI IRQ. Fixes: 06908a84f036 "hw/arm/fsl-imx8mp: Add SPI controllers" Signed-off-by: Bernhard Beschow --- include/hw/arm/fsl-imx8mp.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/arm/fsl-imx8mp.h b/includ

[PATCH 1/2] hw/arm/fsl-imx8mp: Make SoC not user-creatable, derive from TYPE_SYS_BUS_DEVICE

2025-03-12 Thread Bernhard Beschow
Fixes a crash when creating the SoC object on the command line: $ ./qemu-system-aarch64 -M virt -device fsl-imx8mp ** ERROR:../../devel/qemu/tcg/tcg.c:1006:tcg_register_thread: assertion failed: (n < tcg_max_ctxs) Bail out! ERROR:../../devel/qemu/tcg/tcg.c:1006:tcg_register_thread: as

[PATCH v11 3/8] system/physmem: Support IOMMU granularity smaller than TARGET_PAGE size

2025-03-12 Thread Ethan Chen via
If the IOMMU granularity is smaller than the TARGET_PAGE size, there may be multiple entries within the same page. To obtain the correct result, pass the original address to the IOMMU. Similar to the RISC-V PMP solution, the TLB_INVALID_MASK will be set when there are multiple entries in the same

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

2025-03-12 Thread Markus Armbruster
When cryptodev_lkcf_set_op_desc() fails, we report an error, but continue anyway. This is wrong. We then pass a non-null @local_error to various functions, which could easily fail error_setv()'s assertion on failure. Fail the function instead. When qcrypto_akcipher_new() fails, we fail the func

Re: [PATCH] chardev/char-pty: Avoid losing bytes when the other side just (re-)connected

2025-03-12 Thread Philippe Mathieu-Daudé
Hi Thomas, (patch merged as commit 4f7689f0817) On 16/8/23 23:07, Thomas Huth wrote: When starting a guest via libvirt with "virsh start --console ...", the first second of the console output is missing. This is especially annoying on s390x that only has a text console by default and no graphic

Re: [PATCH 2/7] hw/hyperv/hyperv.h: header cleanup

2025-03-12 Thread Pierrick Bouvier
On 3/6/25 04:27, Alex Bennée wrote: Pierrick Bouvier writes: Signed-off-by: Pierrick Bouvier --- include/hw/hyperv/hyperv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/hyperv/hyperv.h b/include/hw/hyperv/hyperv.h index d717b4e13d4..c6f7039447f 100644 -

Re: [PULL 00/72] ppc-for-10.0-1 queue

2025-03-12 Thread Stefan Hajnoczi
On Tue, Mar 11, 2025 at 8:59 PM Nicholas Piggin wrote: > > The following changes since commit 825b96dbcee23d134b691fc75618b59c5f53da32: > > Merge tag 'migration-20250310-pull-request' of > https://gitlab.com/farosas/qemu into staging (2025-03-11 09:32:07 +0800) > > are available in the Git repo

[PATCH-for-10.1 1/2] target/hexagon: Explode MO_TExx -> MO_TE | MO_xx

2025-03-12 Thread Philippe Mathieu-Daudé
Extract the implicit MO_TE definition in order to replace it in the next commit. Mechanical change using: $ for n in UW UL UQ UO SW SL SQ; do \ sed -i -e "s/MO_TE$n/MO_TE | MO_$n/" \ $(git grep -l MO_TE$n target/hexagon); \ done Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PULL 31/43] hw/arm: Add i.MX 8M Plus EVK board

2025-03-12 Thread Peter Maydell
On Wed, 12 Mar 2025 at 09:40, Thomas Huth wrote: > > On 25/02/2025 19.04, Peter Maydell wrote: > > From: Bernhard Beschow > > > > As a first step, implement the bare minimum: CPUs, RAM, interrupt > > controller, > > serial. All other devices of the A53 memory map are represented as > > TYPE_UNIM

Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device

2025-03-12 Thread Jonathan Cameron via
On Tue, 11 Mar 2025 09:08:06 +0100 Gerd Hoffmann wrote: > Hi, > > > As a heads up, I believe we have a similar problem with a few of the CXL > > IDs. > > The root port and type 3 device both use Intel IDs that were not reserved > > for this purpose. VID=0x8086, DID=0x7075 and DID=0x0d93 >

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

2025-03-12 Thread Eric Auger
Hi Shameer, On 3/12/25 6:34 PM, Shameerali Kolothum Thodi wrote: > >> -Original Message- >> From: Eric Auger >> Sent: Wednesday, March 12, 2025 4:28 PM >> To: Shameerali Kolothum Thodi >> ; qemu-...@nongnu.org; >> qemu-devel@nongnu.org >> Cc: peter.mayd...@linaro.org; j...@nvidia.com; ni

Re: Cross-compilation artifact is broken

2025-03-12 Thread Alex Bennée
Daniel P. Berrangé writes: > On Wed, Mar 12, 2025 at 02:05:09PM +, Daniel P. Berrangé wrote: >> On Wed, Mar 12, 2025 at 03:52:45PM +0200, Konstantin Kostiuk wrote: >> > Hi All, >> > >> > I cross-compiled qemu-ga from current master branch >> > (825b96dbcee23d134b691fc75618b59c5f53da32) and f

RE: [PATCH 33/38] target/hexagon: Add gdb support for sys regs

2025-03-12 Thread Sid Manning
> -Original Message- > From: ltaylorsimp...@gmail.com > Sent: Wednesday, March 12, 2025 11:27 AM > To: 'Brian Cain' ; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@linaro.org; Matheus Bernardino > (QUIC) ; a...@rev.ng; a...@rev.ng; Marco > Liebel (QUIC) ; alex.ben...@l

Re: [PATCH 09/38] target/hexagon: Add guest, system reg number state

2025-03-12 Thread Philippe Mathieu-Daudé
Hi Brian, On 1/3/25 06:25, Brian Cain wrote: From: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/cpu.h | 8 target/hexagon/cpu.c | 17 + 2 files changed, 25 insertions(+) diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 20ea0adcca..b7789a

Re: [PATCH 34/38] target/hexagon: Add initial MMU model

2025-03-12 Thread Philippe Mathieu-Daudé
On 1/3/25 06:26, Brian Cain wrote: From: Brian Cain Co-authored-by: Taylor Simpson Co-authored-by: Michael Lambert Co-authored-by: Sid Manning Co-authored-by: Matheus Tavares Bernardino Signed-off-by: Brian Cain --- target/hexagon/cpu-param.h | 4 + target/hexagon/cpu.h | 13 +

  1   2   3   >