[PATCH] 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 Signed-off-by: Cédric Le Goater --- include/hw/block/flash.h | 2 ++ hw/arm/xlnx-versal-virt.c | 3 ++- hw/block/m25p80.c | 1 - hw/ssi/aspeed_smc.c | 9 + 4 files changed, 13 insert

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-18 Thread Cédric Le Goater
On 3/16/24 03:41, Yong Huang wrote: On Wed, Mar 6, 2024 at 9:35 PM Cédric Le Goater mailto:c...@redhat.com>> wrote: Now that the log_global*() handlers take an Error** parameter and return a bool, do the same for memory_global_dirty_log_start() and memory_global_dirty_lo

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-18 Thread Cédric Le Goater
--- a/migration/ram.c +++ b/migration/ram.c @@ -2836,18 +2836,31 @@ static void migration_bitmap_clear_discarded_pages(RAMState *rs) static void ram_init_bitmaps(RAMState *rs) { +Error *local_err = NULL; +bool ret = true; + qemu_mutex_lock_ramlist();

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-18 Thread Cédric Le Goater
On 3/15/24 12:34, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:29PM +0100, Cédric Le Goater wrote: Now that the log_global*() handlers take an Error** parameter and return a bool, do the same for memory_global_dirty_log_start() and memory_global_dirty_log_stop(). The error is reported

[PATCH v2] ppc/pnv: I2C controller is not user creatable

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

Re: [PATCH] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Cédric Le Goater
On 3/18/24 16:53, Thomas Huth wrote: On 18/03/2024 16.44, Cédric Le Goater wrote: The I2C controller is a subunit of the processor. Make it so and avoid QEMU crashes.    $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c    qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521

Re: [PATCH] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Cédric Le Goater
On 3/18/24 16:44, Cédric Le Goater wrote: The I2C controller is a subunit of the processor. Make it so and avoid QEMU crashes. $ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521: pnv_i2c_realize: Assertion `i2c->chip' fai

[PATCH] ppc/pnv: I2C controller is not user creatable

2024-03-18 Thread Cédric Le Goater
ted-by: Thomas Huth Signed-off-by: Cédric Le Goater --- hw/ppc/pnv_i2c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/pnv_i2c.c b/hw/ppc/pnv_i2c.c index 4581cc5e5d4645ab3e358d983a633e33a214c425..37d7b3d68a98d88f201b9a297dbb18678ffdcec2 100644 --- a/hw/ppc/pnv_i2c.c +++ b/hw/

Re: [PATCH v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-18 Thread Cédric Le Goater
On 3/15/24 12:18, Peter Xu wrote: @@ -3009,13 +3045,16 @@ static void listener_add_address_space(MemoryListener *listener, { FlatView *view; FlatRange *fr; +Error *local_err = NULL; if (listener->begin) { listener->begin(listener); } if

Re: [PATCH v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-18 Thread Cédric Le Goater
On 3/15/24 12:18, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:28PM +0100, Cédric Le Goater wrote: diff --git a/system/memory.c b/system/memory.c index a229a79988fce2aa3cb77e3a130db4c694e8cd49..3600e716149407c10a1f6bf8f0a81c2611cf15ba 100644 --- a/system/memory.c +++ b/system/memory.c

Re: [PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-18 Thread Cédric Le Goater
--- a/migration/ram.c +++ b/migration/ram.c @@ -2836,18 +2836,31 @@ static void migration_bitmap_clear_discarded_pages(RAMState *rs) static void ram_init_bitmaps(RAMState *rs) { +Error *local_err = NULL; +bool ret = true; + qemu_mutex_lock_ramlist();

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

2024-03-15 Thread Cédric Le Goater
On 3/15/24 14:11, Peter Xu wrote: On Fri, Mar 15, 2024 at 01:20:49PM +0100, Cédric Le Goater wrote: +static void qemu_savevm_wait_unplug(MigrationState *s, int state) One more trivial comment: I'd even consider dropping "state" altogether, as this should be the only state this funct

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

2024-03-15 Thread Cédric Le Goater
On 3/15/24 14:09, Peter Xu wrote: On Fri, Mar 15, 2024 at 01:20:49PM +0100, 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 it ignores invalid state transitions and we've

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

2024-03-15 Thread Cédric Le Goater
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 it ignores invalid state transitions and we've been using that property to deal with special states

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

2024-03-15 Thread Cédric Le Goater
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 it ignores invalid state transitions and we've been using that property to deal with special states such as POSTCOPY_PAUSED and FAILED: - After

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

2024-03-15 Thread Cédric Le Goater
On 3/12/24 19:28, Fabiano Rosas wrote: Peter Xu writes: On Tue, Mar 12, 2024 at 11:24:39AM -0300, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/12/24 14:34, Cédric Le Goater wrote: On 3/12/24 13:32, Cédric Le Goater wrote: On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater

[PATCH v2] vfio/iommufd: Fix memory leak

2024-03-14 Thread Cédric Le Goater
Suggested-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 a75a785e90c64cdcc4d10c88d217801b3f536cdb..b9c7efb3ef11e49e189103ae6fb9011a631b60

Re: [PATCH] vfio/iommufd: Fix memory leak

2024-03-14 Thread Cédric Le Goater
On 3/14/24 04:31, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Thursday, March 14, 2024 5:06 AM To: qemu-devel@nongnu.org Cc: Alex Williamson ; Cédric Le Goater ; Eric Auger ; Liu, Yi L ; Duan, Zhenzhong Subject: [PATCH] vfio/iommufd: Fix memory leak Make

Re: [PATCH V4 10/14] migration: stop vm for cpr

2024-03-13 Thread Cédric Le Goater
On 3/13/24 15:18, Steven Sistare wrote: On 2/29/2024 8:28 PM, Peter Xu wrote: On Thu, Feb 29, 2024 at 10:21:14AM -0500, Steven Sistare wrote: On 2/25/2024 9:08 PM, Peter Xu wrote: On Thu, Feb 22, 2024 at 09:28:36AM -0800, Steve Sistare wrote: When migration for cpr is initiated, stop the vm

[PATCH] vfio/iommufd: Fix memory leak

2024-03-13 Thread Cédric Le Goater
Make sure variable contents is freed if scanf fails. Cc: Eric Auger Cc: Yi Liu Cc: Zhenzhong Duan Fixes: CID 1540007 Fixes: 5ee3dc7af785 ("vfio/iommufd: Implement the iommufd backend") Signed-off-by: Cédric Le Goater --- hw/vfio/iommufd.c | 5 +++-- 1 file changed, 3 insert

Re: [PATCH] migration: cpr-reboot documentation

2024-03-13 Thread Cédric Le Goater
On 3/13/24 14:55, Steve Sistare wrote: Signed-off-by: Steve Sistare This would be good to have for 9.0. Anyhow, Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/migration/CPR.rst | 147 ++ docs/devel/migration/features.rst | 1 + 2

Re: [PATCH for 9.0] migration: Skip only empty block devices

2024-03-12 Thread Cédric Le Goater
On 3/12/24 19:41, Stefan Hajnoczi wrote: On Tue, Mar 12, 2024 at 01:04:31PM +0100, Cédric Le Goater wrote: The block .save_setup() handler calls a helper routine init_blk_migration() which builds a list of block devices to take into account for migration. When one device is found to be empty

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

2024-03-12 Thread Cédric Le Goater
[ ...] Now VFIO allows a migration to happen without this trick. I'm wondering whether all relevant NICs can also support VFIO migrations in the future, then we can drop this tricky feature for good. Currently, VFIO migration requires a VFIO (PCI) variant driver implementing the specific ops

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

2024-03-12 Thread Cédric Le Goater
On 3/12/24 14:34, Cédric Le Goater wrote: On 3/12/24 13:32, Cédric Le Goater wrote: On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error

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

2024-03-12 Thread Cédric Le Goater
On 3/12/24 13:32, Cédric Le Goater wrote: On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers

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

2024-03-12 Thread Cédric Le Goater
On 3/11/24 21:10, Peter Xu wrote: On Mon, Mar 11, 2024 at 04:03:14PM -0300, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup

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

2024-03-12 Thread Cédric Le Goater
On 3/11/24 20:03, Fabiano Rosas wrote: Cédric Le Goater writes: On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle

Re: [PATCH for 9.0] migration: Skip only empty block devices

2024-03-12 Thread Cédric Le Goater
On 3/12/24 13:04, Cédric Le Goater wrote: The block .save_setup() handler calls a helper routine init_blk_migration() which builds a list of block devices to take into account for migration. When one device is found to be empty (sectors == 0), the loop exits and all the remaining devices

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-12 Thread Cédric Le Goater
On 3/12/24 12:50, Peter Xu wrote: On Tue, Mar 12, 2024 at 10:58:51AM +0100, Cédric Le Goater wrote: On 3/12/24 08:16, Cédric Le Goater wrote: On 3/11/24 21:24, Peter Xu wrote: On Fri, Mar 08, 2024 at 04:15:08PM +0800, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:15PM +0100, Cédric Le Goater

[PATCH for 9.0] migration: Skip only empty block devices

2024-03-12 Thread Cédric Le Goater
bdrv_iterate() was removed. Change that by skipping only empty devices. Cc: Markus Armbruster Suggested: Kevin Wolf Fixes: fea68bb6e9fa ("block: Eliminate bdrv_iterate(), use bdrv_next()") Signed-off-by: Cédric Le Goater --- migration/block.c | 5 - 1 file changed, 4 insert

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-12 Thread Cédric Le Goater
On 3/12/24 08:16, Cédric Le Goater wrote: On 3/11/24 21:24, Peter Xu wrote: On Fri, Mar 08, 2024 at 04:15:08PM +0800, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:15PM +0100, Cédric Le Goater wrote: * [1-4] already queued in migration-next.    migration: Report error when shutdown fails

Re: [PATCH 08/13] ppc/pnv: Set POWER9, POWER10 ibm,pa-features bits

2024-03-12 Thread Cédric Le Goater
On 3/12/24 09:54, Nicholas Piggin wrote: On Tue Mar 12, 2024 at 6:06 PM AEST, Cédric Le Goater wrote: On 3/11/24 19:51, Nicholas Piggin wrote: Copy the pa-features arrays from spapr, adjusting slightly as described in comments. Cc: "Cédric Le Goater" Cc: "Frédéric Barr

Re: [PATCH 08/13] ppc/pnv: Set POWER9, POWER10 ibm,pa-features bits

2024-03-12 Thread Cédric Le Goater
On 3/11/24 19:51, Nicholas Piggin wrote: Copy the pa-features arrays from spapr, adjusting slightly as described in comments. Cc: "Cédric Le Goater" Cc: "Frédéric Barrat" Signed-off-by: Nicholas Piggin --- hw/ppc/pnv.c | 67 +++

Re: [PATCH 07/13] ppc/pnv: Permit ibm,pa-features set per machine variant

2024-03-12 Thread Cédric Le Goater
On 3/11/24 19:51, Nicholas Piggin wrote: This allows different pa-features for powernv8/9/10. Cc: "Cédric Le Goater" Cc: "Frédéric Barrat" Signed-off-by: Nicholas Piggin The features could be a chip class attribute instead. Thanks, C. ---

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-12 Thread Cédric Le Goater
On 3/11/24 21:24, Peter Xu wrote: On Fri, Mar 08, 2024 at 04:15:08PM +0800, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:15PM +0100, Cédric Le Goater wrote: * [1-4] already queued in migration-next. migration: Report error when shutdown fails migration: Remove SaveStateHandler

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

2024-03-11 Thread Cédric Le Goater
On 3/8/24 15:36, Fabiano Rosas wrote: Cédric Le Goater writes: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the error and fail earlier setting the migration state from

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

2024-03-11 Thread Cédric Le Goater
On 3/8/24 15:17, Peter Xu wrote: On Fri, Mar 08, 2024 at 02:55:30PM +0100, Cédric Le Goater wrote: On 3/8/24 14:39, Cédric Le Goater wrote: On 3/8/24 14:14, Cédric Le Goater wrote: On 3/8/24 13:56, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote

Re: [PATCH v2] spapr: Tag pseries-2.1 - 2.11 machines as deprecated

2024-03-11 Thread Cédric Le Goater
On 3/11/24 18:46, Philippe Mathieu-Daudé wrote: Hi, On 14/12/23 19:17, Cédric Le Goater wrote: pseries machines before version 2.11 have undergone many changes to correct issues, mostly regarding migration compatibility. This is obfuscating the code uselessly and makes maintenance more

Re: [PATCH v4 07/25] migration: Always report an error in block_save_setup()

2024-03-11 Thread Cédric Le Goater
On 3/8/24 07:59, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:22PM +0100, Cédric Le Goater wrote: @@ -404,6 +403,10 @@ static int init_blk_migration(QEMUFile *f) sectors = bdrv_nb_sectors(bs); if (sectors <= 0) { Not directly relevant to this patch, but just to ment

Re: [PATCH v2 3/9] aspeed/sdmc: Add AST2700 support

2024-03-11 Thread Cédric Le Goater
On 3/11/24 08:21, Jamin Lin wrote: -Original Message- From: Cédric Le Goater Sent: Monday, March 4, 2024 10:47 PM To: Jamin Lin ; Peter Maydell ; Andrew Jeffery ; Joel Stanley ; Alistair Francis ; open list:ASPEED BMCs ; open list:All patches CC here Cc: Troy Lee ; Yunlin Tang Subject

Re: [PATCH v9 0/3] acpi: report NUMA nodes for device memory using GI

2024-03-11 Thread Cédric Le Goater
On 3/8/24 15:55, ank...@nvidia.com wrote: From: Ankit Agrawal There are upcoming devices which allow CPU to cache coherently access their memory. It is sensible to expose such memory as NUMA nodes separate from the sysmem node to the OS. The ACPI spec provides a scheme in SRAT called Generic

Re: [PATCH v2 29/29] target/s390x/cpu_models: Fix missing ERRP_GUARD() for error_prepend()

2024-03-11 Thread Cédric Le Goater
ae7c80a7bd73 ("error: New macro ERRP_GUARD()"). Cc: David Hildenbrand Cc: Thomas Huth Cc: Richard Henderson Cc: Ilya Leoshkevich Cc: qemu-s3...@nongnu.org Signed-off-by: Zhao Liu --- Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v2 18/29] hw/vfio/ap: Fix missing ERRP_GUARD() for error_prepend()

2024-03-11 Thread Cédric Le Goater
error: New macro ERRP_GUARD()"). Cc: Alex Williamson Cc: "Cédric Le Goater" Cc: Tony Krowiak Cc: Halil Pasic Cc: Jason Herne Cc: Thomas Huth Cc: qemu-s3...@nongnu.org Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C. --- v2: Use Markus' sentence to p

Re: [PATCH v2 29/29] target/s390x/cpu_models: Fix missing ERRP_GUARD() for error_prepend()

2024-03-11 Thread Cédric Le Goater
ae7c80a7bd73 ("error: New macro ERRP_GUARD()"). Cc: David Hildenbrand Cc: Thomas Huth Cc: Richard Henderson Cc: Ilya Leoshkevich Cc: qemu-s3...@nongnu.org Signed-off-by: Zhao Liu --- Reviewed-by: Cédric Le Goater Thanks, C.

[PULL 0/2] vfio queue

2024-03-10 Thread Cédric Le Goater
The following changes since commit cbccded4a2b5d685a426a437e25f67d3a375b292: Merge tag 'pull-riscv-to-apply-20240308-1' of https://github.com/alistair23/qemu into staging (2024-03-08 11:47:01 +) are available in the Git repository at: https://github.com/legoater/qemu/

[PULL 1/2] vfio: register container for cpr

2024-03-10 Thread Cédric Le Goater
From: Steve Sistare Define entry points to perform per-container cpr-specific initialization and teardown. Signed-off-by: Steve Sistare Reviewed-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 3 +++ hw/vfio/container.c | 11 ++- hw/vfio/cpr.c | 19

[PULL 2/2] vfio: allow cpr-reboot migration if suspended

2024-03-10 Thread Cédric Le Goater
initiating cpr, such as by issuing guest-suspend-ram to the qemu guest agent. Relax the vfio blocker so it does not apply to cpr, and add a notifier that verifies the guest is suspended. Signed-off-by: Steve Sistare Reviewed-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 1

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Cédric Le Goater
, Reviewed-by: Cédric Le Goater Thanks, C. --- hw/pci/pci.c | 14 ++ include/hw/pci/pci.h | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 6496d027ca61..8c78326ad67f 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c

Re: [PATCH V4 00/14] allow cpr-reboot for vfio

2024-03-08 Thread Cédric Le Goater
On 2/22/24 18:33, Steven Sistare wrote: Peter (and David if interested): these patches still need RB: migration: notifier error checking migration: stop vm for cpr migration: update cpr-reboot description migration: options incompatible with cpr Alex, these patches still need RB:

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

2024-03-08 Thread Cédric Le Goater
On 3/8/24 14:39, Cédric Le Goater wrote: On 3/8/24 14:14, Cédric Le Goater wrote: On 3/8/24 13:56, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler

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

2024-03-08 Thread Cédric Le Goater
On 3/8/24 14:14, Cédric Le Goater wrote: On 3/8/24 13:56, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now

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

2024-03-08 Thread Cédric Le Goater
On 3/8/24 13:56, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:25PM +0100, Cédric Le Goater wrote: This prepares ground for the changes coming next which add an Error** argument to the .save_setup() handler. Callers of qemu_savevm_state_setup() now handle the error and fail earlier setting

Re: [PATCH v4 00/25] migration: Improve error reporting

2024-03-08 Thread Cédric Le Goater
On 3/8/24 09:15, Peter Xu wrote: On Wed, Mar 06, 2024 at 02:34:15PM +0100, Cédric Le Goater wrote: * [1-4] already queued in migration-next. migration: Report error when shutdown fails migration: Remove SaveStateHandler and LoadStateHandler typedefs migration: Add documentation

Re: [PATCH v4 16/25] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-03-08 Thread Cédric Le Goater
On 3/8/24 08:39, Eric Auger wrote: On 3/7/24 13:06, Cédric Le Goater wrote: On 3/7/24 09:09, Eric Auger wrote: Hi Cédric, On 3/6/24 14:34, Cédric Le Goater wrote: We will use the Error object to improve error reporting in the .log_global*() handlers of VFIO. Add documentation while

Re: [PATCH v4 18/25] vfio: Add Error** argument to vfio_devices_dma_logging_stop()

2024-03-07 Thread Cédric Le Goater
On 3/7/24 09:53, Eric Auger wrote: On 3/6/24 14:34, Cédric Le Goater wrote: This improves error reporting in the log_global_stop() VFIO handler. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- Changes in v4: - Dropped log_global_stop() and log_global_sync

Re: [PATCH v4 20/25] vfio: Add Error** argument to .vfio_save_config() handler

2024-03-07 Thread Cédric Le Goater
On 3/7/24 10:13, Eric Auger wrote: On 3/6/24 14:34, Cédric Le Goater wrote: 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é Signed-off

Re: [PATCH v4 19/25] vfio: Use new Error** argument in vfio_save_setup()

2024-03-07 Thread Cédric Le Goater
On 3/7/24 10:04, Eric Auger wrote: Hi Cédric, On 3/6/24 14:34, Cédric Le Goater wrote: Add an Error** argument to vfio_migration_set_state() and adjust callers, including vfio_save_setup(). The error will be propagated up to qemu_savevm_state_setup() where the save_setup() handler is executed

Re: [PATCH v4 24/25] vfio: Also trace event failures in vfio_save_complete_precopy()

2024-03-07 Thread Cédric Le Goater
On 3/7/24 10:28, Eric Auger wrote: On 3/6/24 14:34, Cédric Le Goater wrote: vfio_save_complete_precopy() currently returns before doing the trace event. Change that. Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/vfio

Re: [PATCH v4 17/25] vfio: Add Error** argument to vfio_devices_dma_logging_start()

2024-03-07 Thread Cédric Le Goater
On 3/7/24 09:15, Eric Auger wrote: Hi Cédric, On 3/6/24 14:34, Cédric Le Goater wrote: This allows to update the Error argument of the VFIO log_global_start() handler. Errors detected when device level logging is started will be propagated up to qemu_savevm_state_setup() when the ram

Re: [PATCH v4 16/25] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-03-07 Thread Cédric Le Goater
On 3/7/24 09:09, Eric Auger wrote: Hi Cédric, On 3/6/24 14:34, Cédric Le Goater wrote: 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é Signed-off-by: Cédric Le Goater

Re: [PATCH v2 0/9] Add AST2700 support

2024-03-07 Thread Cédric Le Goater
On 3/5/24 04:38, Jamin Lin wrote: -Original Message- From: Cédric Le Goater Sent: Monday, March 4, 2024 11:54 PM To: Jamin Lin ; Peter Maydell ; Andrew Jeffery ; Joel Stanley ; Alistair Francis ; open list:ASPEED BMCs ; open list:All patches CC here Cc: Troy Lee ; Yunlin Tang Subject

Re: [PATCH v4 11/25] migration: Add Error** argument to .save_setup() handler

2024-03-07 Thread Cédric Le Goater
On 3/7/24 10:53, Vladimir Sementsov-Ogievskiy wrote: On 06.03.24 16:34, Cédric Le Goater wrote: The purpose is to record a potential error in the migration stream if qemu_savevm_state_setup() fails. Most of the current .save_setup() handlers can be modified to use the Error argument instead

Re: [PATCH v4 21/25] vfio: Reverse test on vfio_get_dirty_bitmap()

2024-03-06 Thread Cédric Le Goater
On 3/6/24 21:51, Philippe Mathieu-Daudé wrote: On 6/3/24 14:34, Cédric Le Goater wrote: It will simplify the changes coming after. Signed-off-by: Cédric Le Goater ---   hw/vfio/common.c | 22 +-   1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hw/vfio

[PATCH v4 04/25] migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error

2024-03-06 Thread Cédric Le Goater
re calling the notifiers. Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- migration/savevm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c index dc1fb9c0d32bbf037471b810bd28e9361c2d7b87..63066f49f3ad5504be6d44ffdf9f7b

[PATCH v4 19/25] vfio: Use new Error** argument in vfio_save_setup()

2024-03-06 Thread Cédric Le Goater
under the migration stream if a migration is in progress. Signed-off-by: Cédric Le Goater --- Changes in v3: - Use error_setg_errno() in vfio_save_setup() - Made sure an error is always set in case of failure in vfio_load_setup() hw/vfio/migration.c | 67

[PATCH v4 25/25] vfio: Extend vfio_set_migration_error() with Error* argument

2024-03-06 Thread Cédric Le Goater
vfio_set_migration_error() sets the 'return' error on the migration stream if a migration is in progress. To improve error reporting, add a new Error* argument to also set the Error object on the migration stream, if a migration is progress. Signed-off-by: Cédric Le Goater --- Changes in v4

[PATCH v4 00/25] migration: Improve error reporting

2024-03-06 Thread Cédric Le Goater
adjustments in callers. - new MEMORY_LISTENER_CALL_LOG_GLOBAL macro for .log_global*() handlers - Handled SETUP state when migration terminates - Modified memory_get_xlat_addr() to take an Error** argument - Various refinements on error handling Cédric Le Goater (25): migration: Report error when

[PATCH v4 08/25] migration: Always report an error in ram_save_setup()

2024-03-06 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. Signed-off-by: Cédric Le Goater --- Changes in v4: - Fixed test on error returned by qemu_fflush() migration/ram.c

[PATCH v4 21/25] vfio: Reverse test on vfio_get_dirty_bitmap()

2024-03-06 Thread Cédric Le Goater
It will simplify the changes coming after. Signed-off-by: Cédric Le Goater --- hw/vfio/common.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 5b2e6a179cdd5f8ca5be84b7097661e96b391456

[PATCH v4 16/25] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-03-06 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é Signed-off-by: Cédric Le Goater --- Changes in v3: - Use error_setg_errno() in vfio_legacy_set_dirty_page_tracking() include

[PATCH v4 03/25] migration: Add documentation for SaveVMHandlers

2024-03-06 Thread Cédric Le Goater
The SaveVMHandlers structure is still in use for complex subsystems and devices. Document the handlers since we are going to modify a few later. Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- include/migration/register.h | 263 +++ 1 file changed, 237

[PATCH v4 05/25] s390/stattrib: Add Error** argument to set_migrationmode() handler

2024-03-06 Thread Cédric Le Goater
-by: Cédric Le Goater --- Changes in v4: - Fixed state name printed out in error returned by vfio_save_setup() - Fixed test on error returned by qemu_file_get_error() include/hw/s390x/storage-attributes.h | 2 +- hw/s390x/s390-stattrib-kvm.c | 12 ++-- hw/s390x/s390-stattrib.c

[PATCH v4 01/25] migration: Report error when shutdown fails

2024-03-06 Thread Cédric Le Goater
This will help detect issues regarding I/O channels usage. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- migration/qemu-file.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c

[PATCH v4 24/25] vfio: Also trace event failures in vfio_save_complete_precopy()

2024-03-06 Thread Cédric Le Goater
vfio_save_complete_precopy() currently returns before doing the trace event. Change that. Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index bd48f2ee472a5230c2c84bff829dae1e217db33f

[PATCH v4 11/25] migration: Add Error** argument to .save_setup() handler

2024-03-06 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 Signed-off-by: Cédric Le Goater --- Changes in v3: - Made sure an error is always set

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

2024-03-06 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 v4

[PATCH v4 23/25] vfio: Add Error** argument to .get_dirty_bitmap() handler

2024-03-06 Thread Cédric Le Goater
Let the callers do the error reporting. Add documentation while at it. Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 4 +- include/hw/vfio/vfio-container-base.h | 17 +++- hw/vfio/common.c | 59 ++- hw/vfio

[PATCH v4 15/25] migration: Modify ram_init_bitmaps() to report dirty tracking errors

2024-03-06 Thread Cédric Le Goater
-off-by: Cédric Le Goater --- migration/ram.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 397b4c0f218a66d194e44f9c5f9fe8e9885c48b6..1e48eee769d314321e31ea71855f4b49a78b6a13 100644 --- a/migration/ram.c +++ b

[PATCH v4 20/25] vfio: Add Error** argument to .vfio_save_config() handler

2024-03-06 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é Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 25

[PATCH v4 12/25] migration: Add Error** argument to .load_setup() handler

2024-03-06 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 --- Changes in v3: - ERRP_GUARD() because of error_prepend use - Made sure an error is always set in case of failure

[PATCH v4 22/25] memory: Add Error** argument to memory_get_xlat_addr()

2024-03-06 Thread Cédric Le Goater
Let the callers do the reporting. This will be useful in vfio_iommu_map_dirty_notify(). Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: David Hildenbrand Signed-off-by: Cédric Le Goater --- include/exec/memory.h | 15 ++- hw/vfio/common.c | 13 + hw/vi

[PATCH v4 17/25] vfio: Add Error** argument to vfio_devices_dma_logging_start()

2024-03-06 Thread Cédric Le Goater
it. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- Changes in v4: - Dropped log_global_stop() and log_global_sync() changes Changes in v3: - Use error_setg_errno() in vfio_devices_dma_logging_start() - ERRP_GUARD() because of error_prepend use

[PATCH v4 13/25] memory: Add Error** argument to .log_global_start() handler

2024-03-06 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 v4: - Dropped log_global_stop() and log_global_sync() changes - Dropped MEMORY_LISTENER_CALL_LOG_GLOBAL

[PATCH v4 02/25] migration: Remove SaveStateHandler and LoadStateHandler typedefs

2024-03-06 Thread Cédric Le Goater
They are only used once. Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Cédric Le Goater --- include/migration/register.h | 4 ++-- include/qemu/typedefs.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/migration/register.h b/include

[PATCH v4 18/25] vfio: Add Error** argument to vfio_devices_dma_logging_stop()

2024-03-06 Thread Cédric Le Goater
This improves error reporting in the log_global_stop() VFIO handler. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- Changes in v4: - Dropped log_global_stop() and log_global_sync() changes Changes in v3: - Use error_setg_errno

[PATCH v4 07/25] migration: Always report an error in block_save_setup()

2024-03-06 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 Signed-off-by: Cédric Le Goater --- Changes in v4: - Added an error when bdrv_nb_sectors

[PATCH v4 14/25] memory: Add Error** argument to the global_dirty_log routines

2024-03-06 Thread Cédric Le Goater
Cc: Paolo Bonzini Cc: David Hildenbrand Cc: Hyman Huang Reviewed-by: Hyman Huang Signed-off-by: Cédric Le Goater --- Changes in v4: - Dropped log_global_stop() and log_global_sync() changes include/exec/memory.h | 5 - hw/i386/xen/xen-hvm.c | 2 +- migration/dirtyr

[PATCH v4 09/25] migration: Add Error** argument to vmstate_save()

2024-03-06 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 v4 06/25] vfio: Always report an error in vfio_save_setup()

2024-03-06 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 Signed-off-by: Cédric Le Goater --- Changes in v4: - Fixed state name printed out

Re: [PATCH v3 02/26] vfio: Always report an error in vfio_save_setup()

2024-03-06 Thread Cédric Le Goater
On 3/6/24 11:16, Avihai Horon wrote: On 06/03/2024 11:56, Avihai Horon wrote: On 04/03/2024 14:28, Cédric Le Goater wrote: External email: Use caution opening links or attachments This will prepare ground for futur changes adding an Error** argument to the save_setup() handler. We need

Re: [PATCH v3 02/26] vfio: Always report an error in vfio_save_setup()

2024-03-06 Thread Cédric Le Goater
On 3/6/24 10:56, Avihai Horon wrote: On 04/03/2024 14:28, Cédric Le Goater wrote: External email: Use caution opening links or attachments This will prepare ground for futur changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, vfio_save_setup

Re: [PATCH v3 14/26] memory: Add Error** argument to .log_global*() handlers

2024-03-05 Thread Cédric Le Goater
On 3/5/24 08:57, Peter Xu wrote: On Mon, Mar 04, 2024 at 01:28:32PM +0100, Cédric Le Goater wrote: @@ -2936,15 +2975,22 @@ void memory_global_dirty_log_start(unsigned int flags) trace_global_dirty_changed(global_dirty_tracking); if (!old_flags

Re: [PATCH v3 04/26] migration: Always report an error in ram_save_setup()

2024-03-05 Thread Cédric Le Goater
On 3/5/24 06:29, Prasad Pandit wrote: On Mon, 4 Mar 2024 at 18:01, Cédric Le Goater wrote: This will prepare ground for futur changes adding an Error** argument * futur -> future Fixed in all first 5 patches. +ret = qemu_fflush(f); +if (ret) { * if (ret) -> if (ret <

Re: [PATCH v3 04/26] migration: Always report an error in ram_save_setup()

2024-03-05 Thread Cédric Le Goater
On 3/4/24 22:30, Fabiano Rosas wrote: Cédric Le Goater writes: This will prepare ground for futur 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. Signed-off-by: Cédric Le Goater --- migration/ram.c

Re: [PATCH v3 00/26] migration: Improve error reporting

2024-03-05 Thread Cédric Le Goater
On 3/5/24 09:06, Peter Xu wrote: On Mon, Mar 04, 2024 at 01:28:18PM +0100, Cédric Le Goater wrote: migration: Report error when shutdown fails migration: Remove SaveStateHandler and LoadStateHandler typedefs migration: Add documentation for SaveVMHandlers migration: Do not call

Re: [PATCH v3 03/26] migration: Always report an error in block_save_setup()

2024-03-05 Thread Cédric Le Goater
On 3/4/24 22:04, Fabiano Rosas wrote: Cédric Le Goater writes: This will prepare ground for futur 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 Signed-off-by: Cédric Le

Re: [PATCH v3 10/26] migration: Move cleanup after after error reporting in qemu_savevm_state_setup()

2024-03-04 Thread Cédric Le Goater
On 3/5/24 04:32, Peter Xu wrote: On Mon, Mar 04, 2024 at 01:28:28PM +0100, Cédric Le Goater wrote: This will help preserving the error set by .save_setup() handlers. Signed-off-by: Cédric Le Goater IIUC this is about the next patch. I got fully confused before reading into the next one

Re: [PATCH v3 01/26] s390/stattrib: Add Error** argument to set_migrationmode() handler

2024-03-04 Thread Cédric Le Goater
On 3/4/24 21:49, Fabiano Rosas wrote: Cédric Le Goater writes: This will prepare ground for futur changes adding an Error** argument to the save_setup() handler. We need to make sure that on failure, set_migrationmode() always sets a new error. See the Rules section in qapi/error.h. Cc

Re: [PATCH v7 2/2] hw/acpi: Implement the SRAT GI affinity structure

2024-03-04 Thread Cédric Le Goater
On 3/5/24 06:59, Ankit Agrawal wrote: One thing I forgot. Please add a test.  tests/qtest/bios-tables-test.c + relevant table dumps. Here I need to add a test that creates a vfio-pci device and numa nodes and link using the acpi-generic-initiator object. One thing here is that the -device

Re: [PATCH v7 7/9] misc: Add a pca9554 GPIO device model

2024-03-04 Thread Cédric Le Goater
but the model does not yet support this. Reviewed-by: Cédric Le Goater Signed-off-by: Glenn Miles --- No changes from previous version   MAINTAINERS    |  10 +-   hw/misc/pca9554.c  | 328 + Not a huge deal, but this should have been in hw/gpio

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