Re: [PATCH 1/2] ppc/pnv: Begin a more complete ADU LPC model for POWER9/10

2024-05-02 Thread Cédric Le Goater
On 5/3/24 06:51, Nicholas Piggin wrote: On Thu May 2, 2024 at 6:47 PM AEST, Cédric Le Goater wrote: On 5/1/24 14:39, Nicholas Piggin wrote: On Wed Apr 17, 2024 at 9:25 PM AEST, Cédric Le Goater wrote: Hello Nick, On 4/17/24 13:02, Nicholas Piggin wrote: This implements a framework for an

Re: [PATCH 02/14] target/s390x: Move cpu_get_tb_cpu_state out of line

2024-05-02 Thread Thomas Huth
On 02/05/2024 07.44, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/s390x/cpu.h | 23 ++- target/s390x/cpu.c | 22 ++ 2 files changed, 24 insertions(+), 21 deletions(-) Reviewed-by: Thomas Huth

Re: [PATCH] Re-enable riscv64-debian-cross-container (debian riscv64 is finally usable again!)

2024-05-02 Thread Thomas Huth
On 02/05/2024 22.08, Michael Tokarev wrote: 02.05.2024 23:05, Richard Henderson wrote: On 5/2/24 12:40, Michael Tokarev wrote: Revert "gitlab-ci: Disable the riscv64-debian-cross-container by default" This reverts commit f51f90c65ed7706c3c4f7a889ce3d6b7ab75ef6a. Hopefully it wont be very

Re: [PATCH v2 09/10] ppc: Make Power11 as default cpu type for 'pseries' and 'powernv'

2024-05-02 Thread Nicholas Piggin
On Sat Apr 27, 2024 at 12:32 AM AEST, Cédric Le Goater wrote: > On 4/26/24 13:00, Aditya Gupta wrote: > > Make Power11 as default cpu type for 'pseries' and 'powernv' machine type, > > with Power11 being the newest supported Power processor in QEMU. > > This is too early. We should merge Power11

Re: [PATCH 1/2] ppc/pnv: Begin a more complete ADU LPC model for POWER9/10

2024-05-02 Thread Nicholas Piggin
On Thu May 2, 2024 at 6:47 PM AEST, Cédric Le Goater wrote: > On 5/1/24 14:39, Nicholas Piggin wrote: > > On Wed Apr 17, 2024 at 9:25 PM AEST, Cédric Le Goater wrote: > >> Hello Nick, > >> > >> On 4/17/24 13:02, Nicholas Piggin wrote: > >>> This implements a framework for an ADU unit model. > >>>

Re: [PATCH] ppc/pnv: Introduce pnv_chip_foreach_cpu()

2024-05-02 Thread Nicholas Piggin
On Wed Apr 24, 2024 at 7:30 PM AEST, Cédric Le Goater wrote: > This helper routine uses the machine definition, sockets, cores and > threads, to loop on all CPUs of the machine. Replace CPU_FOREACH() > with it. > > Signed-off-by: Cédric Le Goater Reviewed-by: Nicholas Piggin > --- >

Re: [PATCH 2/2] ppc/pnv: Implement ADU access to LPC space

2024-05-02 Thread Nicholas Piggin
On Thu May 2, 2024 at 6:32 PM AEST, Cédric Le Goater wrote: > Hello Nick, > > > >>> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c > >>> index 5869aac89a..eb9dbc62dd 100644 > >>> --- a/hw/ppc/pnv.c > >>> +++ b/hw/ppc/pnv.c > >>> @@ -1642,6 +1642,8 @@ static void pnv_chip_power9_realize(DeviceState >

[PATCH v6 3/9] plugins: add new inline op STORE_U64

2024-05-02 Thread Pierrick Bouvier
This new operation can store an immediate u64 value to a given scoreboard. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 1 + include/qemu/qemu-plugin.h | 4 ++-- accel/tcg/plugin-gen.c | 13 + plugins/core.c | 6

[PATCH v6 6/9] tests/plugin/inline: add test for conditional callback

2024-05-02 Thread Pierrick Bouvier
Count number of tb and insn executed using a conditional callback. We ensure the callback has been called expected number of time (per vcpu). Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/plugin/inline.c | 89 +-- 1 file

[PATCH v6 2/9] plugins: extract generate ptr for qemu_plugin_u64

2024-05-02 Thread Pierrick Bouvier
Plugin operations can access a scoreboard. This function factorizes code generation for accessing entry associated to a given vcpu. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- accel/tcg/plugin-gen.c | 27 ++- 1 file changed, 18 insertions(+), 9

[PATCH v6 4/9] tests/plugin/inline: add test for STORE_U64 inline op

2024-05-02 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/plugin/inline.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/tests/plugin/inline.c b/tests/plugin/inline.c index 0163e9b51c5..103c3a22f6e 100644 ---

[PATCH v6 5/9] plugins: conditional callbacks

2024-05-02 Thread Pierrick Bouvier
Extend plugins API to support callback called with a given criteria (evaluated inline). Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_register_vcpu_insn_exec_cond_cb They expect as parameter a condition, a qemu_plugin_u64_t (op1) and an immediate (op2). Callback is

[PATCH v6 8/9] plugins: extract cpu_index generate

2024-05-02 Thread Pierrick Bouvier
Factorizes function to access current cpu index for a given vcpu. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- accel/tcg/plugin-gen.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/accel/tcg/plugin-gen.c

Re: [PATCH v5 0/9] TCG plugins new inline operations

2024-05-02 Thread Pierrick Bouvier
On 5/2/24 13:48, Gustavo Romero wrote: Hi Pierrick, On 5/2/24 5:09 PM, Gustavo Romero wrote: On 5/2/24 4:45 PM, Pierrick Bouvier wrote: Hi Gustavo, On 5/2/24 12:16, Gustavo Romero wrote: Hi Pierrick, On 5/2/24 3:08 PM, Pierrick Bouvier wrote: This series implement two new operations for

[PATCH v6 0/9] TCG plugins new inline operations

2024-05-02 Thread Pierrick Bouvier
This series implement two new operations for plugins: - Store inline allows to write a specific value to a scoreboard. - Conditional callback executes a callback only when a given condition is true. The condition is evaluated inline. It's possible to mix various inline operations (add, store)

[PATCH v6 1/9] plugins: prepare introduction of new inline ops

2024-05-02 Thread Pierrick Bouvier
Until now, only add_u64 was available, and all functions assumed this or were named uniquely. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 2 +- accel/tcg/plugin-gen.c | 6 +++--- plugins/core.c | 14 -- 3 files changed, 16

[PATCH v6 7/9] plugins: distinct types for callbacks

2024-05-02 Thread Pierrick Bouvier
To prevent errors when writing new types of callbacks or inline operations, we split callbacks data to distinct types. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 46 ++--- plugins/plugin.h | 2 +-

[PATCH v6 9/9] plugins: remove op from qemu_plugin_inline_cb

2024-05-02 Thread Pierrick Bouvier
This field is not needed as the callback type already holds this information. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 1 - plugins/plugin.h | 4 +++- plugins/core.c| 13 +++-- 3 files changed, 10 insertions(+), 8

Re: [PATCH] Re-enable riscv64-debian-cross-container (debian riscv64 is finally usable again!)

2024-05-02 Thread Michael Tokarev
02.05.2024 23:41, Richard Henderson wrote: On 5/2/24 13:08, Michael Tokarev wrote: This thing works now with sid/unstable, this is what this patch is about. It worked when first introduced, then failed, then worked... Sid is too unstable for our usage as a gating test. unstable can be

Re: [PATCH v5 0/9] TCG plugins new inline operations

2024-05-02 Thread Gustavo Romero
Hi Pierrick, On 5/2/24 5:09 PM, Gustavo Romero wrote: On 5/2/24 4:45 PM, Pierrick Bouvier wrote: Hi Gustavo, On 5/2/24 12:16, Gustavo Romero wrote: Hi Pierrick, On 5/2/24 3:08 PM, Pierrick Bouvier wrote: This series implement two new operations for plugins: - Store inline allows to write a

Re: [PATCH] Re-enable riscv64-debian-cross-container (debian riscv64 is finally usable again!)

2024-05-02 Thread Richard Henderson
On 5/2/24 13:08, Michael Tokarev wrote: This thing works now with sid/unstable, this is what this patch is about. It worked when first introduced, then failed, then worked... Sid is too unstable for our usage as a gating test. r~

Re: [PATCH 0/9] migration/mapped-ram: Add direct-io support

2024-05-02 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 11:20:33AM -0300, Fabiano Rosas wrote: >> If the user is not passing in a file name which QEMU can open at will, >> we must then require that the user pass the two file descriptors with >> the flags already properly set. We'll use the already existing

[PULL 02/13] migration: move trace-point from migrate_fd_error to migrate_set_error

2024-05-02 Thread Fabiano Rosas
From: Vladimir Sementsov-Ogievskiy Cover more cases by trace-point. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 4 +++- migration/trace-events | 2 +- 2 files changed, 4

[PULL 00/13] Migration patches for 2024-05-02

2024-05-02 Thread Fabiano Rosas
The following changes since commit 4977ce198d2390bff8c71ad5cb1a5f6aa24b56fb: Merge tag 'pull-tcg-20240501' of https://gitlab.com/rth7680/qemu into staging (2024-05-01 15:15:33 -0700) are available in the Git repository at: https://gitlab.com/farosas/qemu.git tags/migration-20240502-pull

[PULL 08/13] migration: Remove 'inc' option from migrate command

2024-05-02 Thread Fabiano Rosas
The block incremental option for block migration has been deprecated in 8.2 in favor of using the block-mirror feature. Remove it now. Deprecation commit 40101f320d ("migration: migrate 'inc' command option is deprecated."). Reviewed-by: Markus Armbruster Reviewed-by: Peter Xu Signed-off-by:

[PULL 12/13] migration: Deprecate fd: for file migration

2024-05-02 Thread Fabiano Rosas
The fd: URI can currently trigger two different types of migration, a TCP migration using sockets and a file migration using a plain file. This is in conflict with the recently introduced (8.2) QMP migrate API that takes structured data as JSON-like format. We cannot keep the same backend for both

[PULL 09/13] migration: Remove 'blk/-b' option from migrate commands

2024-05-02 Thread Fabiano Rosas
The block migration is considered obsolete and has been deprecated in 8.2. Remove the migrate command option that enables it. This only affects the QMP and HMP commands, the feature can still be accessed by setting the migration 'block' capability. The whole feature will be removed in a future

[PULL 04/13] migration: process_incoming_migration_co(): fix reporting s->error

2024-05-02 Thread Fabiano Rosas
From: Vladimir Sementsov-Ogievskiy It's bad idea to leave critical section with error object freed, but s->error still set, this theoretically may lead to use-after-free crash. Let's avoid it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu

[PULL 05/13] migration: process_incoming_migration_co(): rework error reporting

2024-05-02 Thread Fabiano Rosas
From: Vladimir Sementsov-Ogievskiy Unify error reporting in the function. This simplifies the following commit, which will not-exit-on-error behavior variant to the function. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Signed-off-by:

[PULL 11/13] migration: Remove non-multifd compression

2024-05-02 Thread Fabiano Rosas
The 'compress' migration capability enables the old compression code which has shown issues over the years and is thought to be less stable and tested than the more recent multifd-based compression. The old compression code has been deprecated in 8.2 and now is time to remove it. Deprecation

[PULL 01/13] migration/ram.c: API Conversion qemu_mutex_lock(), and qemu_mutex_unlock() to WITH_QEMU_LOCK_GUARD macro

2024-05-02 Thread Fabiano Rosas
From: Will Gyda migration/ram.c: API Conversion qemu_mutex_lock(), and qemu_mutex_unlock() to WITH_QEMU_LOCK_GUARD macro Signed-off-by: Will Gyda Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/ram.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PULL 13/13] hmp/migration: Fix documents for "migrate" command

2024-05-02 Thread Fabiano Rosas
From: Peter Xu Peter missed the Sphinx HMP document for the "resume/-r" flag in commit 7a4da28b26 ("qmp: hmp: add migrate "resume" option"). Add it. Avoid adding a Fixes to make life easier for the stable maintainer. When at it, slightly cleanup the lines, move "detach/-d" to a separate

[PULL 03/13] migration: process_incoming_migration_co(): complete cleanup on failure

2024-05-02 Thread Fabiano Rosas
From: Vladimir Sementsov-Ogievskiy Make call to migration_incoming_state_destroy(), instead of doing only partial of it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 5 + 1 file

[PULL 06/13] qapi: introduce exit-on-error parameter for migrate-incoming

2024-05-02 Thread Fabiano Rosas
From: Vladimir Sementsov-Ogievskiy Now we do set MIGRATION_FAILED state, but don't give a chance to orchestrator to query migration state and get the error. Let's provide a possibility for QMP-based orchestrators to get an error like with outgoing migration. For hmp_migrate_incoming(), let's

[PULL 10/13] migration: Remove block migration

2024-05-02 Thread Fabiano Rosas
The block migration has been considered obsolete since QEMU 8.2 in favor of the more flexible storage migration provided by the blockdev-mirror driver. Two releases have passed so now it's time to remove it. Deprecation commit 66db46ca83 ("migration: Deprecate block migration"). Reviewed-by:

[PULL 07/13] migration: Remove 'skipped' field from MigrationStats

2024-05-02 Thread Fabiano Rosas
The 'skipped' field of the MigrationStats struct has been deprecated in 8.1. Time to remove it. Deprecation commit 7b24d32634 ("migration: skipped field is really obsolete."). Reviewed-by: Markus Armbruster Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- docs/about/deprecated.rst

Re: [PATCH v5 0/9] TCG plugins new inline operations

2024-05-02 Thread Gustavo Romero
On 5/2/24 4:45 PM, Pierrick Bouvier wrote: Hi Gustavo, On 5/2/24 12:16, Gustavo Romero wrote: Hi Pierrick, On 5/2/24 3:08 PM, Pierrick Bouvier wrote: This series implement two new operations for plugins: - Store inline allows to write a specific value to a scoreboard. - Conditional callback

Re: [PATCH] Re-enable riscv64-debian-cross-container (debian riscv64 is finally usable again!)

2024-05-02 Thread Michael Tokarev
02.05.2024 23:05, Richard Henderson wrote: On 5/2/24 12:40, Michael Tokarev wrote: Revert "gitlab-ci: Disable the riscv64-debian-cross-container by default" This reverts commit f51f90c65ed7706c3c4f7a889ce3d6b7ab75ef6a. Hopefully it wont be very unstable. Since riscv64 is now a release

Re: [PATCH] Re-enable riscv64-debian-cross-container (debian riscv64 is finally usable again!)

2024-05-02 Thread Richard Henderson
On 5/2/24 12:40, Michael Tokarev wrote: Revert "gitlab-ci: Disable the riscv64-debian-cross-container by default" This reverts commit f51f90c65ed7706c3c4f7a889ce3d6b7ab75ef6a. Hopefully it wont be very unstable. Since riscv64 is now a release architecture in debian, we can try switching to

Re: [PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-05-02 Thread Stefano Stabellini
On Thu, 2 May 2024, Edgar E. Iglesias wrote: > On Thu, May 2, 2024 at 8:53 PM Stefano Stabellini > wrote: > > > > +Xenia > > > > On Thu, 2 May 2024, Edgar E. Iglesias wrote: > > > On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini > > > wrote: > > > > > > > > On Tue, 30 Apr 2024, Edgar E.

Re: [PATCH 0/9] migration/mapped-ram: Add direct-io support

2024-05-02 Thread Peter Xu
On Fri, Apr 26, 2024 at 11:20:33AM -0300, Fabiano Rosas wrote: > If the user is not passing in a file name which QEMU can open at will, > we must then require that the user pass the two file descriptors with > the flags already properly set. We'll use the already existing fdset + > QMP add-fd

Re: [PATCH v5] Hexagon: add PC alignment check and exception

2024-05-02 Thread Richard Henderson
On 5/2/24 12:20, Matheus Tavares Bernardino wrote: The Hexagon Programmer's Reference Manual says that the exception 0x1e should be raised upon an unaligned program counter. Let's implement that and also add some tests. Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Richard Henderson

Re: [PATCH] Re-enable riscv64-debian-cross-container (debian riscv64 is finally usable again!)

2024-05-02 Thread Michael Tokarev
https://gitlab.com/mjt0k/qemu/-/jobs/6768635797 fwiw. /mjt -- GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24. New key: rsa4096/61AD3D98ECDF2C8E 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF 2C8E Old key: rsa2048/457CE0A0804465C5 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044

[PATCH] Re-enable riscv64-debian-cross-container (debian riscv64 is finally usable again!)

2024-05-02 Thread Michael Tokarev
Revert "gitlab-ci: Disable the riscv64-debian-cross-container by default" This reverts commit f51f90c65ed7706c3c4f7a889ce3d6b7ab75ef6a. Hopefully it wont be very unstable. Since riscv64 is now a release architecture in debian, we can try switching to debian testing instead of debian sid. Also,

Re: [PATCH v4 16/17] xen: mapcache: Add support for grant mappings

2024-05-02 Thread Edgar E. Iglesias
On Thu, May 2, 2024 at 9:18 PM Stefano Stabellini wrote: > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Add a second mapcache for grant mappings. The mapcache for > > grants needs to work with XC_PAGE_SIZE granularity since > > we can't map larger ranges

Re: [PATCH v5 0/9] TCG plugins new inline operations

2024-05-02 Thread Pierrick Bouvier
Hi Gustavo, On 5/2/24 12:16, Gustavo Romero wrote: Hi Pierrick, On 5/2/24 3:08 PM, Pierrick Bouvier wrote: This series implement two new operations for plugins: - Store inline allows to write a specific value to a scoreboard. - Conditional callback executes a callback only when a given

Re: [PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-05-02 Thread Edgar E. Iglesias
On Thu, May 2, 2024 at 8:53 PM Stefano Stabellini wrote: > > +Xenia > > On Thu, 2 May 2024, Edgar E. Iglesias wrote: > > On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini > > wrote: > > > > > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > > > From: "Edgar E. Iglesias" > > > > > > > > The

Re: [PATCH 0/5] tcg: Misc improvements

2024-05-02 Thread Richard Henderson
Ping. On 4/24/24 10:09, Richard Henderson wrote: One patch to allow two output operands from gvec expansion, to be used by target/arm for updating QC. One patch to record the result of the generic breakpoint search so target translators do not need to repeat it. Three small optimization

[PATCH v5] Hexagon: add PC alignment check and exception

2024-05-02 Thread Matheus Tavares Bernardino
The Hexagon Programmer's Reference Manual says that the exception 0x1e should be raised upon an unaligned program counter. Let's implement that and also add some tests. Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- Changes in v5: -

Re: [PATCH v4 16/17] xen: mapcache: Add support for grant mappings

2024-05-02 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a second mapcache for grant mappings. The mapcache for > grants needs to work with XC_PAGE_SIZE granularity since > we can't map larger ranges than what has been granted to us. > > Like with foreign mappings

Re: [PATCH v5 0/9] TCG plugins new inline operations

2024-05-02 Thread Gustavo Romero
Hi Pierrick, On 5/2/24 3:08 PM, Pierrick Bouvier wrote: This series implement two new operations for plugins: - Store inline allows to write a specific value to a scoreboard. - Conditional callback executes a callback only when a given condition is true. The condition is evaluated inline.

Re: [PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-05-02 Thread Stefano Stabellini
+Xenia On Thu, 2 May 2024, Edgar E. Iglesias wrote: > On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini > wrote: > > > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > > From: "Edgar E. Iglesias" > > > > > > The current mapcache assumes that all memory is mapped > > > in a single RAM MR

Re: [PATCH v5 0/9] TCG plugins new inline operations

2024-05-02 Thread Pierrick Bouvier
Contrary to what the cover letter says, all patches have been reviewed in the series since v4. On 5/2/24 11:08, Pierrick Bouvier wrote: This series implement two new operations for plugins: - Store inline allows to write a specific value to a scoreboard. - Conditional callback executes a

Re: cpr-exec doc (was Re: [PATCH V1 00/26] Live update: cpr-exec)

2024-05-02 Thread Peter Xu
On Thu, May 02, 2024 at 12:13:17PM -0400, Steven Sistare wrote: > On 4/29/2024 11:55 AM, Steve Sistare wrote: > > This patch series adds the live migration cpr-exec mode. > > Here is the text I plan to add to docs/devel/migration/CPR.rst. It is > premature for me to submit this as a patch,

[PATCH v5 2/9] plugins: extract generate ptr for qemu_plugin_u64

2024-05-02 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- accel/tcg/plugin-gen.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 8028ae76c3a..8e2c3ef94f6 100644 ---

[PATCH v5 4/9] tests/plugin/inline: add test for STORE_U64 inline op

2024-05-02 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/plugin/inline.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/tests/plugin/inline.c b/tests/plugin/inline.c index 0163e9b51c5..103c3a22f6e 100644 ---

[PATCH v5 6/9] tests/plugin/inline: add test for conditional callback

2024-05-02 Thread Pierrick Bouvier
Count number of tb and insn executed using a conditional callback. We ensure the callback has been called expected number of time (per vcpu). Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/plugin/inline.c | 89 +-- 1 file

[PATCH v5 7/9] plugins: distinct types for callbacks

2024-05-02 Thread Pierrick Bouvier
To prevent errors when writing new types of callbacks or inline operations, we split callbacks data to distinct types. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 46 ++--- plugins/plugin.h | 2 +-

[PATCH v5 5/9] plugins: conditional callbacks

2024-05-02 Thread Pierrick Bouvier
Extend plugins API to support callback called with a given criteria (evaluated inline). Added functions: - qemu_plugin_register_vcpu_tb_exec_cond_cb - qemu_plugin_register_vcpu_insn_exec_cond_cb They expect as parameter a condition, a qemu_plugin_u64_t (op1) and an immediate (op2). Callback is

[PATCH v5 8/9] plugins: extract cpu_index generate

2024-05-02 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- accel/tcg/plugin-gen.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index b829a959398..7b73520e788 100644 ---

[PATCH v5 3/9] plugins: add new inline op STORE_U64

2024-05-02 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 1 + include/qemu/qemu-plugin.h | 4 ++-- accel/tcg/plugin-gen.c | 13 + plugins/core.c | 6 ++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git

[PATCH v5 1/9] plugins: prepare introduction of new inline ops

2024-05-02 Thread Pierrick Bouvier
Until now, only add_u64 was available, and all functions assumed this or were named uniquely. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 2 +- accel/tcg/plugin-gen.c | 6 +++--- plugins/core.c | 14 -- 3 files changed, 16

[PATCH v5 9/9] plugins: remove op from qemu_plugin_inline_cb

2024-05-02 Thread Pierrick Bouvier
Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/qemu/plugin.h | 1 - plugins/plugin.h | 4 +++- plugins/core.c| 13 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index

[PATCH v5 0/9] TCG plugins new inline operations

2024-05-02 Thread Pierrick Bouvier
This series implement two new operations for plugins: - Store inline allows to write a specific value to a scoreboard. - Conditional callback executes a callback only when a given condition is true. The condition is evaluated inline. It's possible to mix various inline operations (add, store)

Re: [PATCH] hmp/migration: Fix documents for "migrate" command

2024-05-02 Thread Fabiano Rosas
Peter Xu writes: > Peter missed the Sphinx HMP document for the "resume/-r" flag in commit > 7a4da28b26 ("qmp: hmp: add migrate "resume" option"). Add it. Avoid > adding a Fixes to make life easier for the stable maintainer. > > When at it, slightly cleanup the lines, move "detach/-d" to a

Re: [PATCH 3/3] s390x/sclp: Simplify get_sclp_device()

2024-05-02 Thread Thomas Huth
On 02/05/2024 15.15, Cédric Le Goater wrote: get_sclp_device() scans the whole machine to find a TYPE_SCLP object. Now that the SCLPDevice instance is available under the machine state, use it to simplify the lookup. While at it, remove the inline to let the compiler decide on how to optimize.

Re: [PATCH 2/3] s390x/event-facility: Simplify sclp_get_event_facility_bus()

2024-05-02 Thread Thomas Huth
On 02/05/2024 15.15, Cédric Le Goater wrote: sclp_get_event_facility_bus() scans the whole machine to find a TYPE_SCLP_EVENTS_BUS object. The SCLPDevice instance is now available under the machine state, use it to simplify the lookup and adjust the creation of the consoles. Signed-off-by:

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-02 Thread Jinpu Wang
Hi Peter On Thu, May 2, 2024 at 6:20 PM Peter Xu wrote: > > On Thu, May 02, 2024 at 03:30:58PM +0200, Jinpu Wang wrote: > > Hi Michael, Hi Peter, > > > > > > On Thu, May 2, 2024 at 3:23 PM Michael Galaxy wrote: > > > > > > Yu Zhang / Jinpu, > > > > > > Any possibility (at your lesiure, and

Re: [PATCH 1/3] s390x: Introduce a SCLPDevice pointer under the machine

2024-05-02 Thread Thomas Huth
On 02/05/2024 15.15, Cédric Le Goater wrote: Initialize directly SCLPDevice from the machine init handler and remove s390_sclp_init(). We will use the SCLPDevice pointer later to create the consoles. Signed-off-by: Cédric Le Goater --- Reviewed-by: Thomas Huth

[PATCH v2 4/7] target/sparc: Fix FMUL8x16A{U,L}

2024-05-02 Thread Richard Henderson
These instructions have f32 inputs, which changes the decode of the register numbers. While we're fixing things, use a common helper for both insns, extracting the 16-bit scalar in tcg beforehand. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 3 +-- target/sparc/translate.c

[PATCH v2 3/7] target/sparc: Fix FMUL8x16

2024-05-02 Thread Richard Henderson
This instruction has f32 as source1, which alters the decoding of the register number, which means we've been passing the wrong data for odd register numbers. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 2 +- target/sparc/translate.c | 21 -

[PATCH v2 1/7] linux-user/sparc: Add more hwcap bits for sparc64

2024-05-02 Thread Richard Henderson
Supply HWCAP_SPARC_V8PLUS, HWCAP_SPARC_MUL32, HWCAP_SPARC_DIV32, HWCAP_SPARC_POPC, HWCAP_SPARC_FSMULD, HWCAP_SPARC_VIS, HWCAP_SPARC_VIS2. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 48 +++- 1 file changed, 34 insertions(+), 14

[PATCH v2 0/7] target/sparc: vis fixes

2024-05-02 Thread Richard Henderson
Split out from my vis4 patch set, with just the bug fixes. I've fixed the issue in patch 6, as noticed by Mark, but include the follow-up that cleans up all of the macros by removing them. r~ Richard Henderson (7): linux-user/sparc: Add more hwcap bits for sparc64 target/sparc: Fix FEXPAND

[PATCH v2 2/7] target/sparc: Fix FEXPAND

2024-05-02 Thread Richard Henderson
This is a 2-operand instruction, not 3-operand. Worse, we took the source from the wrong operand. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 2 +- target/sparc/insns.decode | 2 +- target/sparc/translate.c | 20 +++- target/sparc/vis_helper.c | 6 +++---

[PATCH v2 6/7] target/sparc: Fix FPMERGE

2024-05-02 Thread Richard Henderson
This instruction has f32 inputs, which changes the decode of the register numbers. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 2 +- target/sparc/translate.c | 2 +- target/sparc/vis_helper.c | 27 ++- 3 files changed, 16 insertions(+), 15

[PATCH v2 7/7] target/sparc: Split out do_ms16b

2024-05-02 Thread Richard Henderson
The unit operation for fmul8x16 and friends is described in the manual as "MS16b". Split that out for clarity. Improve rounding with an unconditional addition of 0.5 as a fixed-point integer. Signed-off-by: Richard Henderson --- target/sparc/vis_helper.c | 78

[PATCH v2 5/7] target/sparc: Fix FMULD8*X16

2024-05-02 Thread Richard Henderson
Not only do these instructions have f32 inputs, they also do not perform rounding. Since these are relatively simple, implement them properly inline. Signed-off-by: Richard Henderson --- target/sparc/helper.h | 2 -- target/sparc/translate.c | 48 +++

Re: [PATCH 01/14] include/hw: add helpers for defining versioned machine types

2024-05-02 Thread Thomas Huth
On 02/05/2024 16.57, Eric Blake wrote: On Wed, May 01, 2024 at 07:27:46PM +0100, Daniel P. Berrangé wrote: The various targets which define versioned machine types have a bunch of obfuscated macro code for defining unique function and variable names using string concatenation. This addes a

RE: [PATCH v4] Hexagon: add PC alignment check and exception

2024-05-02 Thread ltaylorsimpson
> -Original Message- > From: Matheus Tavares Bernardino > Sent: Thursday, May 2, 2024 9:55 AM > To: qemu-devel@nongnu.org > Cc: bc...@quicinc.com; sidn...@quicinc.com; a...@rev.ng; a...@rev.ng; > ltaylorsimp...@gmail.com; richard.hender...@linaro.org; Laurent Vivier > > Subject:

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-02 Thread Peter Xu
On Thu, May 02, 2024 at 03:30:58PM +0200, Jinpu Wang wrote: > Hi Michael, Hi Peter, > > > On Thu, May 2, 2024 at 3:23 PM Michael Galaxy wrote: > > > > Yu Zhang / Jinpu, > > > > Any possibility (at your lesiure, and within the disclosure rules of > > your company, IONOS) if you could share any

cpr-exec doc (was Re: [PATCH V1 00/26] Live update: cpr-exec)

2024-05-02 Thread Steven Sistare
On 4/29/2024 11:55 AM, Steve Sistare wrote: This patch series adds the live migration cpr-exec mode. Here is the text I plan to add to docs/devel/migration/CPR.rst. It is premature for me to submit this as a patch, because it includes all the functionality I plan to add in this and future

Re: [PATCH v2] MAINTAINERS: Update the reviewers for RDMA migration

2024-05-02 Thread Peter Xu
On Thu, May 02, 2024 at 12:35:38PM +0200, Yu Zhang wrote: > As the links [1][2] below stated, QEMU development community is currently > having some difficulties in maintaining the RDMA migration subsystem due > to the lack of resources (maintainers, test cases, test environment etc.) > and

Re: QEMU headers in C++

2024-05-02 Thread Roman Kiryanov
Hi Paolo, thank you for looking. On Thu, May 2, 2024 at 8:19 AM Paolo Bonzini wrote: > > Anyway, just out of curiosity I tried to see what it would take to > compile edu.c as C++ code, which I think lets us give a more informed > answer. > > There were a bunch of conflicts with C++ keyword,

Re: [PATCH V1 20/26] migration: cpr-exec mode

2024-05-02 Thread Steven Sistare
On 5/2/2024 8:23 AM, Markus Armbruster wrote: Steve Sistare writes: Add the cpr-exec migration mode. Usage: qemu-system-$arch -machine memfd-alloc=on ... migrate_set_parameter mode cpr-exec migrate_set_parameter cpr-exec-args \ ... -incoming migrate -d The migrate

Re: [PATCH V1 18/26] migration: cpr-exec-args parameter

2024-05-02 Thread Steven Sistare
On 5/2/2024 8:23 AM, Markus Armbruster wrote: Steve Sistare writes: Create the cpr-exec-args migration parameter, defined as a list of strings. It will be used for cpr-exec migration mode in a subsequent patch. No functional change, except that cpr-exec-args is shown by the 'info migrate'

[PATCH 12/13] tcg: remove CPU* types from typedefs.h

2024-05-02 Thread Paolo Bonzini
hw/core/cpu.h is already using struct forward declarations in some cases to avoid inclusions, and otherwise CPUAddressSpace and CPUJumpCache are only used together with their definition. CPUTLBEntryFull is always used when their definition is available. Remove all three from typedefs.h.

[PATCH 10/13] qapi/machine: remove types from typedefs.h

2024-05-02 Thread Paolo Bonzini
They are needed in very few places, which already depends on other generated QAPI files. The benefit of having these types in typedefs.h is small. Signed-off-by: Paolo Bonzini --- include/hw/core/cpu.h | 1 + include/qemu/typedefs.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)

[PATCH 02/13] qdev-core: remove DeviceListener from typedefs.h

2024-05-02 Thread Paolo Bonzini
It is needed in very few places, which already depend on other parts of qdev-core.h files. The benefit of having it in typedefs.h is small. Signed-off-by: Paolo Bonzini --- include/hw/qdev-core.h | 1 + include/qemu/typedefs.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 03/13] numa: remove types from typedefs.h

2024-05-02 Thread Paolo Bonzini
Exactly nobody needs them there. Place the typedef in the header that defines the struct. Signed-off-by: Paolo Bonzini --- include/qemu/typedefs.h | 2 -- include/sysemu/numa.h | 8 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/qemu/typedefs.h

[PATCH 13/13] pci: remove some types from typedefs.h

2024-05-02 Thread Paolo Bonzini
For types that are embedded in structs defined by pci.h, the definition is pretty much required to be available. Remove them from typedefs.h. Signed-off-by: Paolo Bonzini --- include/hw/pci/pcie.h | 3 +++ include/hw/pci/pcie_aer.h | 38 ++---

[PATCH 01/13] fw_cfg: remove useless declarations from typedefs.h

2024-05-02 Thread Paolo Bonzini
Only FWCfgState is used as part of APIs such as acpi_ghes_add_fw_cfg. Everything else need not be in typedefs.h. Signed-off-by: Paolo Bonzini --- include/hw/nvram/fw_cfg.h | 2 ++ include/qemu/typedefs.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 07/13] lockable: remove QemuLockable from typedefs.h

2024-05-02 Thread Paolo Bonzini
Using QemuLockable almost always requires going through QEMU_MAKE_LOCKABLE(). Therefore, there is little point in having the typedef always present. Move it to lockable.h, with only a small adjustment to coroutine.h (which has a tricky co-dependency with lockable.h due to defining CoMutex *and*

[PATCH 04/13] net: remove AnnounceTimer from typedefs.h

2024-05-02 Thread Paolo Bonzini
Exactly nobody needs it there. Place the typedef in the header that defines the struct. Signed-off-by: Paolo Bonzini --- include/net/announce.h | 4 ++-- include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/net/announce.h

[PATCH 11/13] display: remove GraphicHwOps from typedefs.h

2024-05-02 Thread Paolo Bonzini
Basically all uses of GraphicHwOps are defining an instance of it, which requires the full definition of the struct. It is pointless to have it in typedefs.h. Signed-off-by: Paolo Bonzini --- hw/display/vga_int.h| 1 + include/qemu/typedefs.h | 1 - 2 files changed, 1 insertion(+), 1

[PATCH 06/13] intc: remove PICCommonState from typedefs.h

2024-05-02 Thread Paolo Bonzini
Move it to the existing "PIC related things" header, hw/intc/i8259.h. Signed-off-by: Paolo Bonzini --- include/hw/intc/i8259.h | 2 ++ include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h index

[PATCH 05/13] qemu-option: remove QemuOpt from typedefs.h

2024-05-02 Thread Paolo Bonzini
QemuOpt is basically an internal data structure. It has no business being defined except if you need functions from include/qemu/option.h. Signed-off-by: Paolo Bonzini --- include/qemu/option.h | 2 ++ include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 08/13] migration: remove PostcopyDiscardState from typedefs.h

2024-05-02 Thread Paolo Bonzini
It is defined and referred to exclusively from a .c file. Signed-off-by: Paolo Bonzini --- include/qemu/typedefs.h | 1 - migration/postcopy-ram.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index

[PATCH 09/13] monitor: remove MonitorDef from typedefs.h

2024-05-02 Thread Paolo Bonzini
MonitorDef is defined by hmp-target.h, and all users except one already include it; the reason why the stubs do not include it, is because hmp-target.h currently can only be used in files that are compiled per target. However, that is easily fixed. Because the benefit of having MonitorDef in

[PATCH 00/13] remove some types from typedefs.h

2024-05-02 Thread Paolo Bonzini
The main reason for typedefs.h to exist is to avoid the need for "struct Foo;" forward declarations of types that are needed in function prototypes. It avoids the infamous "struct declared inside parameter list will not be visible outside of this definition or declaration" warning. Another less

[PATCH] kvm: move target-dependent interrupt routing out of kvm-all.c

2024-05-02 Thread Paolo Bonzini
Let hw/hyperv/hyperv.c and hw/intc/s390_flic.c handle (respectively) SynIC and adapter routes, removing the code from target-independent files. This also removes the only occurrence of AdapterInfo outside s390 code, so remove that from typedefs.h. Signed-off-by: Paolo Bonzini ---

  1   2   3   >