Re: [PATCH v2] target/riscv: don't verify ISA compatibility for zicntr and zihpm

2023-11-20 Thread Alistair Francis
On Wed, Nov 15, 2023 at 12:46 AM Clément Chigot wrote: > > The extensions zicntr and zihpm were officially added in the privilege > instruction set specification 1.12. However, QEMU has been implemented > them long before it and thus they are forced to be on during the cpu > initialization to ensu

Re: [PATCH v2 1/1] target/riscv: correct csr_ops[CSR_MSECCFG]

2023-11-20 Thread Alistair Francis
On Wed, Nov 8, 2023 at 2:40 AM Michael Tokarev wrote: > > 30.10.2023 13:21, Heinrich Schuchardt wrote: > > The CSR register mseccfg is used by multiple extensions: Smepm and Zkr. > > > > Consider this when checking the existence of the register. > > > > Fixes: 77442380ecbe ("target/riscv: rvk: add

Re: [PATCH] riscv: Fix SiFive E CLINT clock frequency

2023-11-20 Thread Alistair Francis
On Fri, Nov 17, 2023 at 6:31 PM Román Cárdenas wrote: > > If you check the manual of SiFive E310 > (https://cdn.sparkfun.com/assets/7/f/0/2/7/fe310-g002-manual-v19p05.pdf), > you can see in Figure 1 that the CLINT is connected to the real time clock, > which also feeds the AON peripheral (they s

Re: [PATCH] riscv: Fix SiFive E CLINT clock frequency

2023-11-20 Thread Alistair Francis
On Fri, Nov 17, 2023 at 6:31 PM Román Cárdenas wrote: > > If you check the manual of SiFive E310 > (https://cdn.sparkfun.com/assets/7/f/0/2/7/fe310-g002-manual-v19p05.pdf), > you can see in Figure 1 that the CLINT is connected to the real time clock, > which also feeds the AON peripheral (they s

Re: [PATCH 1/1] hw/intc/riscv_aclint:Change the way to get CPUState from hard-base to pu_index

2023-11-20 Thread Alistair Francis
On Mon, Nov 20, 2023 at 10:17 PM Philippe Mathieu-Daudé wrote: > > On 13/11/23 05:25, LeoHou wrote: > > On 9/11/23 23:26, Philippe Mathieu-Daudé wrote: > > > >> Hi Leo, > >> > >> First, I can't find your patch in my mailbox, so I'm replying to > >> Dongxue's review. I also can't find the origina

Re: [PATCH 1/2] target/riscv/cpu_helper.c: Invalid exception on MMU translation stage

2023-11-20 Thread Alistair Francis
On Mon, Nov 20, 2023 at 11:19 PM Ivan Klokov wrote: > > According to RISCV priveleged spec sect. 5.3.2 Virtual Address Translation > Process > access-fault exceptions may raise only after PMA/PMP check. Current > implementation > generates an acces-fault for mbare mode even if there were no PMA/

Re: [PATCH for-9.0] hw: Add compat machines for 9.0

2023-11-20 Thread Harsh Prateek Bora
On 11/20/23 15:12, Cornelia Huck wrote: Add 9.0 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 17 +++

RE: [PATCH-for-8.2 v2] backends/cryptodev: Do not ignore throttle/backends Errors

2023-11-20 Thread Gonglei (Arei)
> -Original Message- > From: Philippe Mathieu-Daudé [mailto:phi...@linaro.org] > Sent: Monday, November 20, 2023 11:04 PM > To: qemu-devel@nongnu.org > Cc: Zhenwei Pi ; Gonglei (Arei) > ; Markus Armbruster ; > Daniel P . Berrangé ; Philippe Mathieu-Daudé > ; qemu-sta...@nongnu.org > Subje

Re: [PATCH v3 4/4] hw/riscv/virt: Add IOPMP support

2023-11-20 Thread Alistair Francis
On Tue, Nov 14, 2023 at 7:48 PM Ethan Chen via wrote: > > - Add 'iopmp=on' option to enable a iopmp device and a dma device > connect to the iopmp device > - Add 'iopmp_cascade=on' option to enable iopmp cascading. Can we document these in docs/system/riscv/virt.rst Alistair > > Signed-off-by:

Re: [PATCH v3 1/4] hw/core: Add config stream

2023-11-20 Thread Alistair Francis
On Tue, Nov 14, 2023 at 7:49 PM Ethan Chen via wrote: > > Make other device can use /hw/core/stream.c by select this config. > > Signed-off-by: Ethan Chen > --- > hw/core/Kconfig | 3 +++ > hw/core/meson.build | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/hw/core/Kconfig b/hw/co

Re: [PATCH v3 1/4] hw/core: Add config stream

2023-11-20 Thread Alistair Francis
On Tue, Nov 21, 2023 at 3:24 PM Alistair Francis wrote: > > On Tue, Nov 14, 2023 at 7:49 PM Ethan Chen via wrote: > > > > Make other device can use /hw/core/stream.c by select this config. > > > > Signed-off-by: Ethan Chen > > --- > > hw/core/Kconfig | 3 +++ > > hw/core/meson.build | 1 + >

Re: [PATCH v2] disas/cris: Pass buffer size to format_dec() to avoid overflow warning

2023-11-20 Thread Akihiko Odaki
On 2023/11/21 6:45, Paolo Bonzini wrote: From: Philippe Mathieu-Daudé Propagate the buffer size to format_dec() and use snprintf(). This should silence this UBSan -Wformat-overflow warning: In file included from /usr/include/stdio.h:906, from include/qemu/osdep.h:114,

Re: [PATCH v3 2/4] Add RISC-V IOPMP support

2023-11-20 Thread Alistair Francis
On Tue, Nov 14, 2023 at 7:48 PM Ethan Chen via wrote: > > Support specification Version 1.0.0-draft4 rapid-k model. Thanks for the patch. Can you add some more information here. It would be great if you can link to the spec and explain the implementation a little bit > > Signed-off-by: Ethan Ch

Re: [PATCH v3 3/4] hw/dma: Add Andes ATCDMAC300 support

2023-11-20 Thread Alistair Francis
On Tue, Nov 14, 2023 at 7:49 PM Ethan Chen via wrote: > What is an "ATCDMAC300"? Can you provide more context? Alistair > Signed-off-by: Ethan Chen > --- > hw/dma/Kconfig | 4 + > hw/dma/atcdmac300.c | 566 > hw/dma/meson.build

[PATCH] tests/qtest: check the return value

2023-11-20 Thread zhujun2
These variables "ret" are never referenced in the code, that add check logic for the "ret" Signed-off-by: zhujun2 --- tests/qtest/test-filter-mirror.c | 1 + tests/qtest/test-filter-redirector.c | 2 ++ tests/qtest/virtio-net-test.c| 1 + 3 files changed, 4 insertions(+) diff --git

Re: [PATCH-for-8.2?] hw/acpi/erst: Do not ignore Error* in realize handler

2023-11-20 Thread Ani Sinha
> On 20-Nov-2023, at 6:30 PM, Philippe Mathieu-Daudé wrote: > > erst_realizefn() calls functions which could update the 'errp' > argument, but then ignores it. Use the ERRP_GUARD() macro and > check *errp, as suggested in commit ae7c80a7bd ("error: New macro > ERRP_GUARD()"). > > Cc: qemu-sta

Re: [PATCH-for-8.2?] hw/arm/fsl-imx: Do not ignore Error argument

2023-11-20 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 20 Nov 2023 at 11:51, Philippe Mathieu-Daudé > wrote: >> >> Both i.MX25 and i.MX6 SoC models ignore the Error argument when >> setting the PHY number. Pick &error_abort which is the error >> used by the i.MX7 SoC (see commit 1f7197deb0 "ability to change >> the F

Re: [PATCH] tests/qtest: check the return value

2023-11-20 Thread Thomas Huth
Thanks, patch looks better this way, but I'd still like to ask you to fix two small issues: On 21/11/2023 07.16, zhujun2 wrote: These variables "ret" are never referenced in the code, that s/, that/, thus/ add check logic for the "ret" Signed-off-by: zhujun2 Could you *please* fix yo

Re: [PATCH] vl: add missing display_remote++

2023-11-20 Thread Marc-André Lureau
Hi On Fri, Nov 17, 2023 at 6:18 PM wrote: > > From: Marc-André Lureau > > We should also consider -display vnc= as setting up a remote display, > and not attempt to add another default one. > > The display_remote++ in qemu_setup_display() isn't necessary at this > point, but is there for complet

Re: [PATCH v4 03/11] ppc/pnv: New powernv10-rainier machine type

2023-11-20 Thread Cédric Le Goater
On 11/21/23 00:51, Glenn Miles wrote: Create a new powernv machine type, powernv10-rainier, that will contain rainier-specific devices. Signed-off-by: Glenn Miles --- hw/ppc/pnv.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/hw/ppc/pnv.c

Re: [PATCH v4 04/11] ppc/pnv: Add pca9552 to powernv10-rainier for PCIe hotplug power control

2023-11-20 Thread Cédric Le Goater
On 11/21/23 00:51, Glenn Miles wrote: The Power Hypervisor code expects to see a pca9552 device connected to the 3rd PNV I2C engine on port 1 at I2C address 0x63 (or left- justified address of 0xC6). This is used by hypervisor code to control PCIe slot power during hotplug events. Signed-off-by

Re: [PATCH-for-9.0] iothread: Remove unused Error** argument in aio_context_set_aio_params

2023-11-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > aio_context_set_aio_params() doesn't use its undocumented > Error** argument. Remove it to simplify. > > Note this removes a use of "unchecked Error**" in > iothread_set_aio_context_params(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbrust

RE: [PATCH] tests/qtest: check the return value

2023-11-20 Thread Zhang, Chen
> -Original Message- > From: zhujun2 > Sent: Tuesday, November 21, 2023 2:17 PM > To: Zhang, Chen > Cc: lviv...@redhat.com; pbonz...@redhat.com; qemu-devel@nongnu.org; > th...@redhat.com; zhuj...@cmss.chinamobile.com > Subject: [PATCH] tests/qtest: check the return value > > These var

Re: [PATCH v2] tests/acpi/bios-tables-test: do not write new blobs unless there are changes

2023-11-20 Thread Ani Sinha
> On 16-Nov-2023, at 11:30 AM, Ani Sinha wrote: > > > >> On 07-Nov-2023, at 10:19 AM, Ani Sinha wrote: >> >> When dumping table blobs using rebuild-expected-aml.sh, table blobs from all >> test variants are dumped regardless of whether there are any actual changes >> to >> the tables or n

[PATCH v2 1/2] target/riscv/cpu_helper.c: Invalid exception on MMU translation stage

2023-11-20 Thread Ivan Klokov
According to RISCV privileged spec sect. 5.3.2 Virtual Address Translation Process access-fault exceptions may raise only after PMA/PMP check. Current implementation generates an access-fault for mbare mode even if there were no PMA/PMP errors. This patch removes the erroneous MMU mode check and

[PATCH v2 2/2] target/riscv/cpu_helper.c: Fix mxr bit behavior

2023-11-20 Thread Ivan Klokov
According to RISCV Specification sect 9.5 on two stage translation when V=1 the vsstatus(mstatus in QEMU's terms) field MXR, which makes execute-only pages readable, only overrides VS-stage page protection. Setting MXR at HS-level(mstatus_hs), however, overrides both VS-stage and G-stage execute-on

[PATCH v2 0/2] Fix mmu translation with H extension

2023-11-20 Thread Ivan Klokov
A series of patches that correct the conversion of virtual addresses to physical ones. Correct exception for mbare mode and fix MXR bit behavior with MPV\MPRV bits. --- v2: - Fix typo, specify the fixed commits --- Ivan Klokov (2): target/riscv/cpu_helper.c: Invalid exception on MMU transla

Re: [PATCH v4 03/11] ppc/pnv: New powernv10-rainier machine type

2023-11-20 Thread Cédric Le Goater
On 11/21/23 02:33, Nicholas Piggin wrote: On Tue Nov 21, 2023 at 9:51 AM AEST, Glenn Miles wrote: Create a new powernv machine type, powernv10-rainier, that will contain rainier-specific devices. Is the plan to have a base powernv10 common to all and then powernv10-rainier looks like a Rainier

Re: [PATCH for-8.2 0/3] UI: fix default VC regressions

2023-11-20 Thread Marc-André Lureau
Hi On Fri, Nov 17, 2023 at 6:36 PM wrote: > > From: Marc-André Lureau > > Hi, > > There are a few annoying regressions with the default VCs introduced with the > pixman series. The "vl: revert behaviour for -display none" change solves most > of the issues. Another one is hit when using remote d

Re: [PATCH-for-8.2 v2] backends/cryptodev: Do not ignore throttle/backends Errors

2023-11-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() > can set their Error** argument. Do not ignore them, return early on > failure. Let's mention why we need to: "Without that, running into another failure trips error_setv()'s assertion." >

Re: [PATCH v2] disas/cris: Pass buffer size to format_dec() to avoid overflow warning

2023-11-20 Thread Philippe Mathieu-Daudé
On 20/11/23 22:45, Paolo Bonzini wrote: From: Philippe Mathieu-Daudé Propagate the buffer size to format_dec() and use snprintf(). This should silence this UBSan -Wformat-overflow warning: "produced when using GCC 12.1.0:" In file included from /usr/include/stdio.h:906,

Re: [PATCH-for-8.2?] hw/arm/fsl-imx: Do not ignore Error argument

2023-11-20 Thread Markus Armbruster
Markus Armbruster writes: > Peter Maydell writes: > >> On Mon, 20 Nov 2023 at 11:51, Philippe Mathieu-Daudé >> wrote: >>> >>> Both i.MX25 and i.MX6 SoC models ignore the Error argument when >>> setting the PHY number. Pick &error_abort which is the error >>> used by the i.MX7 SoC (see commit 1

Re: [RFC 1/2] qapi/virtio: introduce the "show-bits" argument for x-query-virtio-status

2023-11-20 Thread Markus Armbruster
Laurent, there's a question for you at the end. Yong Huang writes: > On Thu, Nov 16, 2023 at 10:44 PM Markus Armbruster > wrote: > >> Hyman Huang writes: >> >> > This patch allows to display feature and status bits in virtio-status. >> > >> > An optional argument is introduced: show-bits. For

<    1   2   3