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

2024-03-04 Thread Cédric Le Goater
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() always sets a new error. Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 15 --- 1 file changed, 12 insertions(+), 3

[PATCH v3 20/26] vfio: Use new Error** argument in vfio_save_setup()

2024-03-04 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 v3 19/26] vfio: Add Error** argument to vfio_devices_dma_logging_stop()

2024-03-04 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 v3: - Use error_setg_errno() in vfio_devices_dma_logging_stop() hw/vfio/common.c | 19 ++- 1 file changed, 14

[PATCH v3 15/26] memory: Add Error** argument to the global_dirty_log routines

2024-03-04 Thread Cédric Le Goater
Cc: Paolo Bonzini Cc: David Hildenbrand Cc: Hyman Huang Signed-off-by: Cédric Le Goater --- include/exec/memory.h | 10 -- hw/i386/xen/xen-hvm.c | 4 ++-- migration/dirtyrate.c | 21 + migration/ram.c | 34 ++ system/memory.c

[PATCH v3 25/26] vfio: Also trace event failures in vfio_save_complete_precopy()

2024-03-04 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 4c4ccbaed10b82e7baa992770ec0ec5a6c82b757

[PATCH v3 12/26] migration: Add Error** argument to .save_setup() handler

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

[PATCH v3 17/26] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-03-04 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 v3 03/26] migration: Always report an error in block_save_setup()

2024-03-04 Thread Cédric Le Goater
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 Goater --- migration/block.c | 18 +- 1 file changed

[PATCH v3 08/26] migration: Add documentation for SaveVMHandlers

2024-03-04 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 --- Changes in v3: - VMState -> VMStateDescription - Rephrased .save_live_complete_prec

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

2024-03-04 Thread Cédric Le Goater
.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 (26): s390/stattrib: Add Error** argument to set_migrationmode() handler vfio: Always report an error in

[PATCH v3 06/26] migration: Report error when shutdown fails

2024-03-04 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 v3 14/26] memory: Add Error** argument to .log_global*() handlers

2024-03-04 Thread Cédric Le Goater
memory_global_dirty_log_start() behavior as it will return as soon as an error is detected. Cc: 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 v3: - Fixed retur

[PATCH v3 13/26] migration: Add Error** argument to .load_setup() handler

2024-03-04 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 in

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

2024-03-04 Thread Cédric Le Goater
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 | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff

[PATCH v3 07/26] migration: Remove SaveStateHandler and LoadStateHandler typedefs

2024-03-04 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 v3 10/26] migration: Move cleanup after after error reporting in qemu_savevm_state_setup()

2024-03-04 Thread Cédric Le Goater
This will help preserving the error set by .save_setup() handlers. Signed-off-by: Cédric Le Goater --- migration/savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c index 31ce9391d49c825d4ec835e26ac0246e192783a0

[PATCH v3 09/26] migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error

2024-03-04 Thread Cédric Le Goater
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 c3642fac9dad3e314fe3fd5058889db1d2cecd47..31ce9391d49c825d4ec835e26

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

2024-03-04 Thread Cédric Le Goater
: Cédric Le Goater --- include/hw/s390x/storage-attributes.h | 2 +- hw/s390x/s390-stattrib-kvm.c | 12 ++-- hw/s390x/s390-stattrib.c | 14 +- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/include/hw/s390x/storage-attributes.h b/include

Re: [PATCH v2 03/21] migration: Add documentation for SaveVMHandlers

2024-03-04 Thread Cédric Le Goater
On 3/4/24 10:05, Avihai Horon wrote: Hi Cedric, A few nits below. Just in time for v3 I was about to send ! I will include these suggestions. Thanks, C. On 27/02/2024 20:03, Cédric Le Goater wrote: External email: Use caution opening links or attachments The SaveVMHandlers

Re: [PATCH] Fix typo in comment (uin32_t -> uint32_t)

2024-03-03 Thread Cédric Le Goater
On 3/2/24 08:06, Zhao Liu wrote: On Fri, Mar 01, 2024 at 06:55:35PM +, Frediano Ziglio wrote: Date: Fri, 1 Mar 2024 18:55:35 + From: Frediano Ziglio Subject: [PATCH] Fix typo in comment (uin32_t -> uint32_t) Signed-off-by: Frediano Ziglio --- hw/vfio/pci.h | 2 +- 1 file changed, 1

Re: [PATCH v1 0/5] hw/ppc: SPI model

2024-03-01 Thread Cédric Le Goater
Chalapathi, On 3/1/24 17:17, Chalapathi V wrote: Hello, I would greatly appreciate the review comments/suggestions on PATCH V1. Thank You and Regards, I didn't forget but I lacked the time in this release cycle. Sorry about that. I have one quick comment though. There are already a few mode

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

2024-03-01 Thread Cédric Le Goater
On 3/1/24 02:28, 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 and set state RUN_STATE_FINISH_MIGRATE before r

Re: [PATCH 11/17] hw/vfio/platform: Fix missing ERRP_GUARD() for error_prepend()

2024-02-29 Thread Cédric Le Goater
RP_GUARD()"). Cc: Alex Williamson Cc: "Cédric Le Goater" Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index a8d9b7da633e..dcd2365fb353

Re: [PATCH 10/17] hw/vfio/pci: Fix missing ERRP_GUARD() for error_prepend()

2024-02-29 Thread Cédric Le Goater
void the issue like [1] said, add missing ERRP_GUARD() at their beginning. [1]: Issue description in the commit message of commit ae7c80a7bd73 ("error: New macro ERRP_GUARD()"). Cc: Alex Williamson Cc: "Cédric Le Goater" Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 09/17] hw/vfio/pci-quirks: Fix missing ERRP_GUARD() for error_prepend()

2024-02-29 Thread Cédric Le Goater
scription in the commit message of commit ae7c80a7bd73 ("error: New macro ERRP_GUARD()"). Cc: Alex Williamson Cc: "Cédric Le Goater" Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci-quirks.c | 2 ++ 1 file changed, 2 insertions

Re: [PATCH 08/17] hw/vfio/iommufd: Fix missing ERRP_GUARD() for error_prepend()

2024-02-29 Thread Cédric Le Goater
r: New macro ERRP_GUARD()"). Cc: Alex Williamson Cc: "Cédric Le Goater" Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/iommufd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c index 9bfddc136

Re: [PATCH 07/17] hw/vfio/helpers: Fix missing ERRP_GUARD() for error_prepend()

2024-02-29 Thread Cédric Le Goater
at their beginning. [1]: Issue description in the commit message of commit ae7c80a7bd73 ("error: New macro ERRP_GUARD()"). Cc: Alex Williamson Cc: "Cédric Le Goater" Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/helpers.c | 3 +++

Re: [PATCH 06/17] hw/vfio/container: Fix missing ERRP_GUARD() for error_prepend()

2024-02-29 Thread Cédric Le Goater
r: New macro ERRP_GUARD()"). Cc: Alex Williamson Cc: "Cédric Le Goater" Signed-off-by: Zhao Liu Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v2 11/21] migration: Fix migration termination

2024-02-29 Thread Cédric Le Goater
On 2/29/24 06:34, Peter Xu wrote: On Tue, Feb 27, 2024 at 07:03:35PM +0100, Cédric Le Goater wrote: Handle migration termination when in SETUP state. This can happen if qemu_savevm_state_setup() fails. Signed-off-by: Cédric Le Goater --- migration/migration.c | 4 1 file changed, 4

Re: [PATCH v2 06/21] migration: Add Error** argument to .save_setup() handler

2024-02-29 Thread Cédric Le Goater
On 2/29/24 07:32, Markus Armbruster wrote: Cédric Le Goater writes: 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 managing their own and

Re: [PATCH v2 03/21] migration: Add documentation for SaveVMHandlers

2024-02-29 Thread Cédric Le Goater
On 2/29/24 05:10, Peter Xu wrote: On Tue, Feb 27, 2024 at 07:03:27PM +0100, Cédric Le Goater wrote: The SaveVMHandlers structure is still in use for complex subsystems and devices. Document the handlers since we are going to modify a few later. Signed-off-by: Cédric Le Goater Reviewed-by

Re: [PATCH V4 12/14] vfio: allow cpr-reboot migration if suspended

2024-02-29 Thread Cédric Le Goater
nding the guest before 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 Thanks, C. ---

Re: [PATCH V4 11/14] vfio: register container for cpr

2024-02-29 Thread Cédric Le Goater
vice_add_fd(int fd, Error **errp); int vfio_kvm_device_del_fd(int fd, Error **errp); +int vfio_cpr_register_container(VFIOContainerBase *bcontainer, Error **errp); Should we return bool since we have an errp ? the returned value is not an errno AFAICT. Anyhow, Reviewed-by: Cédric Le Goa

Re: [PATCH v1 8/8] aspeed: Add an AST2700 eval board

2024-02-29 Thread Cédric Le Goater
Hello Jamin, I tried to send the patch series to support AST2700 but I encountered some patches were rejected by server IP 211.20.114.70. Error Log: qemu-devel@nongnu.org eggs.gnu.org Remote Server returned '550-[SPF] 211.20.114.70 is not allowed to send mail from aspeedtech.com. 550 Please s

Re: [PATCH v2] ppc/pnv: Improve pervasive topology calculation for big-core

2024-02-27 Thread Cédric Le Goater
cores (SMT8). Looks good for SMT4 and this change prepares ground SMT8. We would need a new CPU definition to activate big cores. It can come later. Reviewed-by: Cédric Le Goater Thanks, C. include/hw/ppc/pnv_chip.h | 2 +- include/hw/ppc/pnv_core.h | 1 + hw/ppc/pnv.c

[PATCH v2 08/21] memory: Add Error** argument to .log_global*() handlers

2024-02-27 Thread Cédric Le Goater
() behavior as it will return as soon as an error is detected. Cc: 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 --- include/exec/memory.h | 15 ++-- hw/i386/xen/xen-hvm.c | 6

[PATCH v2 06/21] migration: Add Error** argument to .save_setup() handler

2024-02-27 Thread Cédric Le Goater
changes for VFIO first. Cc: Nicholas Piggin Cc: Harsh Prateek Bora 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 Signed-off-by: Cédric Le Goater --- Changes in v2

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

2024-02-27 Thread Cédric Le Goater
before calling the notifiers. 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 d612c8a9020b204d5d078d5df85f0e6449c27645..51876f2ef674bb76c7e7ef96e1119a083883deac 100644

[PATCH v2 16/21] vfio: Add Error** argument to .vfio_save_config() handler

2024-02-27 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 v2 11/21] migration: Fix migration termination

2024-02-27 Thread Cédric Le Goater
Handle migration termination when in SETUP state. This can happen if qemu_savevm_state_setup() fails. Signed-off-by: Cédric Le Goater --- migration/migration.c | 4 1 file changed, 4 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index

[PATCH v2 12/21] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-02-27 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 --- include/hw/vfio/vfio-container-base.h | 18 -- hw/vfio/common.c

[PATCH v2 21/21] vfio: Extend vfio_set_migration_error() with Error* argument

2024-02-27 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 --- hw/vfi

[PATCH v2 19/21] vfio: Add Error** argument to .get_dirty_bitmap() handler

2024-02-27 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 v2 05/21] migration: Add Error** argument to qemu_savevm_state_setup()

2024-02-27 Thread Cédric Le Goater
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. This is a functional change that should be examined closely. Signed-off-by: Cédric Le Goater --- migration

[PATCH v2 20/21] vfio: Also trace event failures in vfio_save_complete_precopy()

2024-02-27 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 228e8854594f3714b7c6f4fcfc5468d6b56337cb

[PATCH v2 03/21] migration: Add documentation for SaveVMHandlers

2024-02-27 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. Signed-off-by: Cédric Le Goater --- include/migration/register.h | 257 +++ 1 file changed, 231 insertions(+), 26

[PATCH v2 10/21] migration: Modify ram_init_bitmaps() to report dirty tracking errors

2024-02-27 Thread Cédric Le Goater
-off-by: Cédric Le Goater --- migration/ram.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 9fb1875aad73b2fa009199bdfa8960339df7287d..23f4df4779309bbbe164c56c1436b60d65749860 100644 --- a/migration/ram.c +++ b

[PATCH v2 00/21] migration: Improve error reporting

2024-02-27 Thread Cédric Le Goater
and made 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 (21): migration: Report

Re: [PATCH v5 3/4] hw: Set virtio-iommu aw-bits default value on pc_q35 and arm virt

2024-02-27 Thread Cédric Le Goater
Hello Eric, On 2/15/24 09:42, Eric Auger wrote: Currently the default input range can extend to 64 bits. On x86, when the virtio-iommu protects vfio devices, the physical iommu may support only 39 bits. Let's set the default to 39, as done for the intel-iommu. On ARM we set 48b as a default (mat

[PATCH v2 09/21] memory: Add Error** argument to the global_dirty_log routines

2024-02-27 Thread Cédric Le Goater
Bonzini Cc: David Hildenbrand Cc: Hyman Huang Signed-off-by: Cédric Le Goater --- include/exec/memory.h | 10 -- hw/i386/xen/xen-hvm.c | 4 ++-- migration/dirtyrate.c | 21 + migration/ram.c | 34 ++ system/memory.c | 30

[PATCH v2 07/21] migration: Add Error** argument to .load_setup() handler

2024-02-27 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é Signed-off-by: Cédric Le Goater --- include/migration/register.h | 3 ++- hw/vfio/migration.c | 2 +- migration/ram.c | 3 ++- migration/savevm.c

[PATCH v2 01/21] migration: Report error when shutdown fails

2024-02-27 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 v2 18/21] memory: Add Error** argument to memory_get_xlat_addr()

2024-02-27 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/virtio/vhost

[PATCH v2 15/21] vfio: Use new Error** argument in vfio_save_setup()

2024-02-27 Thread Cédric Le Goater
under the migration stream if a migration is in progress. Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 64 ++--- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index

[PATCH v2 17/21] vfio: Reverse test on vfio_get_dirty_bitmap()

2024-02-27 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 706e915a3ba5f8520deb3753d9bb450a986f207a

[PATCH v2 14/21] vfio: Add Error** argument to vfio_devices_dma_logging_stop()

2024-02-27 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 --- hw/vfio/common.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index

[PATCH v2 02/21] migration: Remove SaveStateHandler and LoadStateHandler typedefs

2024-02-27 Thread Cédric Le Goater
They are only used once. 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/migration/register.h index

[PATCH v2 13/21] vfio: Add Error** argument to vfio_devices_dma_logging_start()

2024-02-27 Thread Cédric Le Goater
. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater --- hw/vfio/common.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 560f4bc38499f7f4a3bc84ef7e4184fd6dc89935

Re: [PATCH 2/2] ppc/pnv: Fix pervasive topology calculation for P10

2024-02-27 Thread Cédric Le Goater
Hello Caleb, On 2/27/24 15:48, Caleb Schlossin wrote: Pervasive topology(PIR) calculation for core, thread ID was wrong for big cores (SMT8). Fixing for P10. Based on: <20240123195005.8965-1-cal...@linux.vnet.ibm.com> Signed-off-by: Caleb Schlossin Since the initial patch [1] is not merged y

[PULL 0/2] aspeed queue

2024-02-27 Thread Cédric Le Goater
The following changes since commit 1b330dafcdc34315f6837ff3af34dbb4b3106373: Merge tag 'edk2-stable202402-20240226-pull-request' of https://gitlab.com/kraxel/qemu into staging (2024-02-26 21:28:11 +) are available in the Git repository at: https://github.com/legoater/qemu/ tags/pull-asp

[PULL 1/2] aspeed: introduce a new UART0 device name

2024-02-27 Thread Cédric Le Goater
x27;s introduce a new UART0 device name and do the required adjustements. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater [ clg: - Kept original assert() in aspeed_soc_uart_set_chr() - Fixed 'i' range in connect_serial_hds_to_uarts() loop ] Signed

[PULL 2/2] aspeed: fix hardcode boot address 0

2024-02-27 Thread Cédric Le Goater
00 and the boot address is "0x4 ". Fixed hardcode boot address "0" for future models using a different mapping address. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Signed-off-by: Cédric Le Goater --- include/hw/arm/aspeed

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

2024-02-26 Thread Cédric Le Goater
On 2/26/24 03:14, Peter Xu wrote: On Thu, Feb 22, 2024 at 12:33:42PM -0500, 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 in

Re: [RFC PATCH 14/14] migration: Fix return-path thread exit

2024-02-26 Thread Cédric Le Goater
On 2/23/24 15:05, Fabiano Rosas wrote: Peter Xu writes: On Fri, Feb 16, 2024 at 02:35:26PM -0300, Fabiano Rosas wrote: Cédric Le Goater writes: Hello Fabiano On 2/14/24 21:35, Fabiano Rosas wrote: Cédric Le Goater writes: Hello Fabiano On 2/8/24 14:29, Fabiano Rosas wrote: Cédric

[PATCH] MAINTAINERS: Remove myself as reviewer from PPC

2024-02-20 Thread Cédric Le Goater
PPC maintainership has been a side activity for the last 2 years and it is time to let go some of it now that Nick has taken over. Signed-off-by: Cédric Le Goater --- MAINTAINERS | 3 --- 1 file changed, 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index a74d73960c0a..f5a4e4745c92

Re: Trying to write data to i2c bus

2024-02-19 Thread Cédric Le Goater
On 2/19/24 18:14, Corey Minyard wrote: On Mon, Feb 19, 2024 at 04:53:47PM +, Paz Offer wrote: Thank you very much Corey, I am simulating an external module that wants to communicate with the board management controller (BMC). The real device will be connected to the board using i2c bus, an

Re: [PULL 22/49] hw/pci-host/raven.c: Mark raven_io_ops as implementing unaligned accesses

2024-02-19 Thread Cédric Le Goater
On 2/19/24 15:55, Peter Maydell wrote: On Mon, 19 Feb 2024 at 14:53, Cédric Le Goater wrote: On 2/19/24 15:49, BALATON Zoltan wrote: On Mon, 19 Feb 2024, Nicholas Piggin wrote: From: Peter Maydell The raven_io_ops MemoryRegionOps is the only one in the source tree which sets

Re: [PULL 22/49] hw/pci-host/raven.c: Mark raven_io_ops as implementing unaligned accesses

2024-02-19 Thread Cédric Le Goater
: 9a1839164c9c8f06 ("raven: Implement non-contiguous I/O region") Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater Signed-off-by: Peter Maydell Signed-off-by: Nicholas Piggin Hm, this seems to be missing the actual patch. It's merged already and git knows how to handle this. Thanks, C.

Re: [PATCH 13/14] migration: Use migrate_has_error() in close_return_path_on_source()

2024-02-16 Thread Cédric Le Goater
On 2/14/24 17:00, Fabiano Rosas wrote: Cédric Le Goater writes: On 2/8/24 14:57, Fabiano Rosas wrote: Cédric Le Goater writes: On 2/8/24 14:07, Fabiano Rosas wrote: Cédric Le Goater writes: close_return_path_on_source() retrieves the migration error from the the QEMUFile

Re: [RFC PATCH 14/14] migration: Fix return-path thread exit

2024-02-16 Thread Cédric Le Goater
Hello Fabiano On 2/14/24 21:35, Fabiano Rosas wrote: Cédric Le Goater writes: Hello Fabiano On 2/8/24 14:29, Fabiano Rosas wrote: Cédric Le Goater writes: In case of error, close_return_path_on_source() can perform a shutdown to exit the return-path thread. However, in

Re: [PATCH 11/14] vfio: Extend vfio_set_migration_error() with Error* argument

2024-02-16 Thread Cédric Le Goater
Hello Avihai, On 2/12/24 10:35, Avihai Horon wrote: Hi Cedric, On 07/02/2024 15:33, Cédric Le Goater wrote: External email: Use caution opening links or attachments vfio_set_migration_error() sets the 'return' error on the migration stream if a migration is in progress. To imp

Re: [PATCH 05/21] hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API

2024-02-16 Thread Cédric Le Goater
On 2/16/24 12:02, Philippe Mathieu-Daudé wrote: Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ppc/pnv_bmc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

Re: [PATCH 5/6] hw/vfio/common: Use RCU_READ macros

2024-02-16 Thread Cédric Le Goater
On 2/16/24 09:49, Philippe Mathieu-Daudé wrote: On 24/1/24 15:09, Philippe Mathieu-Daudé wrote: On 24/1/24 10:25, Manos Pitsidianakis wrote: On Wed, 24 Jan 2024 09:42, Philippe Mathieu-Daudé wrote: Replace the manual rcu_read_(un)lock calls by the *RCU_READ_LOCK_GUARD macros (See commit ef46a

Re: [PATCH v3 1/2] aspeed: introduce a new UART0 device name

2024-02-16 Thread Cédric Le Goater
the datasheet, let's introduce a new UART0 device name and do the required adjustements. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater One comment below, --- hw/arm/aspeed.c | 13 - hw/arm/aspeed_ast10x0.c | 1 + h

Re: [PATCH v3 2/2] aspeed: fix hardcode boot address 0

2024-02-16 Thread Cédric Le Goater
-a35) side for ast2700 and the boot address is "0x4 ". Fixed hardcode boot address "0" for future models using a different mapping address. Signed-off-by: Troy Lee Signed-off-by: Jamin Lin Reviewed-by: Cédric Le Goater Thanks, C. --- hw/arm/aspeed.c

Re: [PATCH RFCv2 0/8] vfio/iommufd: IOMMUFD Dirty Tracking

2024-02-14 Thread Cédric Le Goater
Hello Joao, On 2/13/24 12:59, Joao Martins wrote: On 12/02/2024 13:56, Joao Martins wrote: This small series adds support for Dirty Tracking in IOMMUFD backend. The sole reason I still made it RFC is because of the second patch, where we are implementing user-managed auto domains. In essence i

Re: [PATCH v4 4/4] qemu-options.hx: Add an entry for virtio-iommu-pci and document aw-bits

2024-02-13 Thread Cédric Le Goater
to 39 bits. On arm virt it defaults to 48 bits. Minor improvement : "It defaults to 39 bits on q35 machines and 48 bits on ARM virt machines." Anyhow, Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH] target/ppc: Fix lxv/stxv MSR facility check

2024-02-13 Thread Cédric Le Goater
mu-project/qemu/-/issues/1769 Tested-by: Harsh Prateek Bora Signed-off-by: Nicholas Piggin Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater with a RHEL9 image. Thanks, C. --- target/ppc/translate/vsx-impl.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

Re: [PATCH 4/4] hw/arm/stellaris: Add missing QOM 'SoC' parent

2024-02-13 Thread Cédric Le Goater
On 2/13/24 16:36, Philippe Mathieu-Daudé wrote: On 1/2/24 17:46, Peter Maydell wrote: On Tue, 30 Jan 2024 at 19:03, Philippe Mathieu-Daudé wrote: QDev objects created with qdev_new() need to manually add their parent relationship with object_property_add_child(). Since we don't model the SoC

Re: [PATCH 08/14] vfio: Use new Error** argument in vfio_save_setup()

2024-02-12 Thread Cédric Le Goater
On 2/12/24 10:17, Avihai Horon wrote: Hi Cedric, On 07/02/2024 15:33, Cédric Le Goater wrote: External email: Use caution opening links or attachments Add an Error** argument to vfio_migration_set_state() and adjust callers, including vfio_save_setup(). The error will be propagated up to

Re: [PATCH 04/14] migration: Modify ram_init_bitmaps() to report dirty tracking errors

2024-02-12 Thread Cédric Le Goater
On 2/12/24 09:51, Avihai Horon wrote: Hi Cedric, On 07/02/2024 15:33, Cédric Le Goater wrote: External email: Use caution opening links or attachments The .save_setup() handler has now an Error** argument that we can use to propagate errors reported by the .log_global_start() handler. Do

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

2024-02-12 Thread Cédric Le Goater
On 2/12/24 09:43, Avihai Horon wrote: Hi Cedric, On 09/02/2024 12:14, Cédric Le Goater wrote: External email: Use caution opening links or attachments On 2/8/24 06:48, Peter Xu wrote: On Wed, Feb 07, 2024 at 02:33:36PM +0100, Cédric Le Goater wrote: @@ -2936,14 +2940,14 @@ void

Re: [RFC PATCH 14/14] migration: Fix return-path thread exit

2024-02-12 Thread Cédric Le Goater
Hello Peter On 2/8/24 06:57, Peter Xu wrote: On Wed, Feb 07, 2024 at 02:33:47PM +0100, Cédric Le Goater wrote: In case of error, close_return_path_on_source() can perform a shutdown to exit the return-path thread. However, in migrate_fd_cleanup(), 'to_dst_file' is closed befo

Re: [RFC PATCH 14/14] migration: Fix return-path thread exit

2024-02-12 Thread Cédric Le Goater
Hello Fabiano On 2/8/24 14:29, Fabiano Rosas wrote: Cédric Le Goater writes: In case of error, close_return_path_on_source() can perform a shutdown to exit the return-path thread. However, in migrate_fd_cleanup(), 'to_dst_file' is closed before calling close_return_path_on_source

Re: [PATCH 01/14] migration: Add Error** argument to .save_setup() handler

2024-02-12 Thread Cédric Le Goater
On 2/12/24 09:36, Avihai Horon wrote: Hi, Cedric On 07/02/2024 15:33, Cédric Le Goater wrote: External email: Use caution opening links or attachments The purpose is to record a potential error in the migration stream if qemu_savevm_state_setup() fails. Most of the current .save_setup

Re: [PATCH 13/14] migration: Use migrate_has_error() in close_return_path_on_source()

2024-02-12 Thread Cédric Le Goater
On 2/8/24 14:57, Fabiano Rosas wrote: Cédric Le Goater writes: On 2/8/24 14:07, Fabiano Rosas wrote: Cédric Le Goater writes: close_return_path_on_source() retrieves the migration error from the the QEMUFile '->to_dst_file' to know if a shutdown is required. This shutdown i

Re: [PATCH v2 2/6] vfio: Avoid inspecting option QDict for rombar

2024-02-12 Thread Cédric Le Goater
On 2/12/24 09:04, Philippe Mathieu-Daudé wrote: On 10/2/24 11:24, Akihiko Odaki wrote: Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly enabled. Signed-off-by: Akihiko Odaki ---   hw/vfio/pci.c | 3 +--   1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/v

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

2024-02-09 Thread Cédric Le Goater
On 2/8/24 06:48, Peter Xu wrote: On Wed, Feb 07, 2024 at 02:33:36PM +0100, Cédric Le Goater wrote: @@ -2936,14 +2940,14 @@ void memory_global_dirty_log_start(unsigned int flags) trace_global_dirty_changed(global_dirty_tracking); if (!old_flags

Re: [PATCH 02/14] migration: Add Error** argument to .load_setup() handler

2024-02-09 Thread Cédric Le Goater
On 2/8/24 05:30, Peter Xu wrote: On Wed, Feb 07, 2024 at 02:33:35PM +0100, Cédric Le Goater wrote: diff --git a/migration/ram.c b/migration/ram.c index 136c237f4079f68d4e578cf1c72eec2efc815bc8..8dac9bac2fe8b8c19e102c771a7ef6e976252906 100644 --- a/migration/ram.c +++ b/migration/ram.c

Re: [PATCH v2 2/2] aspeed: fix hardcode boot address 0

2024-02-09 Thread Cédric Le Goater
stification could be simpler. This change is just a cleanup preparing ground for future models using a different mapping address. Reviewed-by: Cédric Le Goater Thanks, C. --- hw/arm/aspeed.c | 4 +++- hw/arm/aspeed_ast2400.c | 4 ++-- hw/arm/aspeed_ast2600.c | 2

Re: [PATCH v2 1/2] aspeed: introduce a new UART0 device name

2024-02-09 Thread Cédric Le Goater
Hello Jamin, On 2/7/24 21:02, Jamin Lin via wrote: The Aspeed datasheet refers to the UART controllers as UART1 - UART13 for the ast10x0, ast2600, ast2500 and ast2400 SoCs and the Aspeed ast2700 introduces an UART0 and the UART controllers as UART0 - UART12. To keep the naming in the QEMU model

Re: [PATCH 08/13] hw/arm/mps3r: Initial skeleton for mps3-an536 board

2024-02-08 Thread Cédric Le Goater
+/* + * The MPS3 DDR is 3GiB, but on a 32-bit host QEMU doesn't permit + * emulation of that much guest RAM, so artificially make it smaller. + */ +#if HOST_LONG_BITS == 32 +#define MPS3_DDR_SIZE (1 * GiB) +#else +#define MPS3_DDR_SIZE (3 * GiB) +#endif Generically, can we migrate a VM starte

Re: [PATCH 13/14] migration: Use migrate_has_error() in close_return_path_on_source()

2024-02-08 Thread Cédric Le Goater
On 2/8/24 14:07, Fabiano Rosas wrote: Cédric Le Goater writes: close_return_path_on_source() retrieves the migration error from the the QEMUFile '->to_dst_file' to know if a shutdown is required. This shutdown is required to exit the return-path thread. However, in migra

Re: [PATCH 01/14] migration: Add Error** argument to .save_setup() handler

2024-02-08 Thread Cédric Le Goater
On 2/7/24 21:11, Philippe Mathieu-Daudé wrote: On 7/2/24 14:33, 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 managing

Re: [PATCH v3 3/3] hw: Set virtio-iommu aw-bits default value on pc_q35 and arm virt

2024-02-08 Thread Cédric Le Goater
Duan Tested-by: Yanghang Liu Reviewed-by: Cédric Le Goater Thanks, C. --- v2 -> v3: - collected Zhenzhong's R-b - use &error_abort instead of NULL error handle on object_property_get_uint() call (Cédric) - use VTD_HOST_AW_39BIT (Cédric) v1 -> v2: - set aw-bits to 48b on ARM -

[PATCH 12/14] migration: Report error when shutdown fails

2024-02-07 Thread Cédric Le Goater
This will help detect issues regarding I/O channels usage. 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 index 94231ff2955c80b3d0fab11a40510d34c334a826

[PATCH 08/14] vfio: Use new Error** argument in vfio_save_setup()

2024-02-07 Thread Cédric Le Goater
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. Signed-off-by: Cédric Le Goater --- hw/vfio/migration.c | 62

[PATCH 04/14] migration: Modify ram_init_bitmaps() to report dirty tracking errors

2024-02-07 Thread Cédric Le Goater
: Cédric Le Goater --- migration/ram.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index d86626bb1c704b2d3497b323a702ca6ca8939a79..b87245466bb46937fd0358d0c66432bcc6280018 100644 --- a/migration/ram.c +++ b/migration/ram.c

[PATCH 05/14] vfio: Add Error** argument to .set_dirty_page_tracking() handler

2024-02-07 Thread Cédric Le Goater
We will use the Error object to improve error reporting in the .log_global*() handlers of VFIO. Signed-off-by: Cédric Le Goater --- include/hw/vfio/vfio-container-base.h | 4 ++-- hw/vfio/common.c | 4 ++-- hw/vfio/container-base.c | 4 ++-- hw/vfio/container.c

[PATCH 07/14] vfio: Add Error** argument to vfio_devices_dma_logging_stop()

2024-02-07 Thread Cédric Le Goater
This improves error reporting in the log_global_stop() VFIO handler. Signed-off-by: Cédric Le Goater --- hw/vfio/common.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index a5d53e67efaa921e89ad918390a22506c7b1ed66

<    8   9   10   11   12   13   14   15   16   17   >