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
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
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
-
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
af ("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/
ty fix 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-ver
")
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
bafddb8f5a9433a3af6a
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/
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 it
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
---
include/sysemu/h
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
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
--- 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();
WITH_RCU_READ_L
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 in the
af ("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
4581cc5e5d4645ab3e358d
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
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'
orted-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
+++
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 (global_d
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
--- 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();
WITH_RCU_READ_L
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
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
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
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:
- Afte
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
")
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..b9c7efb3ef11e49e189103ae6fb9
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
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 a
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
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
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
[ ...]
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
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
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 of
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
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 the
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 are
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
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
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
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 Barrat&
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 +++
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.
---
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 and
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
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:
This
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
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
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
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 In
ription in the commit message of commit 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.
mmit message of commit ae7c80a7bd73
("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.
ription in the commit message of commit 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.
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/ tags/pull-vfio-202
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
efore 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
,
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
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:
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
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
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 the
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
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 at it
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
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-by
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
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
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
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
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
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 of
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
before 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..63066f49f3ad5504be6d44ffd
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
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
---
Cha
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
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
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
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
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
: 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
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
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
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
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
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
-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
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
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 in
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
.
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 in
: 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
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
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() in
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
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
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
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
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 to
1301 - 1400 of 4571 matches
Mail list logo