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

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

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

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

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

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

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

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

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

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

[PATCH] 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 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 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

[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 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 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 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

Re: [PATCH 1/2] target/sh4: Deprecate the shix machine

2024-01-08 Thread Cédric Le Goater
to deprecate it. Signed-off-by: Samuel Tardieu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/about/deprecated.rst | 5 + hw/sh4/shix.c | 1 + 2 files changed, 6 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 2e15040246

Re: [PATCH 2/2] hw/block: Deprecate the TC58128 block device

2024-01-08 Thread Cédric Le Goater
-by: Samuel Tardieu Reviewed-by: Cédric Le Goater Thanks, C. --- docs/about/deprecated.rst | 2 +- hw/block/tc58128.c| 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index e6a12c9077..15e39f8bbb 100644

Re: [PATCH v3 5/5] Rename "QEMU global mutex" to "BQL" in comments and docs

2024-01-02 Thread Cédric Le Goater
i Acked-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v3 4/5] Replace "iothread lock" with "BQL" in comments

2024-01-02 Thread Cédric Le Goater
On 1/2/24 16:35, Stefan Hajnoczi wrote: The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL) in their names. Update the code comments to use "BQL" instead of "iothread lock". Signed-off-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 4/6] system/cpus: rename qemu_global_mutex to qemu_bql

2023-11-30 Thread Cédric Le Goater
-by: Stefan Hajnoczi Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 3/6] qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql()

2023-11-30 Thread Cédric Le Goater
On 11/29/23 22:26, Stefan Hajnoczi wrote: The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL) instead, it is already widely used and unambiguous. Signed-off-by: Stefan Hajnoczi Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 2/6] qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to QEMU_BQL_LOCK_GUARD

2023-11-30 Thread Cédric Le Goater
On 11/29/23 22:26, Stefan Hajnoczi wrote: The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL) instead, it is already widely used and unambiguous. Signed-off-by: Stefan Hajnoczi Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread Cédric Le Goater
mes. Subsequent patches will rename them. There are also comments and documentation that will be updated in later patches. Signed-off-by: Stefan Hajnoczi Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v2] block/snapshot: Fix compiler warning with -Wshadow=local

2023-11-06 Thread Cédric Le Goater
On 10/24/23 13:51, Thomas Huth wrote: On 24/10/2023 12.37, Markus Armbruster wrote: Markus Armbruster writes: Thomas Huth writes: No need to declare a new variable in the the inner code block here, we can re-use the "ret" variable that has been declared at the beginning of the function.

Re: [PATCH 1/1] hw/sd: Declare CPU QOM types using DEFINE_TYPES() macro

2023-10-31 Thread Cédric Le Goater
:[body2] }, }; DEFINE_TYPES(:[i1a]) ''' rule=''' where :[i1a] == :[i1b], :[i2a] == :[i2b], :[rt1] == :[rt2] ''' and re-indented manually. Signed-off-by: Philippe Mathieu-Daudé I checked the aspeed part. Reviewed-by: Cédric Le Goater Thanks, C. --- hw/sd/as

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-20 Thread Cédric Le Goater
On 10/20/23 07:10, Thomas Huth wrote: On 19/10/2023 23.15, Cédric Le Goater wrote: On 10/19/23 22:49, Greg Kurz wrote: Hi Juan, On Thu, 19 Oct 2023 21:08:25 +0200 Juan Quintela wrote: Current code does: - register pre_2_10_vmstate_dummy_icp with "icp/server" and instance   

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-19 Thread Cédric Le Goater
On 10/19/23 22:49, Greg Kurz wrote: Hi Juan, On Thu, 19 Oct 2023 21:08:25 +0200 Juan Quintela wrote: Current code does: - register pre_2_10_vmstate_dummy_icp with "icp/server" and instance dependinfg on cpu number - for newer machines, it register vmstate_icp with "icp/server" name and

Re: [RFC PATCH 22/78] target/ppc: add fallthrough pseudo-keyword

2023-10-13 Thread Cédric Le Goater
/excp_helper.c | 6 +++--- target/ppc/mmu-radix64.c | 6 +++--- target/ppc/mmu_common.c | 12 ++-- target/ppc/translate.c | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) Reviewed-by: Cédric Le Goater Thanks, C.

Re: [RFC PATCH 42/75] hw/misc: add fallthrough pseudo-keyword

2023-10-13 Thread Cédric Le Goater
deletions(-) For aspeed, Reviewed-by: Cédric Le Goater Thanks, C. diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c index a375ebc987..b422bec3c4 100644 --- a/hw/misc/a9scu.c +++ b/hw/misc/a9scu.c @@ -21,26 +21,27 @@ static uint64_t a9_scu_read(void *opaque, hwaddr offset

Re: [RFC PATCH 13/78] hw/adc: add fallthrough pseudo-keyword

2023-10-13 Thread Cédric Le Goater
| 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) For aspeed, Reviewed-by: Cédric Le Goater Thanks, C.

Re: [PATCH v7 05/15] python/qemu: rename command() to cmd()

2023-10-09 Thread Cédric Le Goater
-by: Cédric Le Goater Thanks, C. --- docs/devel/testing.rst| 10 +- python/qemu/machine/machine.py| 8 +- python/qemu/qmp/legacy.py | 2 +- python/qemu/qmp/qmp_shell.py | 2 +- python/qemu/utils/qemu_ga_client.py | 2

Re: [PATCH v2 01/22] qapi: Inline and remove QERR_BUS_NO_HOTPLUG definition

2023-10-04 Thread Cédric Le Goater
using sed, manually removing the definition in include/qapi/qmp/qerror.h. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- include/qapi/qmp/qerror.h | 3 --- hw/ppc/spapr_pci.c| 4 ++-- softmmu/qdev-monitor.c| 8 +--- 3 files changed, 7

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-01 Thread Cédric Le Goater
On 9/1/23 16:50, Markus Armbruster wrote: Cédric Le Goater writes: On 8/31/23 16:30, Eric Blake wrote: On Thu, Aug 31, 2023 at 03:25:46PM +0200, Markus Armbruster wrote: [This paragraph written last: Bear with my stream of consciousness review below, where I end up duplicating some

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-01 Thread Cédric Le Goater
On 8/31/23 16:30, Eric Blake wrote: On Thu, Aug 31, 2023 at 03:25:46PM +0200, Markus Armbruster wrote: [This paragraph written last: Bear with my stream of consciousness review below, where I end up duplicating some of the conslusions you reached before the point where I saw where the patch was

Re: [PATCH 07/11] hw/arm/aspeed: Clean up local variable shadowing

2023-08-31 Thread Cédric Le Goater
ere qemu_irq irq; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/arm/aspeed_ast2600.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index a8b3a80

Re: [PATCH] hw/nvme: use stl/ldl pci dma api

2023-07-20 Thread Cédric Le Goater
On 7/20/23 11:42, Klaus Jensen wrote: From: Klaus Jensen Use the stl/ldl pci dma api for writing/reading doorbells. This removes the explicit endian conversions. Signed-off-by: Klaus Jensen Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater on big and little endian hosts, Thanks

Re: [PATCH] hw/nvme: fix endianness issue for shadow doorbells

2023-07-18 Thread Cédric Le Goater
hosts. Fix this. Solves issue #1765. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1765 Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Thomas Huth Signed-off-by: Klaus Jensen Tested-by: Cédric Le Goater

Re: [PATCH v2 01/16] migration: Don't use INT64_MAX for unlimited rate

2023-05-16 Thread Cédric Le Goater
On 5/16/23 11:24, Juan Quintela wrote: David Edmondson wrote: Juan Quintela writes: Define and use RATE_LIMIT_MAX instead. Suggest "RATE_LIMIT_MAX_NONE". Then even better RATE_LIMIT_DISABLED? I'd vote for RATE_LIMIT_DISABLED. RATE_LIMIT_NONE? Using MAX and NONE at the same time

Re: [PATCH v2 05/16] migration: Move rate_limit_max and rate_limit_used to migration_stats

2023-05-16 Thread Cédric Le Goater
ded qemu_file_set_rate_limit -> migration_rate_set qemu_file_get_rate_limit -> migration_rate_get qemu_file_reset_rate_limit -> migration_rate_reset qemu_file_acct_rate_limit -> migration_rate_account. Signed-off-by: Juan Quintela Reviewed-by: Harsh Prateek Bora Reviewed-by: Cédric Le Goat

Re: [PATCH 10/21] migration: Move rate_limit_max and rate_limit_used to migration_stats

2023-05-15 Thread Cédric Le Goater
On 5/15/23 15:09, Juan Quintela wrote: Cédric Le Goater wrote: On 5/8/23 15:08, Juan Quintela wrote: This way we can make them atomic and use this functions from any place. I also moved all functions that use rate_limit to migration-stats. Functions got renamed, they are not qemu_file

Re: [PATCH 14/21] migration: We don't need the field rate_limit_used anymore

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:09, Juan Quintela wrote: Since previous commit, we calculate how much data we have send with migration_transferred_bytes() so no need to maintain this counter and remember to always update it. Signed-off-by: Juan Quintela Reviewed-by: Cédric Le Goater Thanks, C

Re: [PATCH 11/21] migration: Move migration_total_bytes() to migration-stats.c

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:08, Juan Quintela wrote: Once there rename it to migration_transferred_bytes() and pass a QEMUFile instead of a migration object. Signed-off-by: Juan Quintela Reviewed-by: Cédric Le Goater C. --- migration/migration-stats.c | 6 ++ migration/migration-stats.h | 9

Re: [PATCH 12/21] migration: Add a trace for migration_transferred_bytes

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:09, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Cédric Le Goater Thanks, C. --- migration/migration-stats.c | 8 ++-- migration/trace-events | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/migration/migration-stats.c b

Re: [PATCH 13/21] migration: Use migration_transferred_bytes() to calculate rate_limit

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:09, Juan Quintela wrote: Signed-off-by: Juan Quintela Reviewed-by: Cédric Le Goater C. --- migration/migration-stats.c | 7 +-- migration/migration-stats.h | 6 +- migration/migration.c | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 10/21] migration: Move rate_limit_max and rate_limit_used to migration_stats

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:08, Juan Quintela wrote: This way we can make them atomic and use this functions from any place. I also moved all functions that use rate_limit to migration-stats. Functions got renamed, they are not qemu_file anymore. qemu_file_rate_limit -> migration_rate_limit_exceeded

Re: [PATCH 09/21] qemu-file: Account for rate_limit usage on qemu_fflush()

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:08, Juan Quintela wrote: That is the moment we know we have transferred something. Signed-off-by: Juan Quintela Reviewed-by: Cédric Le Goater Thanks, C. --- migration/qemu-file.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/migration/qemu

Re: [PATCH 08/21] migration: Move setup_time to mig_stats

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:08, Juan Quintela wrote: It is a time that needs to be cleaned each time cancel migration. Once there ccreate calculate_time_since() to calculate how time since a time in the past. Signed-off-by: Juan Quintela --- migration/migration-stats.c | 7 +++

Re: [PATCH 06/21] qemu-file: Remove total from qemu_file_total_transferred_*()

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:08, Juan Quintela wrote: Function is already quite long. Signed-off-by: Juan Quintela Reviewed-by: Cédric Le Goater C. --- migration/block.c | 4 ++-- migration/migration.c | 2 +- migration/qemu-file.c | 4 ++-- migration/qemu-file.h | 10

Re: [PATCH 05/21] qemu-file: Make rate_limit_used an uint64_t

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:08, Juan Quintela wrote: Change all the functions that use it. It was already passed as uint64_t. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé Message-Id: <20230504113841.23130-5-quint...@redhat.com> Reviewed-by: Cédric Le Goater C. --- migratio

Re: [PATCH 04/21] qemu-file: make qemu_file_[sg]et_rate_limit() use an uint64_t

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:08, Juan Quintela wrote: It is really size_t. Everything else uses uint64_t, so move this to uint64_t as well. A size can't be negative anyways. Signed-off-by: Juan Quintela Message-Id: <20230504113841.23130-4-quint...@redhat.com> Reviewed-by: Cédric Le Goat

Re: [PATCH 03/21] migration: We set the rate_limit by a second

2023-05-15 Thread Cédric Le Goater
pass 0, so this change is a NOP. Signed-off-by: Juan Quintela Reviewed-by: Cédric Le Goater C. --- migration/migration.c | 7 +++ migration/options.c | 4 ++-- migration/qemu-file.c | 6 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/migration/migration.c b

Re: [PATCH 02/21] migration: Don't use INT64_MAX for unlimited rate

2023-05-15 Thread Cédric Le Goater
On 5/9/23 13:51, Juan Quintela wrote: Harsh Prateek Bora wrote: On 5/8/23 18:38, Juan Quintela wrote: Use 0 instead. Signed-off-by: Juan Quintela --- migration/migration.c | 4 ++-- migration/qemu-file.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 01/21] migration: A rate limit value of 0 is valid

2023-05-15 Thread Cédric Le Goater
On 5/8/23 15:08, Juan Quintela wrote: And it is the best way to not have rate_limit. Signed-off-by: Juan Quintela Reviewed-by: Cédric Le Goater C. --- migration/migration.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/migration/migration.c b/migration

Re: [PULL 04/16] aspeed/smc: Cache AspeedSMCClass

2023-05-12 Thread Cédric Le Goater
Hello, On 5/12/23 06:00, Philippe Mathieu-Daudé wrote: Hi Cédric, On 25/10/22 17:20, Cédric Le Goater wrote: Store a reference on the AspeedSMC class under the flash object and use it when accessing the flash contents. Avoiding the class cast checkers in these hot paths improves performance

Re: [PATCH] pflash: Fix blk_pread_nonzeroes()

2023-03-07 Thread Cédric Le Goater
, but not actually doing anything), but it breaks everything else. Fix it to read from the root node instead. Fixes: a4b15a8b9ef25b44fa92a4825312622600c1f37c Reported-by: Cédric Le Goater Signed-off-by: Kevin Wolf I have a couple of extra patches for 8.0. I can include this fix if no one does

Re: [PULL 03/38] pflash: Only read non-zero parts of backend image

2023-03-07 Thread Cédric Le Goater
On 3/7/23 15:00, Kevin Wolf wrote: Am 03.03.2023 um 23:51 hat Maciej S. Szmigiero geschrieben: On 8.02.2023 12:19, Cédric Le Goater wrote: On 2/7/23 13:48, Kevin Wolf wrote: Am 07.02.2023 um 10:19 hat Cédric Le Goater geschrieben: On 2/7/23 09:38, Kevin Wolf wrote: Am 06.02.2023 um 16:54

Re: [PATCH 7/8] aspeed: Introduce a spi_boot region under the SoC

2023-03-01 Thread Cédric Le Goater
On 2/15/23 12:02, Philippe Mathieu-Daudé wrote: On 14/2/23 18:18, Cédric Le Goater wrote: The default boot of the Aspeed SoCs is address 0x0. For this reason, the FMC flash device contents are remapped by HW on the first 256MB of the address space. In QEMU, this is currently done in the machine

Re: [PATCH 0/8] aspeed: I2C fixes, -drive removal (first step)

2023-02-17 Thread Cédric Le Goater
On 2/15/23 11:45, Philippe Mathieu-Daudé wrote: On 14/2/23 18:18, Cédric Le Goater wrote: Hello, This series starts with a first set of patches fixing I2C slave mode in the Aspeed I2C controller, a test device and its associated test in avocado. Follow some cleanups which allow the use

Re: [PATCH 3/8] hw/misc: add a toy i2c echo device

2023-02-17 Thread Cédric Le Goater
On 2/15/23 13:26, Philippe Mathieu-Daudé wrote: On 15/2/23 12:09, Cédric Le Goater wrote: On 2/15/23 11:55, Philippe Mathieu-Daudé wrote: On 14/2/23 18:18, Cédric Le Goater wrote: From: Klaus Jensen Add an example I2C device to demonstrate how a slave may master the bus and send data

Re: [PATCH 0/8] aspeed: I2C fixes, -drive removal (first step)

2023-02-17 Thread Cédric Le Goater
The next step would be to get rid of the drive_get(IF_MTD) internal API, which means finding a way to attach block backend devices from the command line to the default flash devices. This should be done at machine init time and the blockdev should have some 'bus@addr' identifier. I lack the

Re: [RFC PATCH 5/5] hw/ppc/pnv_bmc: Simplify pnv_bmc_find()

2023-02-17 Thread Cédric Le Goater
On 2/16/23 20:16, Philippe Mathieu-Daudé wrote: On 16/2/23 19:12, Cédric Le Goater wrote: On 2/16/23 13:25, Philippe Mathieu-Daudé wrote: ForeachArgs::name is only used once as TYPE_IPMI_BMC. Since the penultimate commit, object_child_foreach_recursive()'s handler takes an Error* argument

Re: [RFC PATCH 5/5] hw/ppc/pnv_bmc: Simplify pnv_bmc_find()

2023-02-16 Thread Cédric Le Goater
On 2/16/23 13:25, Philippe Mathieu-Daudé wrote: ForeachArgs::name is only used once as TYPE_IPMI_BMC. Since the penultimate commit, object_child_foreach_recursive()'s handler takes an Error* argument and return a boolean. We can directly pass ForeachArgs::obj as context, removing the ForeachArgs

Re: [PATCH 3/8] hw/misc: add a toy i2c echo device

2023-02-15 Thread Cédric Le Goater
On 2/15/23 11:55, Philippe Mathieu-Daudé wrote: On 14/2/23 18:18, Cédric Le Goater wrote: From: Klaus Jensen Add an example I2C device to demonstrate how a slave may master the bus and send data asynchronously to another slave. What a rebellion... The device will echo whatever it is sent

Re: [PATCH 0/8] aspeed: I2C fixes, -drive removal (first step)

2023-02-15 Thread Cédric Le Goater
On 2/15/23 07:38, Markus Armbruster wrote: Cédric Le Goater writes: Hello, This series starts with a first set of patches fixing I2C slave mode in the Aspeed I2C controller, a test device and its associated test in avocado. Follow some cleanups which allow the use of block devices instead

[PATCH 2/8] hw/i2c: only schedule pending master when bus is idle

2023-02-14 Thread Cédric Le Goater
Message-Id: <20221116084312.35808-2-...@irrelevant.dk> Signed-off-by: Cédric Le Goater --- include/hw/i2c/i2c.h | 2 ++ hw/i2c/aspeed_i2c.c | 2 ++ hw/i2c/core.c| 37 ++--- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/include/hw/i2c/i2c.h b/incl

[PATCH 7/8] aspeed: Introduce a spi_boot region under the SoC

2023-02-14 Thread Cédric Le Goater
container to prepare ground for the boot ROM region which will overlap the FMC flash remapping. Signed-off-by: Cédric Le Goater --- include/hw/arm/aspeed_soc.h | 3 +++ hw/arm/aspeed.c | 13 + hw/arm/aspeed_ast2600.c | 13 + hw/arm/aspeed_soc.c | 14

[PATCH 8/8] aspeed: Add a boot_rom overlap region in the SoC spi_boot container

2023-02-14 Thread Cédric Le Goater
=/path/to/flash.img \ -device mx66u51235f,bus=ssi.0,drive=fmc0 Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 45 +++-- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 998dc57969..13e719bae7

[PATCH 3/8] hw/misc: add a toy i2c echo device

2023-02-14 Thread Cédric Le Goater
CONFIG_ASPEED_SOC since only supported on such SoCs - folded in these fixes : https://lore.kernel.org/qemu-devel/Y3yMKAhOkYGtnkOp@cormorant.local/ ] Message-Id: <20220601210831.67259-7-...@irrelevant.dk> Signed-off-by: Cédric Le Goater --- hw/misc/i2c-echo.c

[PATCH 1/8] m25p80: Improve error when the backend file size does not match the device

2023-02-14 Thread Cédric Le Goater
blk_pread() to improve the reported error. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Delevoryas Reviewed-by: Alistair Francis Message-Id: <20221115151000.2080833-1-...@kaod.org> Signed-off-by: Cédric Le Goater --- breakage with commit a4b15a8b9e (&q

[PATCH 6/8] aspeed/smc: Wire CS lines at reset

2023-02-14 Thread Cédric Le Goater
definitions. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 4 hw/ssi/aspeed_smc.c | 24 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 7c28546d7f..21184f3ad4 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm

[PATCH 5/8] aspeed/smc: Replace SysBus IRQs with GPIO lines

2023-02-14 Thread Cédric Le Goater
It's cleaner and removes the curious '+ 1' required to skip the DMA IRQ line of the controller. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 2 +- hw/ssi/aspeed_smc.c | 5 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index

[PATCH 4/8] tests/avocado/machine_aspeed.py: Add I2C slave tests

2023-02-14 Thread Cédric Le Goater
Test extracted from : https://lists.nongnu.org/archive/html/qemu-devel/2022-06/msg00183.html Signed-off-by: Cédric Le Goater --- tests/avocado/machine_aspeed.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py

[PATCH 0/8] aspeed: I2C fixes, -drive removal (first step)

2023-02-14 Thread Cédric Le Goater
. This lacks the final patch enabling the '-nodefaults' option by not creating the default devices if specified on the command line. It needs some more evaluation of the possible undesired effects. Thanks, C. Cédric Le Goater (6): m25p80: Improve error when the backend file size does not match

Re: [PATCH v2 6/9] hw/ppc: Replace dev->parent_bus by qdev_get_parent_bus(dev)

2023-02-12 Thread Cédric Le Goater
On 2/13/23 08:04, Philippe Mathieu-Daudé wrote: DeviceState::parent_bus is an internal field and should be accessed by the qdev_get_parent_bus() helper. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Thanks, C. --- hw/ppc/spapr_vio.c | 4 ++-- 1 file changed, 2

Re: [PATCH v9 14/14] docs/devel: Align VFIO migration docs to v2 protocol

2023-02-08 Thread Cédric Le Goater
On 2/6/23 13:31, Avihai Horon wrote: Now that VFIO migration protocol v2 has been implemented and v1 protocol has been removed, update the documentation according to v2 protocol. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater You will need a rebase for next version. The migration

Re: [PATCH v9 07/14] vfio/migration: Block multiple devices migration

2023-02-08 Thread Cédric Le Goater
On 2/8/23 14:08, Avihai Horon wrote: On 08/02/2023 0:34, Alex Williamson wrote: External email: Use caution opening links or attachments On Mon, 6 Feb 2023 14:31:30 +0200 Avihai Horon wrote: Currently VFIO migration doesn't implement some kind of intermediate quiescent state in which P2P

Re: [PULL 03/38] pflash: Only read non-zero parts of backend image

2023-02-08 Thread Cédric Le Goater
On 2/7/23 13:48, Kevin Wolf wrote: Am 07.02.2023 um 10:19 hat Cédric Le Goater geschrieben: On 2/7/23 09:38, Kevin Wolf wrote: Am 06.02.2023 um 16:54 hat Cédric Le Goater geschrieben: On 1/20/23 13:25, Kevin Wolf wrote: From: Xiang Zheng Currently we fill the VIRT_FLASH memory space

Re: [PULL 03/38] pflash: Only read non-zero parts of backend image

2023-02-07 Thread Cédric Le Goater
On 2/7/23 09:38, Kevin Wolf wrote: Am 06.02.2023 um 16:54 hat Cédric Le Goater geschrieben: On 1/20/23 13:25, Kevin Wolf wrote: From: Xiang Zheng Currently we fill the VIRT_FLASH memory space with two 64MB NOR images when using persistent UEFI variables on virt board. Actually we only use

Re: [PULL 03/38] pflash: Only read non-zero parts of backend image

2023-02-06 Thread Cédric Le Goater
Hello, On 1/20/23 13:25, Kevin Wolf wrote: From: Xiang Zheng Currently we fill the VIRT_FLASH memory space with two 64MB NOR images when using persistent UEFI variables on virt board. Actually we only use a very small(non-zero) part of the memory while the rest significant large(zero) part of

Re: [PATCH v8 01/13] linux-headers: Update to v6.2-rc1

2023-01-16 Thread Cédric Le Goater
On 1/16/23 15:11, Avihai Horon wrote: Update to commit 1b929c02afd3 ("Linux 6.2-rc1"). Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- include/standard-headers/drm/drm_fourcc.h | 63 +++- include/standard-headers/linux/ethtool.h

Re: [PATCH v8 04/13] vfio/migration: Allow migration without VFIO IOMMU dirty tracking support

2023-01-16 Thread Cédric Le Goater
migration by hosts that use the VFIO compatibility API and prevent migration regressions caused by the lack of VFIO IOMMU dirty tracking support. [1] https://lore.kernel.org/kvm/0-v6-a196d26f289e+11787-iommufd_...@nvidia.com/ Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C

Re: [PATCH v7 09/13] vfio/migration: Implement VFIO migration protocol v2

2023-01-16 Thread Cédric Le Goater
/20220224142024.147653-10-yish...@nvidia.com/ Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater --- include/hw/vfio/vfio-common.h | 5 + hw/vfio/common.c | 19 +- hw/vfio/migration.c | 455 +++--- hw/vfio/trace-events | 7 + 4

Re: [PATCH v6 13/13] docs/devel: Align VFIO migration docs to v2 protocol

2023-01-13 Thread Cédric Le Goater
On 1/12/23 09:50, Avihai Horon wrote: Now that VFIO migration protocol v2 has been implemented and v1 protocol has been removed, update the documentation according to v2 protocol. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- docs/devel/vfio-migration.rst

Re: [PATCH v6 09/13] vfio/migration: Implement VFIO migration protocol v2

2023-01-13 Thread Cédric Le Goater
-yish...@nvidia.com/ Signed-off-by: Avihai Horon LGTM, Reviewed-by: Cédric Le Goater Still a small issue below, --- include/hw/vfio/vfio-common.h | 5 + hw/vfio/common.c | 19 +- hw/vfio/migration.c | 455 +++--- hw/vfio/trace-events

Re: [PATCH v6 10/13] vfio/migration: Optimize vfio_save_pending()

2023-01-13 Thread Cédric Le Goater
for migration to converge. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/vfio/vfio-common.h | 2 ++ hw/vfio/migration.c | 56 +++ hw/vfio/trace-events | 1 + 3 files changed, 46 insertions(+), 13

Re: [PATCH v6 12/13] vfio: Alphabetize migration section of VFIO trace-events file

2023-01-13 Thread Cédric Le Goater
On 1/12/23 09:50, Avihai Horon wrote: Sort the migration section of VFIO trace events file alphabetically and move two misplaced traces to common.c section. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/trace-events | 22 +++--- 1

Re: [PATCH v6 06/13] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one

2023-01-13 Thread Cédric Le Goater
. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/common.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index f6dd571549..3a35f4afad 100644 --- a/hw/vfio/common.c +++ b/hw

Re: [PATCH v6 11/13] vfio/migration: Remove VFIO migration protocol v1

2023-01-13 Thread Cédric Le Goater
On 1/12/23 09:50, Avihai Horon wrote: Now that v2 protocol implementation has been added, remove the deprecated v1 implementation. Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/vfio/vfio-common.h | 5 - hw/vfio/common.c | 19

Re: [PATCH v6 05/13] migration/qemu-file: Add qemu_file_get_to_fd()

2023-01-12 Thread Cédric Le Goater
-by: Cédric Le Goater Thanks, C. --- migration/qemu-file.h | 1 + migration/qemu-file.c | 34 ++ 2 files changed, 35 insertions(+) diff --git a/migration/qemu-file.h b/migration/qemu-file.h index fa13d04d78..9d0155a2a1 100644 --- a/migration/qemu-file.h +++ b

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-10 Thread Cédric Le Goater
Hello Avihai On 1/10/23 15:08, Avihai Horon wrote: On 09/01/2023 20:36, Jason Gunthorpe wrote: On Mon, Jan 09, 2023 at 06:27:21PM +0100, Cédric Le Goater wrote: also, in vfio_migration_query_flags() :    +static int vfio_migration_query_flags(VFIODevice *vbasedev, uint64_t *mig_flags

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-09 Thread Cédric Le Goater
On 1/9/23 16:12, Avihai Horon wrote: On 09/01/2023 12:20, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai, On 12/29/22 12:03, Avihai Horon wrote: +static int vfio_save_setup(QEMUFile *f, void *opaque) +{ +    VFIODevice *vbasedev = opaque

Re: [PATCH v5 09/14] vfio/migration: Rename functions/structs related to v1 protocol

2023-01-09 Thread Cédric Le Goater
Reviewed-by: Cédric Le Goater Thanks, C. --- include/hw/vfio/vfio-common.h | 2 +- hw/vfio/common.c | 6 +- hw/vfio/migration.c | 106 +- hw/vfio/trace-events | 12 ++-- 4 files changed, 63 insertions(+), 63 deletions

Re: [PATCH v5 08/14] vfio/migration: Move migration v1 logic to vfio_migration_init()

2023-01-09 Thread Cédric Le Goater
-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/migration.c | 30 +++--- hw/vfio/trace-events | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 552c2313b2..977da64411

Re: [PATCH v5 06/14] migration/qemu-file: Add qemu_file_get_to_fd()

2023-01-09 Thread Cédric Le Goater
On 12/29/22 12:03, Avihai Horon wrote: Add new function qemu_file_get_to_fd() that allows reading data from QEMUFile and writing it straight into a given fd. This will be used later in VFIO migration code. Signed-off-by: Avihai Horon Reviewed-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH v5 03/14] migration: Simplify migration_iteration_run()

2023-01-09 Thread Cédric Le Goater
On 12/29/22 12:03, Avihai Horon wrote: From: Juan Quintela Signed-off-by: Juan Quintela Signed-off-by: Avihai Horon Reviewed-by: Cédric Le Goater Thanks, C. --- migration/migration.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git

Re: [PATCH v5 10/14] vfio/migration: Implement VFIO migration protocol v2

2023-01-09 Thread Cédric Le Goater
Hello Avihai, On 12/29/22 12:03, Avihai Horon wrote: +static int vfio_save_setup(QEMUFile *f, void *opaque) +{ +VFIODevice *vbasedev = opaque; +VFIOMigration *migration = vbasedev->migration; +uint64_t stop_copy_size; + +qemu_put_be64(f, VFIO_MIG_FLAG_DEV_SETUP_STATE); + +

Re: [PATCH] m25p80: Add the is25wp256 SFPD table

2023-01-02 Thread Cédric Le Goater
On 12/27/22 07:31, Tudor Ambarus wrote: On 25.12.2022 14:18, Ben Dooks wrote: On Wed, Dec 21, 2022 at 06:36:02PM +0100, Cédric Le Goater wrote: On 12/21/22 13:22, Guenter Roeck wrote: Generated from hardware using the following command and then padding with 0xff to fill out a power-of-2

Re: [PATCH] m25p80: Add the is25wp256 SFPD table

2022-12-21 Thread Cédric Le Goater
On 12/21/22 13:22, Guenter Roeck wrote: Generated from hardware using the following command and then padding with 0xff to fill out a power-of-2: xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp Cc: Michael Walle Cc: Tudor Ambarus Signed-off-by: Guenter Roeck Reviewed-by: Cédric Le

Re: [PATCH maybe-7.2 1/3] hw/i2c: only schedule pending master when bus is idle

2022-11-17 Thread Cédric Le Goater
On 11/17/22 12:58, Klaus Jensen wrote: On Nov 17 09:01, Cédric Le Goater wrote: On 11/17/22 08:37, Klaus Jensen wrote: On Nov 17 07:56, Cédric Le Goater wrote: On 11/17/22 07:40, Klaus Jensen wrote: On Nov 16 16:58, Cédric Le Goater wrote: On 11/16/22 09:43, Klaus Jensen wrote: From: Klaus

Re: [PATCH maybe-7.2 1/3] hw/i2c: only schedule pending master when bus is idle

2022-11-17 Thread Cédric Le Goater
On 11/17/22 08:37, Klaus Jensen wrote: On Nov 17 07:56, Cédric Le Goater wrote: On 11/17/22 07:40, Klaus Jensen wrote: On Nov 16 16:58, Cédric Le Goater wrote: On 11/16/22 09:43, Klaus Jensen wrote: From: Klaus Jensen It is not given that the current master will release the bus after

Re: [PATCH maybe-7.2 1/3] hw/i2c: only schedule pending master when bus is idle

2022-11-16 Thread Cédric Le Goater
On 11/17/22 07:40, Klaus Jensen wrote: On Nov 16 16:58, Cédric Le Goater wrote: On 11/16/22 09:43, Klaus Jensen wrote: From: Klaus Jensen It is not given that the current master will release the bus after a transfer ends. Only schedule a pending master if the bus is idle. Fixes

Re: [PATCH maybe-7.2 1/3] hw/i2c: only schedule pending master when bus is idle

2022-11-16 Thread Cédric Le Goater
On 11/16/22 09:43, Klaus Jensen wrote: From: Klaus Jensen It is not given that the current master will release the bus after a transfer ends. Only schedule a pending master if the bus is idle. Fixes: 37fa5ca42623 ("hw/i2c: support multiple masters") Signed-off-by: Klaus Jensen ---

Re: [PATCH v2] m25p80: Improve error when the backend file size does not match the device

2022-11-16 Thread Cédric Le Goater
On 11/16/22 09:28, Markus Armbruster wrote: Cédric Le Goater writes: On 11/16/22 07:56, Markus Armbruster wrote: Cédric Le Goater writes: Currently, when a block backend is attached to a m25p80 device and the associated file size does not match the flash model, QEMU complains

  1   2   3   >