Re: [PATCH v2 4/4] vfio/ccw: Make vfio_ccw_register_irq_notifier() return a bool

2024-04-25 Thread Cédric Le Goater
On 4/25/24 14:55, Eric Farman wrote: On Thu, 2024-04-25 at 12:56 +0200, Markus Armbruster wrote: Cédric Le Goater writes: Since vfio_ccw_register_irq_notifier() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Cédric

Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap

2024-04-25 Thread Cédric Le Goater
On 4/25/24 10:46, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap Hello Zhenzhong, On 4/18/24 10:42, Duan, Zhenzhong wrote: Hi Cédric

[PATCH v2 3/4] vfio/ccw: Use g_autofree variable in vfio_ccw_register_irq_notifier()

2024-04-25 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/vfio/ccw.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 90e4a534371684c08e112364e1537eb8979f73f4..6764388bc47a970329fce2233626ccb8178e0165 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c

[PATCH v2 1/4] vfio/ap: Use g_autofree variable in vfio_ap_register_irq_notifier()

2024-04-25 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/vfio/ap.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 7c4caa5938636937680fec87e999249ac84a4498..03f8ffaa5e2bf13cf8daa2f44aa4cf17809abd94 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c

[PATCH v2 2/4] vfio/ap: Make vfio_ap_register_irq_notifier() return a bool

2024-04-25 Thread Cédric Le Goater
Since vfio_ap_register_irq_notifier() takes and 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Cédric Le Goater --- hw/vfio/ap.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/vfio/ap.c b

[PATCH v2 4/4] vfio/ccw: Make vfio_ccw_register_irq_notifier() return a bool

2024-04-25 Thread Cédric Le Goater
Since vfio_ccw_register_irq_notifier() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Cédric Le Goater --- hw/vfio/ccw.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/hw

[PATCH] vfio/ccw: Use g_autofree variable

2024-04-24 Thread Cédric Le Goater
Also change the return value of vfio_ccw_register_irq_notifier() to be a bool since it takes and 'Error **' argument. See the qapi/error.h Rules section. Signed-off-by: Cédric Le Goater --- hw/vfio/ccw.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff

[PATCH] vfio/ap: Use g_autofree variable

2024-04-24 Thread Cédric Le Goater
Also change the return value of vfio_ap_register_irq_notifier() to be a bool since it takes and 'Error **' argument. See the qapi/error.h Rules section. Signed-off-by: Cédric Le Goater --- hw/vfio/ap.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/hw

[PATCH] ppc/pnv: Introduce pnv_chip_foreach_cpu()

2024-04-24 Thread Cédric Le Goater
This helper routine uses the machine definition, sockets, cores and threads, to loop on all CPUs of the machine. Replace CPU_FOREACH() with it. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 48 1 file changed, 36 insertions(+), 12 deletions

Re: [PATCH v2 5/6] hw/ppc: SPI controller wiring to P10 chip and create seeprom device

2024-04-22 Thread Cédric Le Goater
On 4/9/24 19:56, Chalapathi V wrote: In this commit Creates SPI controller on p10 chip. Create the keystore seeprom of type "seeprom-25csm04" Connect the cs of seeprom to PIB_SPIC[2] cs irq. The QOM tree of spi controller and seeprom are. /machine (powernv10-machine) /chip[0]

Re: [PATCH v2 4/6] hw/misc: Microchip's 25CSM04 SEEPROM model

2024-04-22 Thread Cédric Le Goater
Hello Chalapathi On 4/9/24 19:56, Chalapathi V wrote: This commit implements a Serial EEPROM utilizing the Serial Peripheral Interface (SPI) compatible bus. Currently implemented SEEPROM is Microchip's 25CSM04 which provides 4 Mbits of Serial EEPROM utilizing the Serial Peripheral Interface

Re: [PATCH v2 2/6] hw/ppc: SPI controller model - registers implementation

2024-04-22 Thread Cédric Le Goater
On 4/16/24 19:02, Chalapathi V wrote: On 15-04-2024 20:44, Cédric Le Goater wrote: Hello Chalapathi The subject could be rephrased to : "ppc/pnv: Add SPI controller model". On 4/9/24 19:56, Chalapathi V wrote: SPI controller device model supports a connection to a single SPI

Re: [PATCH v3 07/16] aspeed/smc: fix dma moving incorrect data length issue

2024-04-19 Thread Cédric Le Goater
On 4/16/24 11:18, Jamin Lin wrote: DMA length is from 1 byte to 32MB for AST2600 and AST10x0 and DMA length is from 4 bytes to 32MB for AST2500. In other words, if "R_DMA_LEN" is 0, it should move at least 1 byte data for AST2600 and AST10x0 and 4 bytes data for AST2500. To support all ASPEED

Re: [PATCH v3 12/16] aspeed/soc: Add AST2700 support

2024-04-19 Thread Cédric Le Goater
On 4/16/24 11:18, Jamin Lin wrote: Initial definitions for a simple machine using an AST2700 SOC (Cortex-a35 CPU). AST2700 SOC and its interrupt controller are too complex to handle in the common Aspeed SoC framework. We introduce a new ast2700 class with instance_init and realize handlers.

Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap

2024-04-19 Thread Cédric Le Goater
Hello Zhenzhong, On 4/18/24 10:42, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap Hello Zhenzhong On 4/17/24 11:24, Duan, Zhenzhong wrote

Re: [PATCH v3 09/16] aspeed/smc: Add AST2700 support

2024-04-18 Thread Cédric Le Goater
-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ssi/aspeed_smc.c | 222 +++- 1 file changed, 220 insertions(+), 2 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index a67cac3d0f

Re: [PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-04-18 Thread Cédric Le Goater
Hello Jamin, On 4/16/24 11:18, Jamin Lin wrote: AST2700 support the maximum dram size is 8GiB and has a "DMA DRAM Side Address High Part(0x7C)" register to support 64 bits dma dram address. Add helper routines functions to compute the dma dram address, new features and update trace-event to

Re: [PATCH v2 2/4] hw/i2c: Fix checkpatch line over 80 chars warnings

2024-04-18 Thread Cédric Le Goater
On 4/17/24 16:20, Philippe Mathieu-Daudé wrote: On 17/4/24 08:24, Cédric Le Goater wrote: Hello, On 4/16/24 20:47, Philippe Mathieu-Daudé wrote: We are going to modify these lines, fix their style in order to avoid checkpatch.pl warnings:    WARNING: line over 80 characters Signed-off

Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap

2024-04-18 Thread Cédric Le Goater
Hello Zhenzhong On 4/17/24 11:24, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap On 4/17/24 06:21, Duan, Zhenzhong wrote: -Original Message

Re: [PATCH 2/2] ppc/pnv: Implement ADU access to LPC space

2024-04-17 Thread Cédric Le Goater
On 4/17/24 13:02, Nicholas Piggin wrote: One of the functions of the ADU is indirect memory access engines that send and receive data via ADU registers. This implements the ADU LPC memory access functionality sufficiently for IBM proprietary firmware to access the UART and print characters to

Re: [PATCH 1/2] ppc/pnv: Begin a more complete ADU LPC model for POWER9/10

2024-04-17 Thread Cédric Le Goater
Hello Nick, On 4/17/24 13:02, Nicholas Piggin wrote: This implements a framework for an ADU unit model. The ADU unit actually implements XSCOM, which is the bridge between MMIO and PIB. However it also includes control and status registers and other functions that are exposed as PIB (xscom)

Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap

2024-04-17 Thread Cédric Le Goater
On 4/17/24 06:21, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap Hello, On 4/16/24 09:09, Duan, Zhenzhong wrote: Hi Cédric, -Original Message

Re: [PATCH v2 2/4] hw/i2c: Fix checkpatch line over 80 chars warnings

2024-04-17 Thread Cédric Le Goater
Hello, On 4/16/24 20:47, Philippe Mathieu-Daudé wrote: We are going to modify these lines, fix their style in order to avoid checkpatch.pl warnings: WARNING: line over 80 characters Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i2c/i2c.h| 11 ++-

Re: [PATCH v3 15/16] test/avocado/machine_aspeed.py: Add AST2700 test case

2024-04-16 Thread Cédric Le Goater
is downloaded from the ASPEED Forked OpenBMC GitHub release repository : https://github.com/AspeedTech-BMC/openbmc/releases/ Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- tests/avocado/machine_aspeed.py | 62

Re: [PATCH v3 16/16] docs:aspeed: Add AST2700 Evaluation board

2024-04-16 Thread Cédric Le Goater
On 4/16/24 11:19, Jamin Lin wrote: Add AST2700 Evaluation board and its boot command. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- docs/system/arm/aspeed.rst | 39 ++ 1 file changed, 35 insertions

Re: [PATCH v3 06/16] aspeed/smc: correct device description

2024-04-16 Thread Cédric Le Goater
On 4/16/24 11:18, Jamin Lin wrote: Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ssi/aspeed_smc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 6e1a84c197

Re: [PATCH v3 05/16] aspeed/sdmc: Add AST2700 support

2024-04-16 Thread Cédric Le Goater
-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/misc/aspeed_sdmc.c | 190 +- include/hw/misc/aspeed_sdmc.h | 5 +- 2 files changed, 193 insertions(+), 2 deletions(-) diff --git a/hw/misc/aspeed_sdmc.c

Re: [PATCH v3 02/16] aspeed/sli: Add AST2700 support

2024-04-16 Thread Cédric Le Goater
D_2700_SLI TYPE_ASPEED_SLI "-ast2700" +#define TYPE_ASPEED_2700_SLIIO TYPE_ASPEED_SLI "io" "-ast2700" +OBJECT_DECLARE_TYPE(AspeedSLIState, AspeedSLIClass, ASPEED_SLI) + +#define ASPEED_SLI_NR_REGS (0x500 >> 2) + +struct AspeedSLIState { +SysBusDevice parent; +MemoryRegion iomem; + +uint32_t regs[ASPEED_SLI_NR_REGS]; +}; + +struct AspeedSLIClass { +SysBusDeviceClass parent_class; +}; May be use OBJECT_DECLARE_SIMPLE_TYPE() to avoid the empty class. Anyhow, Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v3 04/16] aspeed/sdmc: fix coding style

2024-04-16 Thread Cédric Le Goater
On 4/16/24 11:18, Jamin Lin wrote: Fix coding style issues from checkpatch.pl Test command: scripts/checkpatch.pl --no-tree -f hw/misc/aspeed_sdmc.c Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/misc/aspeed_sdmc.c | 11

Re: [PATCH v3 03/16] aspeed/sdmc: remove redundant macros

2024-04-16 Thread Cédric Le Goater
On 4/16/24 11:18, Jamin Lin wrote: These macros are no longer used for ASPEED SOCs, so removes them. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/misc/aspeed_sdmc.c | 15 --- 1 file changed, 15 deletions(-) diff

Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap

2024-04-16 Thread Cédric Le Goater
Hello, On 4/16/24 09:09, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap On 4/8/24 10:44, Zhenzhong Duan wrote: From: Yi Liu If check fails

Re: [PATCH v2 02/10] vfio: Introduce HIODLegacyVFIO device

2024-04-16 Thread Cédric Le Goater
Hello, On 4/16/24 05:41, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v2 02/10] vfio: Introduce HIODLegacyVFIO device On 4/8/24 10:12, Zhenzhong Duan wrote: HIODLegacyVFIO represents a host IOMMU device under VFIO legacy container

Re: [PATCH v2 3/6] hw/ppc: SPI controller model - sequencer and shifter

2024-04-16 Thread Cédric Le Goater
Hello, Please rephrase the subject to something like: "ppc/pnv: Extend SPI model ..." Using a verb is preferable. On 4/9/24 19:56, Chalapathi V wrote: In this commit SPI shift engine and sequencer logic is implemented. Shift engine performs serialization and de-serialization according to

Re: [PATCH v2 3/5] intel_iommu: Add a framework to do compatibility check with host IOMMU cap/ecap

2024-04-15 Thread Cédric Le Goater
On 4/8/24 10:44, Zhenzhong Duan wrote: From: Yi Liu If check fails, the host side device(either vfio or vdpa device) should not be passed to guest. Implementation details for different backends will be in following patches. Signed-off-by: Yi Liu Signed-off-by: Yi Sun Signed-off-by:

Re: [PATCH v2 2/6] hw/ppc: SPI controller model - registers implementation

2024-04-15 Thread Cédric Le Goater
Hello Chalapathi The subject could be rephrased to : "ppc/pnv: Add SPI controller model". On 4/9/24 19:56, Chalapathi V wrote: SPI controller device model supports a connection to a single SPI responder. This provide access to SPI seeproms, TPM, flash device and an ADC controller. All SPI

Re: [PATCH v2 1/6] hw/ppc: remove SPI responder model

2024-04-15 Thread Cédric Le Goater
On 4/9/24 19:56, Chalapathi V wrote: -- Empty commit to align the patch numbers between PATCH v1 and PATCH v2. SPI responder model is removed as pnv spi controller and seeprom is implemented using QEMU SSI framework. Please drop this empty patch. Patch numbers do not need to be aligned between

Re: [PATCH 02/12] hw/vfio/pci: Replace sprintf() by g_strdup_printf()

2024-04-15 Thread Cédric Le Goater
On 4/12/24 17:25, Alex Williamson wrote: On Wed, 10 Apr 2024 18:06:03 +0200 Philippe Mathieu-Daudé wrote: sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use g_strdup_printf() instead. Isn't this code only compiled for Linux

Re: [PATCH v2 10/10] vfio: Pass HostIOMMUDevice to vIOMMU

2024-04-15 Thread Cédric Le Goater
On 4/8/24 10:12, Zhenzhong Duan wrote: With HostIOMMUDevice passed, vIOMMU can check compatibility with host IOMMU, call into IOMMUFD specific methods, etc. Originally-by: Yi Liu Signed-off-by: Nicolin Chen Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan LGTM, waiting v3. Thanks,

Re: [PATCH v2 09/10] hw/pci: Introduce pci_device_set/unset_iommu_device()

2024-04-15 Thread Cédric Le Goater
On 4/8/24 10:12, Zhenzhong Duan wrote: From: Yi Liu This adds pci_device_set/unset_iommu_device() to set/unset HostIOMMUDevice for a given PCI device. Caller of set should fail if set operation fails. Extract out pci_device_get_iommu_bus_devfn() to facilitate I would separate this change in

Re: [PATCH v2 08/10] vfio: Create host IOMMU device instance

2024-04-15 Thread Cédric Le Goater
On 4/8/24 10:12, Zhenzhong Duan wrote: Create host IOMMU device instance and initialize it based on backend. Signed-off-by: Zhenzhong Duan --- include/hw/vfio/vfio-common.h | 1 + hw/vfio/container.c | 5 + hw/vfio/iommufd.c | 8 3 files changed, 14

Re: [PATCH v2 07/10] backends/iommufd: Implement get_host_iommu_info() callback

2024-04-15 Thread Cédric Le Goater
On 4/8/24 10:12, Zhenzhong Duan wrote: It calls iommufd_backend_get_device_info() to get host IOMMU related information. Define a common structure HIOD_IOMMUFD_INFO to describe the info returned from kernel. Currently only vtd, but easy to add arm smmu when kernel supports. I think you can

Re: [PATCH v2 06/10] backends/iommufd: Introduce helper function iommufd_backend_get_device_info()

2024-04-15 Thread Cédric Le Goater
On 4/8/24 10:12, Zhenzhong Duan wrote: Introduce a helper function iommufd_backend_get_device_info() to get host IOMMU related information through iommufd uAPI. Signed-off-by: Yi Liu Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan --- include/sysemu/iommufd.h | 4

Re: [PATCH v2 05/10] vfio: Implement get_host_iommu_info() callback

2024-04-15 Thread Cédric Le Goater
On 4/8/24 10:12, Zhenzhong Duan wrote: Utilize iova_ranges to calculate host IOMMU address width and package it in HIOD_LEGACY_INFO for vIOMMU usage. HIOD_LEGACY_INFO will be used by both VFIO and VDPA so declare it in host_iommu_device.h. Signed-off-by: Zhenzhong Duan ---

Re: [PATCH v2 03/10] backends/iommufd: Introduce abstract HIODIOMMUFD device

2024-04-15 Thread Cédric Le Goater
hiod_iommufd_init() to initialize HIODIOMMUFD device. Suggested-by: Cédric Le Goater Originally-by: Yi Liu Signed-off-by: Yi Sun Signed-off-by: Zhenzhong Duan --- include/sysemu/iommufd.h | 22 +++ backends/iommufd.c | 47 ++-- 2

Re: [PATCH v2 02/10] vfio: Introduce HIODLegacyVFIO device

2024-04-15 Thread Cédric Le Goater
On 4/8/24 10:12, Zhenzhong Duan wrote: HIODLegacyVFIO represents a host IOMMU device under VFIO legacy container backend. It includes a link to VFIODevice. Suggested-by: Eric Auger Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- include/hw/vfio/vfio-common.h | 11

Re: [PATCH v2 01/10] backends: Introduce abstract HostIOMMUDevice

2024-04-15 Thread Cédric Le Goater
for VFIO, and VDPA in the future. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan LGTM, --- MAINTAINERS| 2 ++ include/sysemu/host_iommu_device.h | 19 +++ backends/host_iommu_device.c | 19 +++ backends/Kconfig

Re: [PATCH 0/2] P11 support for QEMU

2024-04-02 Thread Cédric Le Goater
series)) Daniel Henrique Barboza (reviewer:sPAPR (pseries)) David Gibson (reviewer:sPAPR (pseries)) Harsh Prateek Bora (reviewer:sPAPR (pseries)) "Cédric Le Goater" (odd fixer:PowerNV Non-Virt...) "Frédéric Barrat" (reviewer:PowerNV Non-Virt...) qemu-...@nongnu.org (open list:s

Re: [PATCH for-9.0] tests/qtest: Fix STM32L4x5 GPIO test on 32-bit

2024-04-02 Thread Cédric Le Goater
On 3/29/24 13:50, Philippe Mathieu-Daudé wrote: Hi Cédric, Thomas, On 29/3/24 10:27, Cédric Le Goater wrote: The test mangles the GPIO address and the pin number in the qtest_add_data_func data parameter. Doing so, it assumes that the host pointer size is always 64-bit, which breaks on 32-bit

Re: [PATCH 0/2] P11 support for QEMU

2024-04-02 Thread Cédric Le Goater
Hello Aditya, On 4/2/24 08:39, Aditya Gupta wrote: Hello Cédric, Thanks for reviewing this. On Mon, Apr 01, 2024 at 10:25:31AM +0200, Cédric Le Goater wrote: Hello Aditya, Please run ./scripts/get_maintainer.pl when sending a series. qemu-ppc should be in Cc: Tried it now, For some reason

Re: [PATCH 0/2] P11 support for QEMU

2024-04-01 Thread Cédric Le Goater
Hello Aditya, Please run ./scripts/get_maintainer.pl when sending a series. qemu-ppc should be in Cc: Briefly looking at this, please separate the changes using one patch per model, that is : first CPU (target), LPC, OCC, PSI, SBE, PnvCore, SpaprCore. Last the PnvChip and the machines,

Re: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-29 Thread Cédric Le Goater
Hello Zhenzhong, On 3/28/24 04:06, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice Hello Zhenzhong, On 3/19/24 12:58, Duan, Zhenzhong wrote: Hi Cédric, -Original

[PATCH] raspi4b: Reduce RAM to 1Gb on 32-bit hosts

2024-03-29 Thread Cédric Le Goater
Change the board revision number and RAM size to 1Gb on 32-bit hosts. On these systems, RAM has a 2047 MB limit and this breaks the tests. Fixes: 7785e8ea2204 ("hw/arm: Introduce Raspberry PI 4 machine") Signed-off-by: Cédric Le Goater --- hw/arm/raspi4b.c | 4 1 file changed, 4

[PATCH for-9.1] migration: Add Error** argument to add_bitmaps_to_list()

2024-03-29 Thread Cédric Le Goater
This allows to report more precise errors in the migration handler dirty_bitmap_save_setup(). Suggested-by Vladimir Sementsov-Ogievskiy Signed-off-by: Cédric Le Goater --- To apply on top of : https://lore.kernel.org/qemu-devel/20240320064911.545001-1-...@redhat.com/ migration/block

Re: [PATCH for-9.1 v5 07/14] migration: Add Error** argument to .save_setup() handler

2024-03-29 Thread Cédric Le Goater
Hello Vladimir, On 3/29/24 10:32, Vladimir Sementsov-Ogievskiy wrote: On 20.03.24 09:49, Cédric Le Goater wrote: diff --git a/migration/block-dirty-bitmap.c b/migration/block-dirty-bitmap.c index 2708abf3d762de774ed294d3fdb8e56690d2974c..542a8c297b329abc30d1b3a205d29340fa59a961 100644

[PATCH for-9.0] tests/qtest: Fix STM32L4x5 GPIO test on 32-bit

2024-03-29 Thread Cédric Le Goater
tails. Cc: Arnaud Minier Cc: Inès Varhol Signed-off-by: Cédric Le Goater --- tests/qtest/stm32l4x5_gpio-test.c | 59 ++- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/tests/qtest/stm32l4x5_gpio-test.c b/tests/qtest/stm32l4x5_gpio-te

Re: [PATCH for-9.0 1/2] migration: Set migration error in migration_completion()

2024-03-28 Thread Cédric Le Goater
On 3/28/24 16:50, Avihai Horon wrote: On 28/03/2024 17:21, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai, On 3/28/24 15:02, Avihai Horon wrote: After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_s

Re: [PATCH for-9.0 1/2] migration: Set migration error in migration_completion()

2024-03-28 Thread Cédric Le Goater
Hello Avihai, On 3/28/24 15:02, Avihai Horon wrote: After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()"), close_return_path_on_source() assumes that migration error is set if an error occurs during migration. This may not be true if migration errors

Re: [PATCH for-9.0 2/2] migration/postcopy: Ensure postcopy_start() sets errp if it fails

2024-03-28 Thread Cédric Le Goater
() error paths. Fixes: 908927db28ea ("migration: Update error description whenever migration fails") Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- migration/migration.c | 8 1 file changed, 8 insertions(+) diff --git a/migration/mig

Re: [PATCH v3] vfio/pci: migration: Skip config space check for Vendor Specific Information in VSC during restore/load

2024-03-28 Thread Cédric Le Goater
On 3/27/24 21:52, Alex Williamson wrote: On Wed, 27 Mar 2024 16:11:37 -0400 "Michael S. Tsirkin" wrote: On Wed, Mar 27, 2024 at 11:39:15AM -0600, Alex Williamson wrote: On Fri, 22 Mar 2024 12:12:10 +0530 Vinayak Kale wrote: In case of migration, during restore operation, qemu checks

Re: [PATCH 10/10] pnv/phb4: Mask off LSI Source-ID based on number of interrupts

2024-03-27 Thread Cédric Le Goater
t_xsrc may be ? Thanks, C. +{ +    phb->regs[PHB_LSI_SOURCE_ID >> 3] = PPC_BITMASK(4, 12); Is this mask the default value for HW ? Yes, the spec defines the bits[04:12] of LSI Source ID having reset value: 0x1FF Regards, Saif On 25-03-2024 07:04 pm, Cédric Le Goater wrote: On

Re: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-27 Thread Cédric Le Goater
Hello Zhenzhong, On 3/19/24 12:58, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Sent: Tuesday, March 19, 2024 4:17 PM To: Duan, Zhenzhong ; qemu- de...@nongnu.org Cc: alex.william...@redhat.com; eric.au...@redhat.com; pet...@redhat.com; jasow

Re: [PATCH] misc/pca955*: Move models under hw/gpio

2024-03-26 Thread Cédric Le Goater
On 3/26/24 10:55, Philippe Mathieu-Daudé wrote: On 25/3/24 14:48, Cédric Le Goater wrote: The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the PCA9552 also can drive LEDs. Do all the necessary adjustments to move the models under hw/gpio. Cc: Glenn Miles Signed-off-by: Cédric

Re: [PATCH 04/10] pnv/phb4: Implement read-only and write-only bits of registers

2024-03-25 Thread Cédric Le Goater
On 3/21/24 11:04, Saif Abrar wrote: SW cannot write the read-only(RO) bits of a register and write-only(WO) bits of a register return 0 when read. Added ro_mask[] for each register that defines which bits in that register are RO. When writing to a register, the RO-bits are not updated. When

Re: [PATCH 05/10] pnv/phb4: Implement write-clear and return 1's on unimplemented reg read

2024-03-25 Thread Cédric Le Goater
Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci-host/pnv_phb4.c | 190 ++-- include/hw/pci-host/pnv_phb4_regs.h | 12 +- tests/qtest/pnv-phb4-test.c | 9 ++ 3 files changed, 170 insertions(+), 41 deletions(-) diff --git a/hw/pci-host

[PATCH] misc/pca955*: Move models under hw/gpio

2024-03-25 Thread Cédric Le Goater
The PCA9552 and PCA9554 devices are both I2C GPIO controllers and the PCA9552 also can drive LEDs. Do all the necessary adjustments to move the models under hw/gpio. Cc: Glenn Miles Signed-off-by: Cédric Le Goater --- MAINTAINERS | 4 ++-- include/hw/{misc => g

Re: [PATCH 07/10] pnv/phb4: Set link speed and width in the DLP training control register

2024-03-25 Thread Cédric Le Goater
On 3/21/24 11:04, Saif Abrar wrote: Get the current link-status from PCIE macro. Extract link-speed and link-width from the link-status and set in the DLP training control (PCIE_DLP_TCR) register. Signed-off-by: Saif Abrar Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci-host

Re: [PATCH 08/10] pnv/phb4: Implement IODA PCT table

2024-03-25 Thread Cédric Le Goater
On 3/21/24 11:04, Saif Abrar wrote: IODA PCT table (#3) is implemented without any functionality, being a debug table. Signed-off-by: Saif Abrar Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci-host/pnv_phb4.c | 6 ++ include/hw/pci-host/pnv_phb4.h | 2

Re: [PATCH 09/10] hw/pci: Set write-mask bits for PCIE Link-Control-2 register

2024-03-25 Thread Cédric Le Goater
On 3/21/24 11:04, Saif Abrar wrote: PHB updates the register PCIE Link-Control-2. Set the write-mask bits for TLS, ENTER_COMP, TX_MARGIN, HASD, MOD_COMP, COMP_SOS and COMP_P_DE. You should resend this patch independently of the PowerNV PHB changes. Thanks, C. Signed-off-by: Saif Abrar

Re: [PATCH 10/10] pnv/phb4: Mask off LSI Source-ID based on number of interrupts

2024-03-25 Thread Cédric Le Goater
On 3/21/24 11:04, Saif Abrar wrote: Add a method to reset the value of LSI Source-ID. Mask off LSI source-id based on number of interrupts in the big/small PHB. Looks ok. Signed-off-by: Saif Abrar --- hw/pci-host/pnv_phb4.c | 10 -- 1 file changed, 8 insertions(+), 2

Re: [PATCH 02/10] pnv/phb4: Add reset logic to PHB4

2024-03-25 Thread Cédric Le Goater
Cc: +Fred +Daniel On 3/21/24 11:04, Saif Abrar wrote: Add a method to be invoked on QEMU reset. Also add CFG and PBL core-blocks reset logic using appropriate bits of PHB_PCIE_CRESET register. Tested by reading the reset value of a register. Signed-off-by: Saif Abrar ---

Re: [PATCH 01/10] qtest/phb4: Add testbench for PHB4

2024-03-25 Thread Cédric Le Goater
Hello Saif, On 3/21/24 11:04, Saif Abrar wrote: New qtest TB added for PHB4. TB reads PHB Version register and asserts that bits[24:31] have value 0xA5. Signed-off-by: Saif Abrar --- tests/qtest/meson.build | 1 + tests/qtest/pnv-phb4-test.c | 74 +

Re: [PATCH 0/4] hw/nmi: Remove @cpu_index argument

2024-03-22 Thread Cédric Le Goater
On 3/20/24 16:00, Peter Maydell wrote: On Wed, 20 Mar 2024 at 14:10, Mark Burton wrote: I’d broaden this to all ’signals’ (IRQ, Reset etc) - and I guess similar statements apply, with the “bridge” between the function and the GPIO mechanism moved closer or further from the originator(s) of the

Re: [PATCH] misc/pca9554: Fix check of pin range value in property accessors

2024-03-22 Thread Cédric Le Goater
On 3/21/24 18:15, Philippe Mathieu-Daudé wrote: On 21/3/24 17:01, Cédric Le Goater wrote: Coverity detected an "Integer handling" issue with the pin value :    In expression "state >> pin", right shifting "state" by more than 7    bits always yields zero. 

Re: [PATCH] misc/pca9554: Fix check of pin range value in property accessors

2024-03-21 Thread Cédric Le Goater
On 3/21/24 17:08, Miles Glenn wrote: On Thu, 2024-03-21 at 17:01 +0100, Cédric Le Goater wrote: Coverity detected an "Integer handling" issue with the pin value : In expression "state >> pin", right shifting "state" by more than 7 bits always

[PATCH] misc/pca9554: Fix check of pin range value in property accessors

2024-03-21 Thread Cédric Le Goater
happen because the properties "pin8" and above are not created. Nevertheless, fix the range to avoid this warning. Fixes: CID 1534917 Fixes: de0c7d543bca ("misc: Add a pca9554 GPIO device model") Cc: Glenn Miles Signed-off-by: Cédric Le Goater --- hw/misc/pca9554.c | 4 ++-- 1 file change

Re: [PATCH for-9.1 v5 09/14] memory: Add Error** argument to .log_global_start() handler

2024-03-20 Thread Cédric Le Goater
On 3/20/24 15:42, Peter Xu wrote: On Wed, Mar 20, 2024 at 07:49:05AM +0100, Cédric Le Goater wrote: Modify all .log_global_start() handlers to take an Error** parameter and return a bool. Adapt memory_global_dirty_log_start() to interrupt on the first error the loop on handlers. In such case

Re: [PATCH for-9.1 v5 08/14] migration: Add Error** argument to .load_setup() handler

2024-03-20 Thread Cédric Le Goater
On 3/20/24 09:02, Markus Armbruster wrote: Cédric Le Goater writes: This will be useful to report errors at a higher level, mostly in VFIO today. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- [...] diff --git a/migration/savevm.c b

[PATCH for-9.1 v5 11/14] memory: Add Error** argument to the global_dirty_log routines

2024-03-20 Thread Cédric Le Goater
Cc: Paolo Bonzini Cc: David Hildenbrand Cc: Hyman Huang Signed-off-by: Cédric Le Goater --- Changes in v5: - Removed Yong Huang's R-b - Made use of ram_bitmaps_destroy() in ram_init_bitmaps() to cleanup allocated bitmaps include/exec/memory.h | 5 - hw/i386/xen/xen-hvm.c | 2 +-

[PATCH for-9.1 v5 07/14] migration: Add Error** argument to .save_setup() handler

2024-03-20 Thread Cédric Le Goater
Cc: Halil Pasic Cc: Thomas Huth Cc: Eric Blake Cc: Vladimir Sementsov-Ogievskiy Cc: John Snow Cc: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Reviewed-by: Thomas Huth Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Cédric Le Goater --- include

[PATCH for-9.1 v5 06/14] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-20 Thread Cédric Le Goater
the cleanup to preserve the error reported by .save_setup() handlers. Since the previous behavior was to ignore errors at this step of migration, this change should be examined closely to check that cleanups are still correctly done. Signed-off-by: Cédric Le Goater --- Changes in v5

[PATCH for-9.1 v5 00/14] migration: Improve error reporting

2024-03-20 Thread Cédric Le Goater
() to take an Error** argument - Various refinements on error handling Cédric Le Goater (14): s390/stattrib: Add Error** argument to set_migrationmode() handler vfio: Always report an error in vfio_save_setup() migration: Always report an error in block_save_setup() migration: Always repor

[PATCH for-9.1 v5 03/14] migration: Always report an error in block_save_setup()

2024-03-20 Thread Cédric Le Goater
This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, block_save_setup() always sets a new error. Cc: Stefan Hajnoczi Reviewed-by: Fabiano Rosas Signed-off-by: Cédric Le Goater --- Changes in v5: - Rebased

[PATCH for-9.1 v5 10/14] migration: Introduce ram_bitmaps_destroy()

2024-03-20 Thread Cédric Le Goater
We will use it in ram_init_bitmaps() to clear the allocated bitmaps when support for error reporting is added to memory_global_dirty_log_start(). Signed-off-by: Cédric Le Goater --- migration/ram.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git

[PATCH for-9.1 v5 08/14] migration: Add Error** argument to .load_setup() handler

2024-03-20 Thread Cédric Le Goater
This will be useful to report errors at a higher level, mostly in VFIO today. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- include/migration/register.h | 3 ++- hw/vfio/migration.c | 9 +++-- migration/ram.c | 3

[PATCH for-9.1 v5 14/14] migration: Modify ram_init_bitmaps() to report dirty tracking errors

2024-03-20 Thread Cédric Le Goater
-off-by: Cédric Le Goater --- Changes in v5: - Took into account changes of ram_state_init() and xbzrle_init() to propagate the error. migration/ram.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

[PATCH for-9.1 v5 09/14] memory: Add Error** argument to .log_global_start() handler

2024-03-20 Thread Cédric Le Goater
: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: David Hildenbrand Signed-off-by: Cédric Le Goater --- Changes in v5: - Removed memory_global_dirty_log_rollback - Introduced memory_global_dirty_log_do_start() to call .log_gl

[PATCH for-9.1 v5 05/14] migration: Add Error** argument to vmstate_save()

2024-03-20 Thread Cédric Le Goater
This will prepare ground for future changes adding an Error** argument to qemu_savevm_state_setup(). Reviewed-by: Prasad Pandit Signed-off-by: Cédric Le Goater --- migration/savevm.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/migration

[PATCH for-9.1 v5 13/14] migration: Add Error** argument to xbzrle_init()

2024-03-20 Thread Cédric Le Goater
Since the return value (-ENOMEM) is not exploited, follow the recommendations of qapi/error.h and change it to a bool Signed-off-by: Cédric Le Goater --- migration/ram.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/migration/ram.c b/migration

[PATCH for-9.1 v5 01/14] s390/stattrib: Add Error** argument to set_migrationmode() handler

2024-03-20 Thread Cédric Le Goater
-by: Fabiano Rosas Reviewed-by: Thomas Huth Signed-off-by: Cédric Le Goater --- include/hw/s390x/storage-attributes.h | 2 +- hw/s390x/s390-stattrib-kvm.c | 12 ++-- hw/s390x/s390-stattrib.c | 15 ++- 3 files changed, 21 insertions(+), 8 deletions(-) diff

[PATCH for-9.1 v5 12/14] migration: Add Error** argument to ram_state_init()

2024-03-20 Thread Cédric Le Goater
Since the return value not exploited, follow the recommendations of qapi/error.h and change it to a bool Signed-off-by: Cédric Le Goater --- migration/ram.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

[PATCH for-9.1 v5 02/14] vfio: Always report an error in vfio_save_setup()

2024-03-20 Thread Cédric Le Goater
This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, vfio_save_setup() always sets a new error. Reviewed-by: Fabiano Rosas Reviewed-by: Eric Auger Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 15

[PATCH for-9.1 v5 04/14] migration: Always report an error in ram_save_setup()

2024-03-20 Thread Cédric Le Goater
This will prepare ground for future changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, ram_save_setup() sets a new error. Reviewed-by: Fabiano Rosas Signed-off-by: Cédric Le Goater --- migration/ram.c | 11 ++- 1 file changed, 10

[PATCH 1/2] aspeed: Make the ast2600-a3 SoC not user creatable

2024-03-19 Thread Cédric Le Goater
Aspeed SoCs are complex devices that can not be specified on the command line. Fix that to avoid QEMU aborts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2227 Fixes: f25c0ae1079d ("aspeed/soc: Add AST2600 support") Reported-by: Thomas Huth Signed-off-by: Cédric Le Goater -

[PATCH 2/2] aspeed: Make the ast1030-a1 SoC not user creatable

2024-03-19 Thread Cédric Le Goater
Aspeed SoCs are complex devices that can not be specified on the command line. Fix that to avoid QEMU aborts. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2227 Fixes: 356b230ed138 ("aspeed/soc : Add AST1030 support") Reported-by: Thomas Huth Signed-off-by: Cédric Le Goate

[PULL 2/3] ppc/pnv: I2C controller is not user creatable

2024-03-19 Thread Cédric Le Goater
quot;ppc/pnv: Add an I2C controller model") Cc: Glenn Miles Reported-by: Thomas Huth Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Glenn Miles Signed-off-by: Cédric Le Goater --- hw/ppc/pnv_i2c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ppc/pnv_i

[PULL 0/3] for-9.0 queue

2024-03-19 Thread Cédric Le Goater
for iommufd Cédric Le Goater (3): vfio/iommufd: Fix memory leak ppc/pnv: I2C controller is not user creatable aspeed/smc: Only wire flash devices at reset include/hw/block/flash.h | 2 ++ hw/arm/xlnx-versal-virt.c

[PULL 1/3] vfio/iommufd: Fix memory leak

2024-03-19 Thread Cédric Le Goater
Suggested-by: Zhenzhong Duan Reviewed-by: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- hw/vfio/iommufd.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c index bafddb8f5a9433a3af6a1ce7f5c5a2

[PULL 3/3] aspeed/smc: Only wire flash devices at reset

2024-03-19 Thread Cédric Le Goater
2228 Fixes: 27a2c66c92ec ("aspeed/smc: Wire CS lines at reset") Reported-by: Thomas Huth Reviewed-by: Thomas Huth Tested-by: Thomas Huth [ clg: minor fixes in the commit log ] Signed-off-by: Cédric Le Goater --- include/hw/block/flash.h | 2 ++ hw/arm/xlnx-versal-virt.c | 3 ++- hw/block/

Re: [PATCH v4 10/25] migration: Add Error** argument to qemu_savevm_state_setup()

2024-03-19 Thread Cédric Le Goater
On 3/15/24 15:52, Peter Xu wrote: On Fri, Mar 15, 2024 at 03:21:27PM +0100, Cédric Le Goater wrote: On 3/15/24 13:20, Cédric Le Goater wrote: On 3/15/24 12:01, Peter Xu wrote: On Fri, Mar 15, 2024 at 11:17:45AM +0100, Cédric Le Goater wrote: migrate_set_state is also unintuitive because

Re: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-19 Thread Cédric Le Goater
Hello Zhenzhong, On 2/28/24 04:58, Zhenzhong Duan wrote: HostIOMMUDevice will be inherited by two sub classes, legacy and iommufd currently. Introduce a helper function host_iommu_base_device_init to initialize it. Suggested-by: Eric Auger Signed-off-by: Zhenzhong Duan ---

<    4   5   6   7   8   9   10   11   12   13   >