Re: [PATCH v4 00/15] vfio: VFIO migration support with vIOMMU

2024-06-06 Thread Cédric Le Goater
Hello Joao, On 6/22/23 23:48, Joao Martins wrote: Hey, This series introduces support for vIOMMU with VFIO device migration, particurlarly related to how we do the dirty page tracking. Today vIOMMUs serve two purposes: 1) enable interrupt remaping 2) provide dma translation services for

Re: [PATCH] MAINTAINERS: Add reviewers for ASPEED BMCs

2024-06-05 Thread Cédric Le Goater
On 6/5/24 08:03, Jamin Lin wrote: Add ASPEED members "Steven Lee", "Troy Lee" and "Jamin Lin" to be reviewers of ASPEED BMCs. Signed-off-by: Jamin Lin Signed-off-by: Troy Lee Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater Thanks, C. ---

Re: [PATCH] MAINTAINERS: Add maintainers for ASPEED BMCs

2024-06-04 Thread Cédric Le Goater
-off-by: Jamin Lin Signed-off-by: Troy Lee Signed-off-by: Steven Lee --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 951556224a..39651be467 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1158,6 +1158,9 @@ F: docs/system/arm/emcraft-sf2.rst ASP

Re: [PATCH 24/32] hw/sd: Subtract bootarea size from blk

2024-06-04 Thread Cédric Le Goater
On 6/3/24 14:31, Philippe Mathieu-Daudé wrote: On 3/7/23 15:25, Cédric Le Goater wrote: From: Joel Stanley The userdata size is derived from the file the user passes on the command line, but we must take into account the boot areas. Signed-off-by: Joel Stanley Signed-off-by: Cédric Le

Re: [PATCH 17/32] hw/sd: Add emmc_cmd_SEND_RELATIVE_ADDR() handler

2024-06-04 Thread Cédric Le Goater
On 6/3/24 14:26, Philippe Mathieu-Daudé wrote: On 3/7/23 15:24, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater ---   hw/sd/sd.c | 20   1 file changed, 20 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index dd60a16f8c0a..5ff132139ea9 100644 --- a/hw/sd/sd.c

Re: [PATCH v5 00/17] Add AST2700 support

2024-06-04 Thread Cédric Le Goater
On 6/4/24 07:44, Jamin Lin wrote: Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Changes from v2: - replace is_aarch64 with is_bus64bit for sdmc patch review. - fix incorrect dram size for AST2700 Changes from v3: - Add AST2700 Evaluation board in

Re: [PATCH v5 12/17] aspeed/intc: Add AST2700 support

2024-06-04 Thread Cédric Le Goater
+--+ +>+17 | UART12 | | +->18 | | | | | | | +---+ Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v5 13/17] aspeed/soc: Add AST2700 support

2024-06-04 Thread Cédric Le Goater
is connected to GICINT or-gates instead of GIC device. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/arm/aspeed_ast27x0.c | 563 hw/arm/meson.build | 1 + include/hw/arm/aspeed_soc.h

Re: [PATCH v5 15/17] aspeed/soc: fix incorrect dram size for AST2700

2024-06-04 Thread Cédric Le Goater
d_soc_ast2700_dram_init to calculate the dram size and add memory I/O whose address range is from "max_ram_size - ram_size" to max_ram_size and its read/write handler to emulate DDR capacity hardware behavior. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Go

Re: [PATCH v5 10/17] aspeed/smc: Add AST2700 support

2024-06-04 Thread Cédric Le Goater
is a 64 bits quad core CPUs(Cortex-a35). Introduce a new "aspeed_2700_smc_flash_ops" and set its valid "max_access_size" 8 for 64 bits data format access. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ss

Re: [PATCH v5 09/17] aspeed/smc: support different memory region ops for SMC flash region

2024-06-04 Thread Cédric Le Goater
ize 4 only support 32 bits CPUs. To support all ASPEED SMC model, introduce a new "const MemoryRegionOps *" attribute in AspeedSMCClass and use it in aspeed_smc_flash_realize function. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. ---

Re: [PATCH v5 05/17] aspeed/sdmc: Add AST2700 support

2024-06-04 Thread Cédric Le Goater
. Incrementing the version of vmstate to 2. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/misc/aspeed_sdmc.c | 194 +- include/hw/misc/aspeed_sdmc.h | 5 +- 2 files changed, 195 insertions(+), 4

Re: [PATCH v6 18/19] intel_iommu: Implement [set|unset]_iommu_device() callbacks

2024-06-03 Thread Cédric Le Goater
On 6/3/24 13:02, Duan, Zhenzhong wrote: -Original Message- From: CLEMENT MATHIEU--DRIF Subject: Re: [PATCH v6 18/19] intel_iommu: Implement [set|unset]_iommu_device() callbacks On 03/06/2024 08:10, Zhenzhong Duan wrote: Caution: External email. Do not open attachments or click

Re: [PATCH v6 05/19] backends/host_iommu_device: Introduce HostIOMMUDeviceCaps

2024-06-03 Thread Cédric Le Goater
hints host IOMMU address width. Introduce .get_cap() handler to check if HOST_IOMMU_DEVICE_CAP_XXX is supported. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- include/sysemu/host_iommu_device.h | 37 ++ 1 file changed, 37 insertions(+) diff --git

Re: [PATCH v6 11/19] backends/iommufd: Implement HostIOMMUDeviceClass::get_cap() handler

2024-06-03 Thread Cédric Le Goater
On 6/3/24 13:32, Eric Auger wrote: On 6/3/24 08:10, Zhenzhong Duan wrote: Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- backends/iommufd.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/backends/iommufd.c b/backends/iommufd.c index

Re: [PATCH v6 01/19] backends: Introduce HostIOMMUDevice abstract

2024-06-03 Thread Cédric Le Goater
-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- MAINTAINERS| 2 ++ include/sysemu/host_iommu_device.h | 51 ++ backends/host_iommu_device.c | 30 ++ backends/Kconfig | 5 +++ backends

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

2024-06-03 Thread Cédric Le Goater
Thanks for your suggestion. How about these changes? 1. aspeed_smc.h struct AspeedSMCClass { const MemoryRegionOps *reg_ops; } 2. aspeed_smc.c a. create new memory region opts for ast2700 static const MemoryRegionOps aspeed_2700_smc_flash_ops = { .read = aspeed_smc_flash_read,

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

2024-06-03 Thread Cédric Le Goater
On 6/3/24 11:49, Jamin Lin wrote: Hi Cedric, From: Cédric Le Goater Subject: Re: [SPAM] Re: [PATCH v4 09/16] aspeed/smc: Add AST2700 support @@ -670,7 +670,7 @@ static const MemoryRegionOps aspeed_smc_flash_ops = {   .endianness = DEVICE_LITTLE_ENDIAN,   .valid

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

2024-06-03 Thread Cédric Le Goater
@@ -670,7 +670,7 @@ static const MemoryRegionOps aspeed_smc_flash_ops = {   .endianness = DEVICE_LITTLE_ENDIAN,   .valid = {   .min_access_size = 1, -    .max_access_size = 4, +    .max_access_size = 8, Is this a bugfix? If so, please use a separate patch. Otherwise

Re: [PATCH v4 11/16] aspeed/intc: Add AST2700 support

2024-06-03 Thread Cédric Le Goater
+static void aspeed_2700_intc_class_init(ObjectClass *klass, void +*data) { +DeviceClass *dc = DEVICE_CLASS(klass); +AspeedINTCClass *aic = ASPEED_INTC_CLASS(klass); + +dc->desc = "ASPEED 2700 INTC Controller"; +aic->num_lines = 32; +aic->num_ints = 9; Use

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

2024-05-31 Thread Cédric Le Goater
Hello Jamin, I refer to versal_create_apu_gic function, https://github.com/qemu/qemu/blob/master/hw/arm/xlnx-versal.c#L67 and updated aspeed_soc_ast2700_gic as following. If you have any concerned about the new changes, please let me know. Thanks-Jamin static bool

Re: [PATCH v4 14/16] aspeed/soc: fix incorrect dram size for AST2700

2024-05-30 Thread Cédric Le Goater
On 5/30/24 09:42, Jamin Lin wrote: Hi Cedric, From: Cédric Le Goater > Hello Jamin On 5/27/24 10:02, Jamin Lin wrote: AST2700 dram size calculation is not back compatible AST2600. According to the DDR capacity hardware behavior, if users write the data to address which is beyond the ram s

Re: [RFC PATCH 08/10] ppc/pnv: Invert the design for big-core machine modelling

2024-05-30 Thread Cédric Le Goater
@@ -157,6 +157,14 @@ static int pnv_dt_core(PnvChip *chip, PnvCore *pc, void *fdt) pnv_cc->processor_id(chip, pc->hwid, 0, , ); +/* Only one DT node per (big) core */ +if (tir != 0) { +g_assert(pc->big_core); +g_assert(tir == 1); +

Re: [PATCH v4 02/11] ppc/pseries: Add Power11 cpu type

2024-05-30 Thread Cédric Le Goater
On 5/30/24 09:06, Harsh Prateek Bora wrote: On 5/28/24 12:35, Aditya Gupta wrote: Add sPAPR CPU Core definition for Power11 Cc: David Gibson (reviewer:sPAPR (pseries)) Cc: Harsh Prateek Bora (reviewer:sPAPR (pseries)) Cc: Cédric Le Goater Cc: Daniel Henrique Barboza Cc: Frédéric Barrat

Re: [PATCH v4 11/11] ppc/pnv: Update skiboot.lid to support Power11

2024-05-30 Thread Cédric Le Goater
On 5/30/24 08:41, Aditya Gupta wrote: Hello Cedric, On Tue, May 28, 2024 at 09:15:29AM GMT, Cédric Le Goater wrote: On 5/28/24 09:05, Aditya Gupta wrote: Skiboot/OPAL patches are in discussion upstream [1], with corresponding commits in github repository [2]. Update skiboot.lid, with binary

Re: [RFC PATCH 05/10] ppc/pnv: Extend chip_pir class method to TIR as well

2024-05-30 Thread Cédric Le Goater
On 5/30/24 08:38, Nicholas Piggin wrote: On Wed May 29, 2024 at 4:30 PM AEST, Cédric Le Goater wrote: On 5/29/24 02:24, Nicholas Piggin wrote: On Tue May 28, 2024 at 6:32 PM AEST, Harsh Prateek Bora wrote: On 5/26/24 17:56, Nicholas Piggin wrote: The chip_pir chip class method allows

Re: [PATCH v7 1/9] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-05-29 Thread Cédric Le Goater
On 5/29/24 08:26, Markus Armbruster wrote: I had a look at this before I realized it's already in. I'm sending this out not to demand any change, but only to point out an issue to be avoided in future work. Cédric Le Goater writes: We will use the Error object to improve error reporting

Re: [PATCH v4 14/16] aspeed/soc: fix incorrect dram size for AST2700

2024-05-29 Thread Cédric Le Goater
Hello Jamin On 5/27/24 10:02, Jamin Lin wrote: AST2700 dram size calculation is not back compatible AST2600. According to the DDR capacity hardware behavior, if users write the data to address which is beyond the ram size, it would write the data to address 0. For example: a. sdram base address

Re: [RFC PATCH 10/10] ppc/pnv: Add an LPAR per core machine option

2024-05-29 Thread Cédric Le Goater
LGTM, Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/ppc/pnv.h | 1 + include/hw/ppc/pnv_core.h | 1 + hw/ppc/pnv.c | 29 + hw/ppc/pnv_core.c | 8 target/ppc/cpu_init.c | 3 ++- 5 files changed, 41 inser

Re: [RFC PATCH 09/10] ppc/pnv: Implement POWER10 PC xscom registers for direct controls

2024-05-29 Thread Cédric Le Goater
On 5/26/24 14:26, Nicholas Piggin wrote: The PC unit in the processor core contains xscom registers that provide low level status and control of the CPU. This implements "direct controls" sufficient for OPAL (skiboot) firmware use, which is to stop threads and send them non-maskable IPIs in the

Re: [RFC PATCH 08/10] ppc/pnv: Invert the design for big-core machine modelling

2024-05-29 Thread Cédric Le Goater
On 5/26/24 14:26, Nicholas Piggin wrote: POWER9 and POWER10 machines come in two variants, "big-core" and "small-core". Big core machines are SMT8 from the software point of view, but in the low level platform topology ("xscom registers and pervasive addressing"), these look more like a pair of

Re: [RFC PATCH 07/10] target/ppc: Add helpers to check for SMT sibling threads

2024-05-29 Thread Cédric Le Goater
On 5/26/24 14:26, Nicholas Piggin wrote: Add helpers for TCG code to determine if there are SMT siblings sharing per-core and per-lpar registers. This simplifies the callers and makes SMT register topology simpler to modify with later changes. Signed-off-by: Nicholas Piggin ---

Re: [RFC PATCH 05/10] ppc/pnv: Extend chip_pir class method to TIR as well

2024-05-29 Thread Cédric Le Goater
On 5/29/24 02:24, Nicholas Piggin wrote: On Tue May 28, 2024 at 6:32 PM AEST, Harsh Prateek Bora wrote: On 5/26/24 17:56, Nicholas Piggin wrote: The chip_pir chip class method allows the platform to set the PIR processor identification register. Extend this to a more general ID function

Re: [PATCH v4 00/16] Add AST2700 support

2024-05-28 Thread Cédric Le Goater
On 5/28/24 12:02, Jamin Lin wrote: Hi Cedric, -Original Message- From: Cédric Le Goater Sent: Tuesday, May 28, 2024 5:56 PM To: Jamin Lin ; Peter Maydell ; Andrew Jeffery ; Joel Stanley ; Alistair Francis ; Cleber Rosa ; Philippe Mathieu-Daudé ; Wainer dos Santos Moschetta ; Beraldo

Re: [PATCH v4 00/16] Add AST2700 support

2024-05-28 Thread Cédric Le Goater
Jamin, I think you should add your self as a Reviewer to the ASPEED BMCs machine in the MAINTAINERS files. Would you agree ? Thanks, C. On 5/27/24 10:02, Jamin Lin wrote: Changes from v1: The patch series supports WDT, SDMC, SMC, SCU, SLI and INTC for AST2700 SoC. Changes from v2: -

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

2024-05-28 Thread Cédric Le Goater
[ ... ] I don't think this is necessary to do so now. Possibly, increase the version number in the vmstate when resending a v5. If I understand your request, do you mean to change as following in this patch? static const VMStateDescription vmstate_aspeed_sdmc = { .name = "aspeed.sdmc",

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

2024-05-28 Thread Cédric Le Goater
On 5/27/24 10:02, 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 v4 11/16] aspeed/intc: Add AST2700 support

2024-05-28 Thread Cédric Le Goater
On 5/27/24 10:02, Jamin Lin wrote: AST2700 interrupt controller(INTC) provides hardware interrupt interfaces to interrupt of processors PSP, SSP and TSP. In INTC, each interrupt of INT 128 to INT136 combines 32 interrupts. Introduce a new aspeed_intc class with instance_init and realize

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

2024-05-28 Thread Cédric Le Goater
On 5/27/24 10:02, 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: [RFC PATCH 02/10] ppc/pnv: Move timebase state into PnvCore

2024-05-28 Thread Cédric Le Goater
On 5/28/24 08:28, Harsh Prateek Bora wrote: On 5/26/24 17:56, Nicholas Piggin wrote: The timebase state machine is per per-core state and can be driven by any thread in the core. It is currently implemented as a hack where the state is in a CPU structure and only thread 0's state is accessed

Re: [RFC PATCH 04/10] ppc/pnv: specialise init for powernv8/9/10 machines

2024-05-28 Thread Cédric Le Goater
On 5/28/24 09:10, Harsh Prateek Bora wrote: Hi Nick, On 5/26/24 17:56, Nicholas Piggin wrote: This will allow different settings and checks for different machine types with later changes. Signed-off-by: Nicholas Piggin ---   hw/ppc/pnv.c | 35 ++-   1 file

Re: [PATCH v4 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-28 Thread Cédric Le Goater
the POWER11 processor sub-unit models (HOMER, OCC, LPC) are implemented. Also the POWER11 chip model lacks an instance_init() handler initializing the chip children to the correct POWER11 types. AFAICT, power11-pnv-chip is still using power10 types. More below, Cc: Cédric Le Goater Cc: Frédéric

Re: [PATCH v4 11/11] ppc/pnv: Update skiboot.lid to support Power11

2024-05-28 Thread Cédric Le Goater
]:https://github.com/maheshsal/skiboot. Cc: Cédric Le Goater Cc: Joel Stanley Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- pc-bios/skiboot.lid | Bin 2527328 -> 2527328 bytes Please don't resend. This is big ! Thanks, C.

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

2024-05-28 Thread Cédric Le Goater
fmc, spi0, spi1, and spi2 class init handler. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater ---   hw/ssi/aspeed_smc.c | 222 +++-   1 file changed, 220 insertions(+), 2 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi

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

2024-05-28 Thread Cédric Le Goater
On 5/27/24 18:06, Philippe Mathieu-Daudé wrote: Hi Jamin, On 27/5/24 10:02, 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

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

2024-05-28 Thread Cédric Le Goater
) Review done. If I need to resend v5 patch series, I will remove "dram-base property" from this patch. ok. Wait a bit before resending though. We are not done with v4 yet ! Thanks, C. Thanks for your help, Jamin Else, Reviewed-by: Cédric Le Goater Thanks, C. --- hw

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

2024-05-28 Thread Cédric Le Goater
On 5/28/24 03:26, Jamin Lin wrote: Hi Philippe, Cedric On 27/5/24 13:18, Cédric Le Goater wrote: On 5/27/24 12:24, Philippe Mathieu-Daudé wrote: Hi Jamin, On 27/5/24 10:02, Jamin Lin wrote: The SDRAM memory controller(DRAMC) controls the access to external DDR4 and DDR5 SDRAM and power up

Re: [RFC PATCH 01/10] ppc/pnv: Add pointer from PnvCPUState to PnvCore

2024-05-27 Thread Cédric Le Goater
Error **errp, Error *local_err = NULL; PnvChipClass *pcc = PNV_CHIP_GET_CLASS(pc->chip); +pnv_cpu->core = pc; I would do the assignment in pnv_core_realize() after cpu->machine_data is allocated. it's minor. Reviewed-by: Cédric Le Goater Thanks, C. if

Re: [PATCH v3 05/11] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-27 Thread Cédric Le Goater
On 5/27/24 09:10, Aditya Gupta wrote: Power11 core is same as Power10, use the existing functionalities to introduce a Power11 chip and machine, with Power10 chip as parent of Power11 chip, thus going through similar class_init paths Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J

Re: [PATCH] vfio: container: Fix missing allocation of VFIOSpaprContainer

2024-05-27 Thread Cédric Le Goater
On 5/22/24 18:15, Shivaprasad G Bhat wrote: On 5/13/24 17:53, Cédric Le Goater wrote: Hello Shivaprasad, On 5/9/24 21:14, Shivaprasad G Bhat wrote: The commit 6ad359ec29 "(vfio/spapr: Move prereg_listener into spapr container)" began to use the newly introduced VFIOSpaprContainer

Re: [PATCH v5 19/19] intel_iommu: Check compatibility with host IOMMU capabilities

2024-05-27 Thread Cédric Le Goater
On 5/8/24 11:03, Zhenzhong Duan wrote: If check fails, host device (either VFIO or VDPA device) is not compatible with current vIOMMU config and should not be passed to guest. Only aw_bits is checked for now, we don't care other capabilities before scalable modern mode is introduced.

Re: [PATCH v5 01/19] backends: Introduce HostIOMMUDevice abstract

2024-05-27 Thread Cédric Le Goater
On 5/13/24 12:28, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Subject: Re: [PATCH v5 01/19] backends: Introduce HostIOMMUDevice abstract Hello Zhenzhong, On 5/8/24 11:03, Zhenzhong Duan wrote: Introduce HostIOMMUDevice as an abstraction of host IOMMU

Re: [PATCH v4 07/16] aspeed/smc: support dma start length and 1 byte length unit

2024-05-27 Thread Cédric Le Goater
ned-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ssi/aspeed_smc.c | 43 ++--- include/hw/ssi/aspeed_smc.h | 1 + 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ss

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

2024-05-27 Thread Cédric Le Goater
rt 64 bits dram address. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin I will move the addition of the "dram-base" property to another patch. See : https://patchew.org/QEMU/20240527124315.35356-1-...@redhat.com/ (Please review) Else, Reviewed-by: Cédric Le Goater Thanks,

[PATCH] aspeed/smc: Reintroduce "dram-base" property for AST2700

2024-05-27 Thread Cédric Le Goater
he address space. Re-introduce a "dram-base" property to hold this value. Signed-off-by: Cédric Le Goater --- include/hw/ssi/aspeed_smc.h | 1 + hw/ssi/aspeed_smc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/hw/ssi/aspeed_smc.h b/include/hw/ssi/aspeed_smc.h in

Re: [PATCH] hw/s390x: Remove unused macro VMSTATE_ADAPTER_ROUTES

2024-05-27 Thread Cédric Le Goater
On 5/27/24 14:13, Thomas Huth wrote: It's not used anywhere, so let's simply remove it. Signed-off-by: Thomas Huth Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/s390x/s390_flic.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hw/s390x/s390_flic.h b/include

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

2024-05-27 Thread Cédric Le Goater
unlocked property to change controller protected status. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater ---   hw/misc/aspeed_sdmc.c | 190 +-   include/hw/misc/aspeed_sdmc.h |   5 +-   2 files changed, 193 insertions(+), 2

Re: [RFC PATCH 00/10] ppc/pnv: Better big-core model, lpar-per-core, PC unit

2024-05-27 Thread Cédric Le Goater
On 5/27/24 09:32, Nicholas Piggin wrote: On Mon May 27, 2024 at 4:25 PM AEST, Cédric Le Goater wrote: On 5/26/24 14:26, Nicholas Piggin wrote: Primary motivation for this series is to improve big-core support. Other things like SPR indirect, timebase state, PC xscom, are required for minimal

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

2024-05-27 Thread Cédric Le Goater
Hello Jamin, [ ... ] See my aspeed-9.1 branch, I did some changes, mostly in the last patch. * aspeed_smc_dma_len() - can use QEMU_ALIGN_UP(). simpler. * aspeed_smc_dma_rw(): - dram_addr -> dma_dram_offset - There is no need to protect updates of the R_DMA_DRAM_ADDR_HIGH

Re: [PATCH 0/7] s390x/ccw: Error reporting cleanups

2024-05-27 Thread Cédric Le Goater
On 5/27/24 08:23, Thomas Huth wrote: On 22/05/2024 19.01, Cédric Le Goater wrote: Hello, The first patches of this series simply apply the practices described in the Rules section of the qapi/error.h file for routines taking an 'Error **' argument. The remaining patches are a fixup

Re: [RFC PATCH 00/10] ppc/pnv: Better big-core model, lpar-per-core, PC unit

2024-05-27 Thread Cédric Le Goater
On 5/26/24 14:26, Nicholas Piggin wrote: Primary motivation for this series is to improve big-core support. Other things like SPR indirect, timebase state, PC xscom, are required for minimal big core support. I'm still not 100% happy with the big-core topology model after this. Maybe one day we

Re: [PATCH 6/7] vfio/ccw: Fix the missed unrealize() call in error path

2024-05-23 Thread Cédric Le Goater
On 5/22/24 19:01, Cédric Le Goater wrote: From: Zhenzhong Duan When get name failed, we should call unrealize() so that vfio_ccw_realize() is self contained. Fixes: 909a6254eda ("vfio/ccw: Make vfio cdev pre-openable by passing a file handle") Signed-off-by: Zhenzhong Duan

[PATCH 3/7] hw/s390x/ccw: Remove local Error variable from s390_ccw_realize()

2024-05-22 Thread Cédric Le Goater
Use the 'Error **errp' argument of s390_ccw_realize() instead and remove the error_propagate() call. Signed-off-by: Cédric Le Goater --- hw/s390x/s390-ccw.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c index

[PATCH 6/7] vfio/ccw: Fix the missed unrealize() call in error path

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan When get name failed, we should call unrealize() so that vfio_ccw_realize() is self contained. Fixes: 909a6254eda ("vfio/ccw: Make vfio cdev pre-openable by passing a file handle") Signed-off-by: Zhenzhong Duan --- hw/vfio/ccw.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH 7/7] vfio/{ap, ccw}: Use warn_report_err() for IRQ notifier registration errors

2024-05-22 Thread Cédric Le Goater
vfio_ccw_register_irq_notifier() and vfio_ap_register_irq_notifier() errors are currently reported using error_report_err(). Since they are not considered as failing conditions, using warn_report_err() is more appropriate. Signed-off-by: Cédric Le Goater --- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c

[PATCH 4/7] s390x/css: Make S390CCWDeviceClass::realize return bool

2024-05-22 Thread Cédric Le Goater
Since the realize() handler of S390CCWDeviceClass takes an 'Error **' argument, best practices suggest to return a bool. See the api/error.h Rules section. While at it, modify the call in vfio_ccw_realize(). Signed-off-by: Cédric Le Goater --- include/hw/s390x/s390-ccw.h | 2 +- hw/s390x/s390

[PATCH 5/7] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize()

2024-05-22 Thread Cédric Le Goater
The local error variable is kept for vfio_ccw_register_irq_notifier() because it is not considered as a failing condition. We will change how error reporting is done in following changes. Remove the error_propagate() call. Cc: Zhenzhong Duan Signed-off-by: Cédric Le Goater --- hw/vfio/ccw.c

[PATCH 0/7] s390x/ccw: Error reporting cleanups

2024-05-22 Thread Cédric Le Goater
of this vfio PR : https://lore.kernel.org/qemu-devel/20240522095442.195243-1-...@redhat.com Thanks, C. Cédric Le Goater (6): hw/s390x/ccw: Make s390_ccw_get_dev_info() return a bool s390x/css: Make CCWDeviceClass::realize return bool hw/s390x/ccw: Remove local Error variable from

[PATCH 1/7] hw/s390x/ccw: Make s390_ccw_get_dev_info() return a bool

2024-05-22 Thread Cédric Le Goater
Since s390_ccw_get_dev_info() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. While at it, modify the call in s390_ccw_realize(). Signed-off-by: Cédric Le Goater --- hw/s390x/s390-ccw.c | 12 ++-- 1 file changed, 6 insertions

[PATCH 2/7] s390x/css: Make CCWDeviceClass::realize return bool

2024-05-22 Thread Cédric Le Goater
Since the realize() handler of CCWDeviceClass takes an 'Error **' argument, best practices suggest to return a bool. See the api/error.h Rules section. While at it, modify the call in s390_ccw_realize(). Signed-off-by: Cédric Le Goater --- hw/s390x/ccw-device.h | 2 +- hw/s390x/ccw-device.c | 3

[PULL 30/47] vfio/display: Fix error path in call site of ramfb_setup()

2024-05-22 Thread Cédric Le Goater
Hoffmann Fixes: b290659fc3d ("hw/vfio/display: add ramfb support") Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/display.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/vfio/display.c b/hw/vfio/displ

[PULL 24/47] vfio/container: Make vfio_connect_container() return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/container.c | 18 +++--- 1 file

[PULL 45/47] vfio/pci-quirks: Make vfio_add_*_cap() return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Include below functions: vfio_add_virt_caps() vfio_add_nv_gpudirect_cap() vfio_add_vmd_shadow_cap() Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed

[PULL 46/47] vfio: Use g_autofree in all call site of vfio_get_region_info()

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan There are some exceptions when pointer to vfio_region_info is reused. In that case, the pointed memory is freed manually. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/helpers.c

[PULL 16/47] vfio/migration: Emit VFIO migration QAPI event

2024-05-22 Thread Cédric Le Goater
so events can be enabled only for the required devices. It is disabled by default. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 1 + hw/vfio/migration.c | 59 +-- hw/

[PULL 21/47] vfio: Make VFIOIOMMUClass::attach_device() and its wrapper return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan Make VFIOIOMMUClass::attach_device() and its wrapper function vfio_attach_device() return bool. This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le

[PULL 22/47] vfio: Make VFIOIOMMUClass::setup() return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 2 +- hw

[PULL 27/47] vfio/iommufd: Make iommufd_cdev_*() return bool

2024-05-22 Thread Cédric Le Goater
iommufd_cdev_get_info_iova_range After the change, all functions in hw/vfio/iommufd.c follows the standand. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/iommufd.c | 88

[PULL 29/47] backends/iommufd: Make iommufd_backend_*() return bool

2024-05-22 Thread Cédric Le Goater
either error interface or trace, not both. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- include/sysemu/iommufd.h | 6 +++--- backends/iommufd.c | 29 + hw/vfio/iommufd.c

[PULL 13/47] vfio/ccw: Make vfio_ccw_register_irq_notifier() return a bool

2024-05-22 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. Reviewed-by: Markus Armbruster Reviewed-by: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/ccw.c | 22 +++--- 1 file

[PULL 47/47] vfio/igd: Use g_autofree in vfio_probe_igd_bar4_quirk()

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan Pointer opregion, host and lpc are allocated and freed in vfio_probe_igd_bar4_quirk(). Use g_autofree to automatically free them. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/igd.c | 27

[PULL 03/47] migration: Extend migration_file_set_error() with Error* argument

2024-05-22 Thread Cédric Le Goater
Use it to update the current error of the migration stream if available and if not, simply print out the error. Next changes will update with an error to report. Reviewed-by: Avihai Horon Acked-by: Fabiano Rosas Reviewed-by: Eric Auger Signed-off-by: Cédric Le Goater --- include/migration

[PULL 01/47] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-05-22 Thread Cédric Le Goater
We will use the Error object to improve error reporting in the .log_global*() handlers of VFIO. Add documentation while at it. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Avihai Horon Reviewed-by: Eric Auger Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 18

[PULL 18/47] vfio/migration: Enhance VFIO migration state tracing

2024-05-22 Thread Cédric Le Goater
(covering recover state and device reset transitions) and in no-op state transitions to the same state. Suggested-by: Cédric Le Goater Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 8 ++-- hw/vfio/trace-events | 3

[PULL 05/47] vfio/migration: Add Error** argument to .vfio_save_config() handler

2024-05-22 Thread Cédric Le Goater
Use vmstate_save_state_with_err() to improve error reporting in the callers and store a reported error under the migration stream. Add documentation while at it. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Reviewed-by: Avihai Horon Signed-off-by: Cédric Le Goater --- include

[PULL 33/47] vfio/helpers: Make vfio_set_irq_signaling() return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 4 ++-- hw

[PULL 26/47] vfio/container: Make vfio_get_device() return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/container.c | 16 +++- 1 file

[PULL 40/47] vfio/pci: Make vfio_intx_enable() return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/pci.c | 19 --- 1 file

[PULL 20/47] vfio/pci: Use g_autofree in iommufd_cdev_get_info_iova_range()

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan Local pointer info is freed before return from iommufd_cdev_get_info_iova_range(). Use 'g_autofree' to avoid the g_free() calls. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/iommufd.c | 4 +--- 1 file changed

[PULL 19/47] vfio/pci: Use g_autofree in vfio_realize

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan Local pointer name is allocated before vfio_attach_device() call and freed after the call. Same for tmp when calling realpath(). Use 'g_autofree' to avoid the g_free() calls. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater

[PULL 34/47] vfio/helpers: Make vfio_device_get_name() return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan This is to follow the coding standand in qapi/error.h to return bool for bool-valued functions. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 2 +- hw/vfio

[PULL 32/47] vfio/helpers: Use g_autofree in vfio_set_irq_signaling()

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan Local pointer irq_set is freed before return from vfio_set_irq_signaling(). Use 'g_autofree' to avoid the g_free() calls. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/helpers.c | 3 +-- 1 file changed, 1

[PULL 43/47] vfio/pci: Use g_autofree for vfio_region_info pointer

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan Pointer opregion is freed after vfio_pci_igd_opregion_init(). Use 'g_autofree' to avoid the g_free() calls. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions

[PULL 23/47] vfio: Make VFIOIOMMUClass::add_window() and its wrapper return bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan Make VFIOIOMMUClass::add_window() and its wrapper function vfio_container_add_section_window() return bool. This is to follow the coding standand to return bool if 'Error **' is used to pass error. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan Reviewed

[PULL 15/47] qapi/vfio: Add VFIO migration QAPI event

2024-05-22 Thread Cédric Le Goater
of the VFIO device for their own purposes. Note that this new event is introduced since VFIO devices have a unique set of migration states which cannot be described as accurately by other existing events such as run state or migration status. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater

[PULL 14/47] vfio/pci: migration: Skip config space check for Vendor Specific Information in VSC during restore/load

2024-05-22 Thread Cédric Le Goater
;= 9.1. The check would be enforced on older machine types (<= 9.0). Cc: Alex Williamson Cc: Michael S. Tsirkin Cc: Cédric Le Goater Signed-off-by: Vinayak Kale Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/pci.h | 1 + hw/core/machine.c | 1 + hw/vfio/pci.c

[PULL 17/47] vfio/migration: Don't emit STOP_COPY VFIO migration QAPI event twice

2024-05-22 Thread Cédric Le Goater
ces that don't support pre-copy, for migrating an already stopped guest and for snapshots. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/vfio/migration.c b/hw/vfio/migratio

[PULL 39/47] vfio/pci: Make vfio_populate_device() return a bool

2024-05-22 Thread Cédric Le Goater
-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/pci.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 4fb5fd0c9f61627c402164fc4bed1868540350e0..46d3c618596d95266543e9a0ebc65c04d9a7cc5d 100644

[PULL 38/47] vfio/pci: Make vfio_pci_relocate_msix() and vfio_msix_early_setup() return a bool

2024-05-22 Thread Cédric Le Goater
-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/pci.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 12fb534d796f52724f365746c9c8c2491265f03d

[PULL 36/47] vfio/ccw: Make vfio_ccw_get_region() return a bool

2024-05-22 Thread Cédric Le Goater
From: Zhenzhong Duan Since vfio_populate_device() takes an 'Error **' argument, best practices suggest to return a bool. See the qapi/error.h Rules section. Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- hw/vfio/ccw.c | 15 +++ 1

  1   2   3   4   5   6   7   8   9   10   >