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

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 _abort which is the error >>> used by the i.MX7 SoC (see commit

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

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

[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

[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

[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

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

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

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

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.

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

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

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 _abort which is the error >> used by the i.MX7 SoC (see commit 1f7197deb0 "ability to change >> the FEC

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:

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

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

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

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

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 >

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

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

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

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

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:

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

Re: [PATCH for-8.2] hw/riscv/virt.c: do create_fdt() earlier, add finalize_fdt()

2023-11-20 Thread Alistair Francis
On Sat, Nov 11, 2023 at 3:26 AM Daniel Henrique Barboza wrote: > > Commit 49554856f0 fixed a problem, where TPM devices were not appearing > in the FDT, by delaying the FDT creation up until virt_machine_done(). > This create a side effect (see gitlab #1925) - devices that need access > to the

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

Re: [PATCH for-8.2] hw/riscv/virt.c: do create_fdt() earlier, add finalize_fdt()

2023-11-20 Thread Alistair Francis
On Sat, Nov 11, 2023 at 3:26 AM Daniel Henrique Barboza wrote: > > Commit 49554856f0 fixed a problem, where TPM devices were not appearing > in the FDT, by delaying the FDT creation up until virt_machine_done(). > This create a side effect (see gitlab #1925) - devices that need access > to the

Re: [PATCH] linux-user/riscv: Add Zicboz block size to hwprobe

2023-11-20 Thread Alistair Francis
On Sat, Nov 11, 2023 at 3:52 AM Palmer Dabbelt wrote: > > Support for probing the Zicboz block size landed in Linux 6.6, which was > released a few weeks ago. This provides the user-configured block size > when Zicboz is enabled. > > Signed-off-by: Palmer Dabbelt Thanks! Applied to

Re: [PATCH] linux-user/riscv: Add Zicboz block size to hwprobe

2023-11-20 Thread Alistair Francis
On Sat, Nov 11, 2023 at 3:52 AM Palmer Dabbelt wrote: > > Support for probing the Zicboz block size landed in Linux 6.6, which was > released a few weeks ago. This provides the user-configured block size > when Zicboz is enabled. > > Signed-off-by: Palmer Dabbelt Reviewed-by: Alistair Francis

Re: [PATCH trivial 17/21] target/riscv/cpu.h: spelling fix: separatly

2023-11-20 Thread Alistair Francis
On Wed, Nov 15, 2023 at 3:04 AM Michael Tokarev wrote: > > Fixes: 40336d5b1d4c "target/riscv: Add HS-mode virtual interrupt and IRQ > filtering support." > Cc: Rajnesh Kanwal > Cc: Alistair Francis > Signed-off-by: Michael Tokarev Reviewed-by: Alistair Francis Alistair > --- >

RE: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object

2023-11-20 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Tuesday, November 21, 2023 1:09 AM >Subject: Re: [PATCH v6 01/21] backends/iommufd: Introduce the iommufd object > >Hello Zhenzhong > >On 11/20/23 11:07, Duan, Zhenzhong wrote: >> Hi Cédric, >> >>> -Original Message- >>> From:

Re: [PATCH v3 5/5] qom/object: Limit type names to alphanumerical and some few special characters

2023-11-20 Thread Alistair Francis
On Fri, Nov 17, 2023 at 9:46 PM Thomas Huth wrote: > > QOM names currently don't have any enforced naming rules. This > can be problematic, e.g. when they are used on the command line > for the "-device" option (where the comma is used to separate > properties). To avoid that such problematic

Re: [PATCH v3 4/5] tests/unit/test-io-task: Rename "qemu:dummy" to avoid colon in the name

2023-11-20 Thread Alistair Francis
On Fri, Nov 17, 2023 at 11:08 PM Thomas Huth wrote: > > Type names should not contain special characters like ":" (so that > they are easier to use with QAPI and other parts). We are going to > forbid such names in an upcoming patch. Thus let's replace the ":" > here with a "-". > > Reviewed-by:

Re: [PATCH v3 3/5] memory: Remove "qemu:" prefix from the "qemu:ram-discard-manager" type name

2023-11-20 Thread Alistair Francis
On Fri, Nov 17, 2023 at 9:46 PM Thomas Huth wrote: > > Type names should not contain special characters like ":". Let's > remove the whole prefix here since it does not really seem to be > helpful to have such a prefix here. The type name is only used > internally for an interface type, so the

Re: [PATCH v3 2/5] hw: Replace anti-social QOM type names (again)

2023-11-20 Thread Alistair Francis
On Fri, Nov 17, 2023 at 9:47 PM Thomas Huth wrote: > > From: Markus Armbruster > > QOM type names containing ',' result in awful UI. We got rid of them > in v6.0.0 (commit e178113ff64 hw: Replace anti-social QOM type names). > A few have crept back since: > > xlnx,cframe-reg >

Re: [PATCH v3 1/5] docs/system/arm: Fix for rename of type "xlnx.bbram-ctrl"

2023-11-20 Thread Alistair Francis
On Fri, Nov 17, 2023 at 9:47 PM Thomas Huth wrote: > > From: Markus Armbruster > > Fixes: b65b4b7ae3c8 (xlnx-bbram: hw/nvram: Use dot in device type name) > Signed-off-by: Markus Armbruster > [thuth: Use longhand syntax to avoid problems with the "." in the name] > Reviewed-by: Peter Maydell >

[PULL 1/1] tcg/loongarch64: Fix tcg_out_mov() Aborted

2023-11-20 Thread Song Gao
On LoongArch host, we got an Aborted from tcg_out_mov(). qemu-x86_64 configure with '--enable-debug'. > (gdb) b /home1/gaosong/code/qemu/tcg/loongarch64/tcg-target.c.inc:312 > Breakpoint 1 at 0x2576f0: file > /home1/gaosong/code/qemu/tcg/loongarch64/tcg-target.c.inc, line 312. > (gdb) run

[PULL 0/1] loongarch fixes for 8.2

2023-11-20 Thread Song Gao
The following changes since commit af9264da80073435fd78944bc5a46e695897d7e5: Merge tag '20231119-xtensa-1' of https://github.com/OSLL/qemu-xtensa into staging (2023-11-20 05:25:19 -0500) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git

Re: [PATCH 1/1] tcg/loongarch64: Fix tcg_out_mov() Aborted

2023-11-20 Thread gaosong
在 2023/11/20 下午11:59, Richard Henderson 写道: On 11/19/23 22:59, Song Gao wrote: On LoongArch host,  we got an Aborted from tcg_out_mov(). qemu-x86_64 configure with '--enable-debug'. (gdb) b /home1/gaosong/code/qemu/tcg/loongarch64/tcg-target.c.inc:312 Breakpoint 1 at 0x2576f0: file

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

2023-11-20 Thread Nicholas Piggin
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? Or would powernv10 just be a rainier?

Re: [RFC PATCH 2/3] hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature

2023-11-20 Thread Davidlohr Bueso
On Tue, 14 Nov 2023, shiju.j...@huawei.com wrote: +case CXL_FEATURE_PATROL_SCRUB: +/* Fill supported feature entry for device patrol scrub control */ +supported_feats->feat_entries[entry] = + (struct CXLSupportedFeatureEntry) { +

Re: [PATCH v6 0/8] Unified CPU type check

2023-11-20 Thread Gavin Shan
On 11/21/23 05:42, Marcin Juszkiewicz wrote: W dniu 20.11.2023 o 01:27, Gavin Shan pisze: Testing === With the following command lines, the output messages are varied before and after the series is applied.    ./build/qemu-system-aarch64    \    -accel tcg -machine

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

2023-11-20 Thread zhenwei pi
Looks good to me. Thanks! Reviewed-by: zhenwei pi On 11/20/23 23:04, Philippe Mathieu-Daudé wrote: Both cryptodev_backend_set_throttle() and CryptoDevBackendClass::init() can set their Error** argument. Do not ignore them, return early on failure. Use the ERRP_GUARD() macro as suggested in

[PATCH v4 11/11] ppc/pnv: Test pnv i2c master and connected devices

2023-11-20 Thread Glenn Miles
Tests the following for both P9 and P10: - I2C master POR status - I2C master status after immediate reset Tests the following for powernv10-ranier only: - Config pca9552 hotplug device pins as inputs then Read the INPUT0/1 registers to verify all pins are high - Connected GPIO pin

[PATCH v4 10/11] ppc/pnv: Add a pca9554 I2C device to powernv10-rainier

2023-11-20 Thread Glenn Miles
For powernv10-rainier, the Power Hypervisor code expects to see a pca9554 device connected to the 3rd PNV I2C engine on port 1 at I2C address 0x25 (or left-justified address of 0x4A). This is used by the hypervisor code to detect if a "Cable Card" is present. Signed-off-by: Glenn Miles ---

[PATCH v4 06/11] ppc/pnv: PNV I2C engines assigned incorrect XSCOM addresses

2023-11-20 Thread Glenn Miles
The PNV I2C engines for power9 and power10 were being assigned a base XSCOM address that was off by one I2C engine's address range such that engine 0 had engine 1's address and so on. The xscom address assignment was being based on the device tree engine numbering, which starts at 1. Rather than

[PATCH v4 01/11] misc/pca9552: Fix inverted input status

2023-11-20 Thread Glenn Miles
The pca9552 INPUT0 and INPUT1 registers are supposed to hold the logical values of the LED pins. A logical 0 should be seen in the INPUT0/1 registers for a pin when its corresponding LSn bits are set to 0, which is also the state needed for turning on an LED in a typical usage scenario. Existing

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

2023-11-20 Thread Glenn Miles
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: Glenn Miles --- Changes from

[PATCH v4 09/11] misc: Add a pca9554 GPIO device model

2023-11-20 Thread Glenn Miles
Specs are available here: https://www.nxp.com/docs/en/data-sheet/PCA9554_9554A.pdf This is a simple model supporting the basic registers for GPIO mode. The device also supports an interrupt output line but the model does not yet support this. Signed-off-by: Glenn Miles --- Changes from

[PATCH v4 05/11] ppc/pnv: Wire up pca9552 GPIO pins for PCIe hotplug power control

2023-11-20 Thread Glenn Miles
For power10-rainier, a pca9552 device is used for PCIe slot hotplug power control by the Power Hypervisor code. The code expects that some time after it enables power to a PCIe slot by asserting one of the pca9552 GPIO pins 0-4, it should see a "power good" signal asserted on one of pca9552 GPIO

[PATCH v4 08/11] ppc/pnv: Use resettable interface to reset child I2C buses

2023-11-20 Thread Glenn Miles
The QEMU I2C buses and devices use the resettable interface for resetting while the PNV I2C controller and parent buses and devices have not yet transitioned to this new interface and use the old reset strategy. This was preventing the I2C buses and devices wired to the PNV I2C controller from

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

2023-11-20 Thread Glenn Miles
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 b/hw/ppc/pnv.c index

[PATCH v4 07/11] ppc/pnv: Fix PNV I2C invalid status after reset

2023-11-20 Thread Glenn Miles
The PNV I2C Controller was clearing the status register after a reset without repopulating the "upper threshold for I2C ports", "Command Complete" and the SCL/SDA input level fields. Fixed this for resets caused by a system reset as well as from writing to the "Immediate Reset" register.

[PATCH v4 02/11] misc/pca9552: Let external devices set pca9552 inputs

2023-11-20 Thread Glenn Miles
Allow external devices to drive pca9552 input pins by adding input GPIO's to the model. This allows a device to connect its output GPIO's to the pca9552 input GPIO's. In order for an external device to set the state of a pca9552 pin, the pin must first be configured for high impedance (LED is

[PATCH v4 00/11] Add powernv10 I2C devices and tests

2023-11-20 Thread Glenn Miles
This series of patches includes support, tests and fixes for adding PCA9552 and PCA9554 I2C devices to the powernv10 chip. The PCA9552 device is used for PCIe slot hotplug power control and monitoring, while the PCA9554 device is used for presence detection of IBM CableCard devices. Both devices

Re: Converting images to stdout

2023-11-20 Thread Eric Blake
On Thu, Nov 16, 2023 at 06:48:09PM +0100, Alberto Garcia wrote: > Hi, > > I haven't written here in a while :) but I have something small that I > would like to discuss. > > Using qemu-img to convert an image and writing the result directly to > stdout is a question that has already been raised

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

2023-11-20 Thread Paolo Bonzini
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, from ../disas/cris.c:21:

Re: [PATCH V5 02/12] cpus: stop vm in suspended state

2023-11-20 Thread Peter Xu
On Mon, Nov 20, 2023 at 03:55:54PM -0500, Steven Sistare wrote: > If we drop force, then all calls to vm_stop will completely stop the > suspended state, eg an hmp "stop" command. This causes two problems. > First, that is a change in user-visible behavior for something that > currently works,

[PATCH-for-9.0 08/25] memory: Have memory_region_init_rom_device_nomigrate() return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 4 +++- 2

[PATCH-for-9.0 18/25] util/oslib: Have qemu_prealloc_mem() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/osdep.h | 4 +++- util/oslib-posix.c | 7 +--

[PATCH-for-9.0 25/25] hw/pci-host/raven: Propagate error in raven_realize()

2023-11-20 Thread Philippe Mathieu-Daudé
When an Error** reference is available, it is better to propagate local errors, rather then using generic ones, which might terminate the whole QEMU process. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/raven.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH-for-9.0 24/25] hw/nvram: Simplify memory_region_init_rom_device() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Mechanical change using the following coccinelle script: @@ expression mr, owner, arg3, arg4, arg5, arg6, errp; @@ - memory_region_init_rom_device(mr, owner, arg3, arg4, arg5, arg6, ); if ( - errp + !memory_region_init_rom_device(mr, owner, arg3, arg4, arg5, arg6, ) ) {

[PATCH-for-9.0 22/25] hw/sparc: Simplify memory_region_init_ram_nomigrate() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Mechanical change using the following coccinelle script: @@ expression mr, owner, arg3, arg4, errp; @@ - memory_region_init_ram_nomigrate(mr, owner, arg3, arg4, ); if ( - errp + !memory_region_init_ram_nomigrate(mr, owner, arg3, arg4, ) ) { ... return; }

[PATCH-for-9.0 15/25] backends: Simplify host_memory_backend_memory_complete()

2023-11-20 Thread Philippe Mathieu-Daudé
Return early if bc->alloc is NULL. De-indent the if() ladder. Note, this avoids a pointless call to error_propagate() with errp=NULL at the 'out:' label. Change trivial when reviewed with 'git-diff --ignore-all-space'. Signed-off-by: Philippe Mathieu-Daudé --- backends/hostmem.c | 133

[PATCH-for-9.0 23/25] hw/misc: Simplify memory_region_init_ram_from_fd() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Mechanical change using the following coccinelle script: @@ expression mr, owner, arg3, arg4, arg5, arg6, arg7, errp; @@ - memory_region_init_ram_from_fd(mr, owner, arg3, arg4, arg5, arg6, arg7, ); if ( - errp + !memory_region_init_ram_from_fd(mr, owner, arg3, arg4, arg5, arg6,

[PATCH-for-9.0 11/25] memory: Have memory_region_init_resizeable_ram() return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 4 +++- 2

[PATCH-for-9.0 21/25] hw/arm: Simplify memory_region_init_rom() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Mechanical change using the following coccinelle script: @@ expression mr, owner, arg3, arg4, errp; @@ - memory_region_init_rom(mr, owner, arg3, arg4, ); if ( - errp + !memory_region_init_rom(mr, owner, arg3, arg4, ) ) { ... return; } and removing the

[PATCH-for-9.0 16/25] backends: Have HostMemoryBackendClass::alloc() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/hostmem.h | 10 +- backends/hostmem-epc.c

[PATCH-for-9.0 17/25] backends: Reduce variable scope in host_memory_backend_memory_complete

2023-11-20 Thread Philippe Mathieu-Daudé
Reduce the _err variable use and remove the 'out:' label. Signed-off-by: Philippe Mathieu-Daudé --- backends/hostmem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index 3f8eb936d7..1b0043a0d9 100644 --- a/backends/hostmem.c

[PATCH-for-9.0 20/25] hw: Simplify memory_region_init_ram() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Mechanical change using the following coccinelle script: @@ expression mr, owner, arg3, arg4, errp; @@ - memory_region_init_ram(mr, owner, arg3, arg4, ); if ( - errp + !memory_region_init_ram(mr, owner, arg3, arg4, ) ) { ... return; } and removing the

[PATCH-for-9.0 19/25] misc: Simplify qemu_prealloc_mem() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- backends/hostmem.c | 22 +++--- hw/virtio/virtio-mem.c | 6 ++ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index 1b0043a0d9..30f69b2cb5 100644 --- a/backends/hostmem.c

[PATCH-for-9.0 12/25] memory: Have memory_region_init_ram_from_file() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 4 +++- 2

[PATCH-for-9.0 05/25] memory: Simplify memory_region_init_ram_from_fd() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Mechanical change using the following coccinelle script: @@ expression mr, owner, arg3, arg4, arg5, arg6, arg7, errp; @@ - memory_region_init_ram_from_fd(mr, owner, arg3, arg4, arg5, arg6, arg7, ); if ( - errp + !memory_region_init_ram_from_fd(mr, owner, arg3, arg4, arg5, arg6,

[PATCH-for-9.0 10/25] memory: Have memory_region_init_rom_device() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 6 -- 2

[PATCH-for-9.0 14/25] backends: Use g_autofree in HostMemoryBackendClass::alloc() handlers

2023-11-20 Thread Philippe Mathieu-Daudé
In preparation of having HostMemoryBackendClass::alloc() handlers return a boolean, have them use g_autofree. Signed-off-by: Philippe Mathieu-Daudé --- backends/hostmem-epc.c | 3 +-- backends/hostmem-file.c | 3 +-- backends/hostmem-memfd.c | 3 +-- backends/hostmem-ram.c | 3 +-- 4 files

[PATCH-for-9.0 13/25] memory: Have memory_region_init_ram_from_fd() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 4 +++- 2

[PATCH-for-9.0 09/25] memory: Simplify memory_region_init_rom_device_nomigrate() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Mechanical change using the following coccinelle script: @@ expression mr, owner, arg3, arg4, arg5, arg6, errp; @@ - memory_region_init_rom_device_nomigrate(mr, owner, arg3, arg4, arg5, arg6, ); if ( - errp + !memory_region_init_rom_device_nomigrate(mr, owner, arg3, arg4, arg5,

[PATCH-for-9.0 03/25] memory: Have memory_region_init_rom_nomigrate() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 8 ++--

[PATCH-for-9.0 01/25] memory: Have memory_region_init_ram_flags_nomigrate() return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 4 +++- 2

[PATCH-for-9.0 07/25] memory: Have memory_region_init_rom() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 6 -- 2

[PATCH-for-9.0 02/25] memory: Have memory_region_init_ram_nomigrate() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 5 +++-- 2

[PATCH-for-9.0 04/25] memory: Simplify memory_region_init_rom_nomigrate() calls

2023-11-20 Thread Philippe Mathieu-Daudé
Mechanical change using the following coccinelle script: @@ expression mr, owner, arg3, arg4, errp; @@ - memory_region_init_rom_nomigrate(mr, owner, arg3, arg4, ); if ( - errp + !memory_region_init_rom_nomigrate(mr, owner, arg3, arg4, ) ) { ... return; }

[PATCH-for-9.0 06/25] memory: Have memory_region_init_ram() handler return a boolean

2023-11-20 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 4 +++- system/memory.c | 6 -- 2

[PATCH-for-9.0 00/25] memory: Propagate Error* when possible

2023-11-20 Thread Philippe Mathieu-Daudé
Hi, This series is remotely connected with the "dynamic machine" project. We need QOM objects created either from command line, QMP or loaded by modules to NOT fail exiting the whole QEMU process, but cleanly propagate any error before failing cleanly. In preparation for that big goal, we start

Re: [PATCH V5 02/12] cpus: stop vm in suspended state

2023-11-20 Thread Steven Sistare
On 11/20/2023 3:47 PM, Fabiano Rosas wrote: > Peter Xu writes: >> On Mon, Nov 13, 2023 at 10:33:50AM -0800, Steve Sistare wrote: >>> A vm in the suspended state is not completely stopped. The VCPUs have been >>> paused, but the cpu clock still runs, and runstate notifiers for the >>> transition

Re: [PATCH v2] audio: Free consumed default audio devices

2023-11-20 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH V5 02/12] cpus: stop vm in suspended state

2023-11-20 Thread Steven Sistare
On 11/20/2023 2:59 PM, Peter Xu wrote: > On Mon, Nov 13, 2023 at 10:33:50AM -0800, Steve Sistare wrote: >> A vm in the suspended state is not completely stopped. The VCPUs have been >> paused, but the cpu clock still runs, and runstate notifiers for the >> transition to stopped have not been

Re: [PATCH V5 02/12] cpus: stop vm in suspended state

2023-11-20 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Nov 13, 2023 at 10:33:50AM -0800, Steve Sistare wrote: >> A vm in the suspended state is not completely stopped. The VCPUs have been >> paused, but the cpu clock still runs, and runstate notifiers for the >> transition to stopped have not been called. Modify

Re: [PATCH V5 01/12] cpus: refactor vm_stop

2023-11-20 Thread Fabiano Rosas
Steven Sistare writes: > On 11/20/2023 8:22 AM, Fabiano Rosas wrote: >> Steve Sistare writes: >>> Refactor the vm_stop functions into one common subroutine do_vm_stop called >>> with options. No functional change. >>> >>> Signed-off-by: Steve Sistare >>> --- >>> system/cpus.c | 44

Re: [PATCH V5 02/12] cpus: stop vm in suspended state

2023-11-20 Thread Peter Xu
On Mon, Nov 13, 2023 at 10:33:50AM -0800, Steve Sistare wrote: > A vm in the suspended state is not completely stopped. The VCPUs have been > paused, but the cpu clock still runs, and runstate notifiers for the > transition to stopped have not been called. Modify vm_stop_force_state to >

Re: [PATCH V5 01/12] cpus: refactor vm_stop

2023-11-20 Thread Steven Sistare
On 11/20/2023 2:46 PM, Peter Xu wrote: > On Mon, Nov 20, 2023 at 02:09:31PM -0500, Steven Sistare wrote: >> On 11/20/2023 8:22 AM, Fabiano Rosas wrote: >>> Steve Sistare writes: Refactor the vm_stop functions into one common subroutine do_vm_stop called with options. No functional

  1   2   3   >