Re: [PATCH 1/5] target/alpha: Use cpu_env in preference to ALPHA_CPU

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:44, Richard Henderson wrote: ALPHA_CPU has a dynamic object type assert, which is unnecessary considering that these are all class hooks. Signed-off-by: Richard Henderson --- target/alpha/cpu.c| 15 ++- target/alpha/helper.c | 8 2 files changed, 10 i

Re: [PATCH 2/5] target/alpha: Hoist branch shift to initial decode

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:44, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/alpha/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PULL 6/6] iotests: add backup-discard-source

2024-04-29 Thread Richard Henderson
On 4/29/24 04:51, Vladimir Sementsov-Ogievskiy wrote: Add test for a new backup option: discard-source. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner Message-Id: <20240313152822.626493-6-vsement...@yandex-team.ru> Signed-off-by: Vladimir Sementsov

[PATCH] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-04-29 Thread Fiona Ebner
rather than the uint32_t for which the maximum is slightly more than 4 seconds and larger values would overflow. The QAPI interface allows specifying the number of seconds, so only values 0 to 4 are safe right now, other values lead to a much lower timeout than a user expects. The block_copy() cal

Re: [PATCH 11/24] accel/tcg: Allocate per-vCPU accel state in create_vcpu_thread()

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/vcpu-state.h | 7 +++ accel/tcg/tcg-accel-ops-mttcg.c | 2 ++ accel/tcg/tcg-accel-ops-rr.c| 2 ++ 3 files changed, 11 insertions(+) Reviewed-by: Richard Henderson r~ d

Re: [PATCH 12/24] accel/tcg: Move TaskState from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: TaskState is specific to TCG user emulation, move it to AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/vcpu-state.h | 6 -- include/hw/core/cpu.h | 2 -- bsd-user/main.c| 2 +- linux-user/main.c | 2 +-

Re: [PATCH] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-04-29 Thread Fiona Ebner
Am 29.04.24 um 16:36 schrieb Philippe Mathieu-Daudé: > Hi Fiona, > > On 29/4/24 16:19, Fiona Ebner wrote: > > Not everybody uses an email client that shows the patch content just > after the subject (your first lines wasn't making sense at first). > > Simply duplicating the subject helps to unde

Re: [PATCH 15/24] accel/tcg: Restrict IcountDecr and CPUTLB to TCG

2024-04-29 Thread Richard Henderson
On 4/29/24 07:03, Philippe Mathieu-Daudé wrote: Author: Philippe Mathieu-Daudé Date:   Mon Apr 29 16:01:18 2024 +0200     accel/tcg: Restrict cpu_plugin_mem_cbs_enabled() to TCG     So far cpu_plugin_mem_cbs_enabled() is only called from     TCG, so reduce it to accel/tcg/.     Signed-off

Re: [PATCH 15/24] accel/tcg: Restrict IcountDecr and CPUTLB to TCG

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: IcountDecr union, the CPUTLB* structures and the "exec/tlb-common.h" header are only required for TCG. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/tlb-common.h | 4 include/hw/core/cpu.h | 9 ++--- 2 files changed, 10 i

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

2024-04-29 Thread ltaylorsimpson
> -Original Message- > From: Matheus Tavares Bernardino > Sent: Friday, April 26, 2024 1:16 PM > To: qemu-devel@nongnu.org > Cc: bc...@quicinc.com; sidn...@quicinc.com; a...@rev.ng; a...@rev.ng; > ltaylorsimp...@gmail.com > Subject: [PATCH] Hexagon: add PC alignment check and exception

Re: [PATCH v3 4/5] qapi: introduce device-sync-config

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 29.04.24 16:04, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: On 29.04.24 13:51, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: On 24.04.24 14:48, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command to sync config from vhost-user

Re: [PATCH 16/24] accel/tcg: Move @jmp_env from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: @jmp_env is specific to TCG accelerator, move it to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 1 + accel/tcg/tcg-accel-ops.h | 1 + accel/tcg/vcpu-state.h | 2 ++ include/hw/core/cpu.h

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

2024-04-29 Thread ltaylorsimpson
PS You should also update the pkt_raises_exception function in translate.c to return true for packets that contain these instructions. This will ensure that none of the machine state is changed before the check is complete. Taylor > -Original Message- > From: ltaylorsimp...@gmail.com

Re: [PATCH] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-04-29 Thread Philippe Mathieu-Daudé
Hi Fiona, On 29/4/24 16:19, Fiona Ebner wrote: Not everybody uses an email client that shows the patch content just after the subject (your first lines wasn't making sense at first). Simply duplicating the subject helps to understand: Use uint64_t for timeout in nanoseconds ... rather than

Re: [PATCH] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 29.04.24 17:46, Fiona Ebner wrote: Am 29.04.24 um 16:36 schrieb Philippe Mathieu-Daudé: Hi Fiona, On 29/4/24 16:19, Fiona Ebner wrote: Not everybody uses an email client that shows the patch content just after the subject (your first lines wasn't making sense at first). Simply duplicating

Re: [PATCH 4/5] target/alpha: Split out gen_pc_disp

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:44, Richard Henderson wrote: Prepare for pcrel by not modifying cpu_pc before use, in the case of JSR. Signed-off-by: Richard Henderson --- target/alpha/translate.c | 41 ++-- 1 file changed, 23 insertions(+), 18 deletions(-) Reviewed-by: P

Re: [PATCH 14/24] accel/tcg: Move plugin fields to CPUNegativeOffsetState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 22 ++ include/qemu/plugin.h | 2 +- accel/tcg/plugin-gen.c | 8 +--- hw/core/cpu-common.c | 2 +- plugins/core.c | 8 5 files

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

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 08:08:10AM -0500, Michael Galaxy wrote: > Hi All (and Peter), Hi, Michael, > > My name is Michael Galaxy (formerly Hines). Yes, I changed my last name > (highly irregular for a male) and yes, that's my real last name: > https://www.linkedin.com/in/mrgalaxy/) > > I'm the

Re: [PATCH 13/24] accel/tcg: Update CPUNegativeOffsetState::can_do_io field documentation

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: The @can_do_io field got moved from CPUState to CPUNegativeOffsetState in commit 464dacf609 ("accel/tcg: Move can_do_io to CPUNegativeOffsetState"). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 8 1 file changed, 4

Re: [PATCH 17/24] accel/tcg: Move @mem_io_pc from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: diff --git a/target/i386/helper.c b/target/i386/helper.c index 48d1513a35..6c188ea94c 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -30,6 +30,7 @@ #include "qemu/log.h" #ifdef CONFIG_TCG #include "tcg/insn-start-words.h" +#in

Re: [PATCH v3 4/4] qapi: introduce exit-on-error parameter for migrate-incoming

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 29.04.24 16:06, Fabiano Rosas wrote: Vladimir Sementsov-Ogievskiy writes: On 25.04.24 23:30, Fabiano Rosas wrote: @@ -797,13 +801,18 @@ fail: MIGRATION_STATUS_FAILED); migration_incoming_state_destroy(); -if (migrate_has_error(s)) { -WITH_QE

Re: QEMU Community Call Agenda Items (April 30th, 2024)

2024-04-29 Thread Philippe Mathieu-Daudé
Hi, On 29/4/24 00:25, Philippe Mathieu-Daudé wrote: Hi, The KVM/QEMU community call is at:   https://meet.jit.si/kvmcallmeeting   @   30/4/2024 14:00 UTC Are there any agenda items for the sync-up? I'd like to discuss two issues: 1/ Stability of QOM path - Curr

Re: [PATCH RFC 00/26] Multifd 🔀 device state transfer support with VFIO consumer

2024-04-29 Thread Peter Xu
On Fri, Apr 26, 2024 at 07:34:09PM +0200, Maciej S. Szmigiero wrote: > On 24.04.2024 00:35, Peter Xu wrote: > > On Wed, Apr 24, 2024 at 12:25:08AM +0200, Maciej S. Szmigiero wrote: > > > On 24.04.2024 00:20, Peter Xu wrote: > > > > On Tue, Apr 23, 2024 at 06:15:35PM +0200, Maciej S. Szmigiero wrote

Re: [PATCH 18/24] accel/tcg: Move @cflags_next_tb from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: @cflags_next_tb is specific to TCG accelerator, move it to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/vcpu-state.h| 2 ++ include/hw/core/cpu.h | 1 - accel/tcg/cpu-exec.c | 12 ++-- accel/tcg

Re: [PATCH 19/24] accel/tcg: Move @iommu_notifiers from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: @iommu_notifiers is specific to TCG system emulation, move it to AccelCPUState. Restrict TCG specific code in system/physmem.c, adding an empty stub for tcg_register_iommu_notifier(). Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/vcpu-stat

[PATCH] MAINTAINERS: Update my email address

2024-04-29 Thread Anthony PERARD
From: Anthony PERARD Signed-off-by: Anthony PERARD --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 302b6fd00c..ea9672fc52 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -532,7 +532,7 @@ Guest CPU Cores (Xen) ---

Re: [PATCH v2 3/6] migration: Remove 'blk/-b' option from migrate commands

2024-04-29 Thread Peter Xu
On Fri, Apr 26, 2024 at 10:14:05AM -0300, Fabiano Rosas wrote: > @@ -2003,21 +1997,7 @@ static bool migrate_prepare(MigrationState *s, bool > blk, bool resume, > } > } > > -if (blk) { > -if (migrate_colo()) { > -error_setg(errp, "No disk migration is require

[PATCH V1 02/26] vl: helper to request re-exec

2024-04-29 Thread Steve Sistare
Add a qemu_system_exec_request() hook that causes the main loop to exit and re-exec qemu using the specified arguments. Signed-off-by: Steve Sistare --- include/sysemu/runstate.h | 3 +++ system/runstate.c | 29 + 2 files changed, 32 insertions(+) diff --git

[PATCH V1 06/26] migration: precreate vmstate for exec

2024-04-29 Thread Steve Sistare
Provide migration_precreate_save for saving precreate vmstate across exec. Create a memfd, save its value in the environment, and serialize state to it. Reverse the process in migration_precreate_load. Signed-off-by: Steve Sistare --- include/migration/misc.h | 5 ++ migration/meson.build

[PATCH V1 11/26] migration: vmstate_register at init time

2024-04-29 Thread Steve Sistare
Define vmstate_register_init to statically declare that a vmstate object should be registered during qemu initialization, specifically, in the call to vmstate_register_init_all. This is needed to register objects that are not Objects (and hence cannot use the DeviceClass vmsd hook), without requir

[PATCH V1 17/26] machine: memfd-alloc option

2024-04-29 Thread Steve Sistare
Allocate anonymous memory using memfd_create if the memfd-alloc machine option is set. Signed-off-by: Steve Sistare --- hw/core/machine.c | 22 ++ include/hw/boards.h | 1 + qemu-options.hx | 6 ++ system/memory.c | 9 ++--- system/physmem.c| 18 +

[PATCH V1 01/26] oslib: qemu_clear_cloexec

2024-04-29 Thread Steve Sistare
Define qemu_clear_cloexec, analogous to qemu_set_cloexec. Signed-off-by: Steve Sistare Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Marc-André Lureau --- include/qemu/osdep.h | 9 + util/oslib-posix.c | 9 + util/oslib-win32.c | 4 3 files changed, 22 insertions(+)

[PATCH V1 04/26] migration: delete unused parameter mis

2024-04-29 Thread Steve Sistare
Signed-off-by: Steve Sistare --- migration/savevm.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 6829ba3..9789823 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2591,8 +2591,7 @@ static bool check_sectio

[PATCH V1 12/26] migration: vmstate factory object

2024-04-29 Thread Steve Sistare
During the precreate phase, we will load migration state that will be used to create objects, but those objects have not been created and have not registered a vmstate handler yet. We don't know how many objects will be created, or what their names and ids will be, so we don't know what vmstate ha

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

2024-04-29 Thread Steve Sistare
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' command. Signed-off-by: Steve Sistare --- hmp-commands.hx

[PATCH V1 22/26] migration: ram block cpr-exec blockers

2024-04-29 Thread Steve Sistare
Unlike cpr-reboot mode, cpr-exec mode cannot save volatile ram blocks in the migration stream file and recreate them later, because the physical memory for the blocks is pinned and registered for vfio. Add an exec-mode blocker for volatile ram blocks. Also add a blocker for RAM_GUEST_MEMFD. Pres

[PATCH V1 25/26] migration: fix mismatched GPAs during cpr-exec

2024-04-29 Thread Steve Sistare
For cpr-exec mode, ramblock_is_ignored is always true, and the address of each migrated memory region must match the address of the statically initialized region on the target. However, for a PCI rom block, the region address is set when the guest writes to a BAR on the source, which does not occu

[PATCH V1 09/26] migration: vmstate_register_named

2024-04-29 Thread Steve Sistare
Define vmstate_register_named which takes the instance name as its first parameter, instead of generating the name from VMStateIf of the Object. This will be needed to register objects that are not Objects. Pass the new name parameter to vmstate_register_with_alias_id. Signed-off-by: Steve Sistar

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

2024-04-29 Thread Steve Sistare
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 command stops the VM, saves state to the URI, directly exec's a new version of QEMU

[PATCH V1 23/26] migration: misc cpr-exec blockers

2024-04-29 Thread Steve Sistare
Add blockers for cpr-exec migration mode for devices and options that do not support it. Signed-off-by: Steve Sistare --- accel/xen/xen-all.c| 5 + backends/hostmem-epc.c | 12 ++-- hw/vfio/migration.c| 3 ++- replay/replay.c| 6 ++ 4 files changed, 23 insertio

[PATCH V1 16/26] physmem: set ram block idstr earlier

2024-04-29 Thread Steve Sistare
Set the idstr for a ram block earlier, prior to calling ram_block_add, so it can be used in a subsequent patch to find CPR attributes for the block before it is created. The id depends on the block's device path and its mr. As as sanity check, verify that the id has not changed (due to these depe

[PATCH V1 10/26] migration: vmstate_unregister_named

2024-04-29 Thread Steve Sistare
Define an accessor to find vmstate state handler by name and id and unregister it. This is needed to unregister a specific instance of an object that is not an Object, since it lacks the VMStateIf get_id hook. Signed-off-by: Steve Sistare --- include/migration/vmstate.h | 9 + migratio

[PATCH V1 05/26] migration: precreate vmstate

2024-04-29 Thread Steve Sistare
Provide the VMStateDescription precreate field to mark objects that must be loaded on the incoming side before devices have been created, because they provide properties that will be needed at creation time. They will be saved to and loaded from their own QEMUFile, via qemu_savevm_precreate_save a

[PATCH V1 26/26] migration: only-migratable-modes

2024-04-29 Thread Steve Sistare
Add the only-migratable-modes option as a generalization of only-migratable. Only devices that support all requested modes are allowed. Signed-off-by: Steve Sistare --- include/migration/misc.h | 3 +++ include/sysemu/sysemu.h| 1 - migration/migration-hmp-cmds.c | 26 +++

[PATCH V1 24/26] seccomp: cpr-exec blocker

2024-04-29 Thread Steve Sistare
cpr-exec mode needs permission to exec. Block it if permission is denied. Signed-off-by: Steve Sistare --- include/sysemu/seccomp.h | 1 + system/qemu-seccomp.c| 10 -- system/vl.c | 6 ++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/sys

[PATCH V1 14/26] physmem: hoist guest_memfd creation

2024-04-29 Thread Steve Sistare
Do not modify RAMBlocks in ram_block_add. The block should be fully formed before calling ram_block_add to add it to the block list. This will simplify error handling and be more modular. Start by hoisting guest_memfd creation to the call sites. No functional change. Signed-off-by: Steve Sistar

[PATCH V1 15/26] physmem: hoist host memory allocation

2024-04-29 Thread Steve Sistare
Hoist host memory allocation from ram_block_add. No functional change. Signed-off-by: Steve Sistare --- system/physmem.c | 80 +--- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index ffcf01

[PATCH V1 03/26] migration: SAVEVM_FOREACH

2024-04-29 Thread Steve Sistare
Define an abstraction SAVEVM_FOREACH to loop over all savevm state handlers, and replace QTAILQ_FOREACH. Define variants for ALL so we can loop over all handlers vs a subset of handlers in a subsequent patch, but at this time there is no distinction between the two. No functional change. Signed-o

[PATCH V1 00/26] Live update: cpr-exec

2024-04-29 Thread Steve Sistare
This patch series adds the live migration cpr-exec mode. In this mode, QEMU stops the VM, writes VM state to the migration URI, and directly exec's a new version of QEMU on the same host, replacing the original process while retaining its PID. Guest RAM is preserved in place, albeit with new virt

[PATCH V1 19/26] physmem: preserve ram blocks for cpr

2024-04-29 Thread Steve Sistare
Preserve fields of RAMBlocks that allocate their host memory during CPR so the RAM allocation can be recovered. Mirror the mr->align field in the RAMBlock to simplify the vmstate. Preserve the old host address, even though it is immediately discarded, as it will be needed in the future for CPR wi

Re: QEMU Community Call Agenda Items (April 30th, 2024)

2024-04-29 Thread Daniel P . Berrangé
On Mon, Apr 29, 2024 at 05:06:36PM +0200, Philippe Mathieu-Daudé wrote: > Hi, > > On 29/4/24 00:25, Philippe Mathieu-Daudé wrote: > > Hi, > > > > The KVM/QEMU community call is at: > > > >   https://meet.jit.si/kvmcallmeeting > >   @ > >   30/4/2024 14:00 UTC > > > > Are there any agenda ite

[PATCH V1 13/26] physmem: ram_block_create

2024-04-29 Thread Steve Sistare
Create a common subroutine to allocate a RAMBlock, de-duping the code to populate its common fields. Add a trace point for good measure. No functional change. Signed-off-by: Steve Sistare --- system/physmem.c| 47 ++- system/trace-events | 3 +++

[PATCH V1 08/26] migration: vmstate_info_void_ptr

2024-04-29 Thread Steve Sistare
Define VMSTATE_VOID_PTR so the value of a pointer (but not its target) can be saved in the migration stream. This will be needed for CPR. Signed-off-by: Steve Sistare --- include/migration/vmstate.h | 15 +++ migration/vmstate-types.c | 24 2 files changed

[PATCH V1 07/26] migration: VMStateId

2024-04-29 Thread Steve Sistare
Define a type for the 256 byte id string to guarantee the same length is used and enforced everywhere. Signed-off-by: Steve Sistare --- include/exec/ramblock.h | 3 ++- include/migration/vmstate.h | 2 ++ migration/savevm.c | 8 migration/vmstate.c | 3 ++- 4 files

[PATCH V1 21/26] migration: migrate_add_blocker_mode

2024-04-29 Thread Steve Sistare
Define a convenience function to add a migration blocker for a single mode. Signed-off-by: Steve Sistare --- include/migration/blocker.h | 7 +++ migration/migration.c | 5 + stubs/migr-blocker.c| 5 + 3 files changed, 17 insertions(+) diff --git a/include/migration/bl

Re: [PATCH 3/5] target/alpha: Split out gen_goto_tb

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:44, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/alpha/translate.c | 61 ++-- 1 file changed, 21 insertions(+), 40 deletions(-) static DisasJumpType gen_bdirect(DisasContext *ctx, int ra, int32_t disp) {

Re: [PATCH v2 3/6] migration: Remove 'blk/-b' option from migrate commands

2024-04-29 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 10:14:05AM -0300, Fabiano Rosas wrote: >> @@ -2003,21 +1997,7 @@ static bool migrate_prepare(MigrationState *s, bool >> blk, bool resume, >> } >> } >> >> -if (blk) { >> -if (migrate_colo()) { >> -error_setg(errp,

Re: [PATCH 3/6] hw/acpi: Generic Port Affinity Structure support

2024-04-29 Thread Jonathan Cameron via
On Tue, 23 Apr 2024 12:56:21 +0200 Markus Armbruster wrote: > Jonathan Cameron writes: > > > These are very similar to the recently added Generic Initiators > > but instead of representing an initiator of memory traffic they > > represent an edge point beyond which may lie either targets or > >

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

2024-04-29 Thread Matheus Tavares Bernardino
Hi, Taylor On Mon, 29 Apr 2024 09:51:16 -0500 wrote: > > PS You should also update the pkt_raises_exception function in translate.c > to return true for packets that contain these instructions. This will > ensure that none of the machine state is changed before the check is > complete. Will d

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

2024-04-29 Thread Richard Henderson
On 4/27/24 07:56, Richard Henderson wrote: On 4/26/24 11:15, 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 tests for both the most common case as well

Re: [PATCH v2 3/6] migration: Remove 'blk/-b' option from migrate commands

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 02:18:57PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Apr 26, 2024 at 10:14:05AM -0300, Fabiano Rosas wrote: > >> @@ -2003,21 +1997,7 @@ static bool migrate_prepare(MigrationState *s, bool > >> blk, bool resume, > >> } > >> } > >> > >> -

Re: [PATCH v2 3/6] migration: Remove 'blk/-b' option from migrate commands

2024-04-29 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Apr 29, 2024 at 02:18:57PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Fri, Apr 26, 2024 at 10:14:05AM -0300, Fabiano Rosas wrote: >> >> @@ -2003,21 +1997,7 @@ static bool migrate_prepare(MigrationState *s, >> >> bool blk, bool resume, >> >> }

Re: [PULL 6/6] iotests: add backup-discard-source

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
[Add John] On 29.04.24 17:18, Richard Henderson wrote: On 4/29/24 04:51, Vladimir Sementsov-Ogievskiy wrote: Add test for a new backup option: discard-source. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner Message-Id: <20240313152822.626493-6-vse

Re: [PATCH v2 6/6] migration: Deprecate fd: for file migration

2024-04-29 Thread Peter Xu
On Fri, Apr 26, 2024 at 10:14:08AM -0300, Fabiano Rosas wrote: > 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 structu

Re: [PATCH v2 6/6] migration: Deprecate fd: for file migration

2024-04-29 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 26, 2024 at 10:14:08AM -0300, Fabiano Rosas wrote: >> 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 >> migra

Re: [PATCH v2 3/6] migration: Remove 'blk/-b' option from migrate commands

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 03:35:02PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Apr 29, 2024 at 02:18:57PM -0300, Fabiano Rosas wrote: > >> Peter Xu writes: > >> > >> > On Fri, Apr 26, 2024 at 10:14:05AM -0300, Fabiano Rosas wrote: > >> >> @@ -2003,21 +1997,7 @@ static bool migr

Re: [PATCH 3/5] target/alpha: Split out gen_goto_tb

2024-04-29 Thread Richard Henderson
On 4/29/24 09:58, Philippe Mathieu-Daudé wrote: On 25/4/24 01:44, Richard Henderson wrote: Signed-off-by: Richard Henderson ---   target/alpha/translate.c | 61 ++--   1 file changed, 21 insertions(+), 40 deletions(-)   static DisasJumpType gen_bdirect(Dis

Re: [PATCH v2 6/6] migration: Deprecate fd: for file migration

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 03:47:39PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Fri, Apr 26, 2024 at 10:14:08AM -0300, Fabiano Rosas wrote: > >> The fd: URI can currently trigger two different types of migration, a > >> TCP migration using sockets and a file migration using a plain > >

[PATCH v4 1/2] target/s390x: report deprecated-props in cpu-model-expansion reply

2024-04-29 Thread Collin Walling
Retain a list of deprecated features disjoint from any particular CPU model. A query-cpu-model-expansion reply will now provide a list of properties (i.e. features) that are flagged as deprecated. Example: { "return": { "model": { "name": "z14.2-base", "deprec

[PATCH v4 2/2] target/s390x: flag te and cte as deprecated

2024-04-29 Thread Collin Walling
Add the CONSTRAINT_TRANSACTIONAL_EXE (cte) and TRANSACTIONAL_EXE (te) to the list of deprecated features. Signed-off-by: Collin Walling --- target/s390x/cpu_features.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index efafc9711

[PATCH v4 0/2] query-cpu-model-expansion: report deprecated features

2024-04-29 Thread Collin Walling
Changelog v4 - updated cover letter to show example output - deprecated features are now a subset of the full CPU model's list of features - value: 1. no longer listing the deprecated features for CPU models that nev

[PATCH v5 5/5] qapi: introduce exit-on-error parameter for migrate-incoming

2024-04-29 Thread 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 enable the new behavior: HMP is not and

[PATCH v5 4/5] migration: process_incoming_migration_co(): rework error reporting

2024-04-29 Thread 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: Fabiano Rosas --- migration/migration.c | 17 ++--- 1 file changed, 10 insertions(+),

[PATCH v5 3/5] migration: process_incoming_migration_co(): fix reporting s->error

2024-04-29 Thread 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 --- migration/migration.c | 24 1 file changed, 12 insertions(+), 12

[PATCH v5 2/5] migration: process_incoming_migration_co(): complete cleanup on failure

2024-04-29 Thread 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 --- migration/migration.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/migration/migration.c b/migration/migrat

Re: [PATCH 20/24] accel/tcg: Move @tb_jmp_cache from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: @tb_jmp_cache is specific to TCG accelerator, move it to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tb-jmp-cache.h | 4 ++-- accel/tcg/vcpu-state.h| 2 ++ include/hw/core/cpu.h | 2 -- include/qemu/typedefs

[PATCH v5 0/5] migration: do not exit on incoming failure

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Hi all! The series brings an option to not immediately exit on incoming migration failure, giving a possibility to orchestrator to get the error through QAPI and shutdown QEMU by "quit". v5: - add "migration: process_incoming_migration_co(): fix reporting s->error" v4: - add r-b and a-b by Fabia

[PATCH v5 1/5] migration: move trace-point from migrate_fd_error to migrate_set_error

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Cover more cases by trace-point. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fabiano Rosas --- migration/migration.c | 4 +++- migration/trace-events | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index b5af6b51

Re: [PATCH v4 1/4] migration: move trace-point from migrate_fd_error to migrate_set_error

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 10:55:38AM +0300, Vladimir Sementsov-Ogievskiy wrote: > Cover more cases by trace-point. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v5 2/5] migration: process_incoming_migration_co(): complete cleanup on failure

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 10:14:23PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 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 -- Peter Xu

[PATCH 2/3] target/riscv: Enforce WARL behavior for scounteren/hcounteren

2024-04-29 Thread Atish Patra
scounteren/hcountern are also WARL registers similar to mcountern. Only set the bits for the available counters during the write to preserve the WARL behavior. Signed-off-by: Atish Patra --- target/riscv/csr.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/targ

[PATCH 1/3] target/riscv: Save counter values during countinhibit update

2024-04-29 Thread Atish Patra
Currently, if a counter monitoring cycle/instret is stopped via mcountinhibit we just update the state while the value is saved during the next read. This is not accurate as the read may happen many cycles after the counter is stopped. Ideally, the read should return the value saved when the counte

[PATCH 3/3] target/riscv: Fix the predicate functions for mhpmeventhX CSRs

2024-04-29 Thread Atish Patra
mhpmeventhX CSRs are available for RV32. The predicate function should check that first before checking sscofpmf extension. Fixes: 14664483457b ("target/riscv: Add sscofpmf extension support") Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Signed-off-by: Atish Patra --- tar

[PATCH 0/3] Assorted fixes for PMU

2024-04-29 Thread Atish Patra
This series contains few miscallenous fixes related to hpmcounters and related code. The first patch fixes an issue with cycle/instret counters overcouting while the remaining two are more for specification compliance. Signed-off-by: Atish Patra --- Atish Patra (3): target/riscv: Save count

Re: [PATCH 22/24] accel/tcg: Move @tcg_cflags from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: @tcg_cflags is specific to TCG accelerator, move it to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/vcpu-state.h | 2 ++ include/hw/core/cpu.h | 4 +--- accel/tcg/cpu-exec.c | 6 +++--- linux-user/main.c | 2 +

Re: [PATCH v5 3/5] migration: process_incoming_migration_co(): fix reporting s->error

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 10:14:24PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 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 > --- >

Re: [PATCH v5 4/5] migration: process_incoming_migration_co(): rework error reporting

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 10:14:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 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: Fabiano Rosa

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

2024-04-29 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 tests for both the most common case as well as packets with multiple change-of-flow instructions. Signed-off-by: Matheus Tavares Bernardino

Re: [PATCH] MAINTAINERS: Update my email address

2024-04-29 Thread Durrant, Paul
On 29/04/2024 16:49, Anthony PERARD wrote: From: Anthony PERARD Signed-off-by: Anthony PERARD --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Paul Durrant

Re: [PATCH v5 5/5] qapi: introduce exit-on-error parameter for migrate-incoming

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 10:14:26PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 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 outgoi

Re: [PATCH v2 1/6] migration: Remove 'skipped' field from MigrationStats

2024-04-29 Thread Peter Xu
On Fri, Apr 26, 2024 at 10:14:03AM -0300, Fabiano Rosas wrote: > 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 > Signed-off

Re: [PATCH v2 5/6] migration: Remove non-multifd compression

2024-04-29 Thread Peter Xu
On Fri, Apr 26, 2024 at 10:14:07AM -0300, Fabiano Rosas wrote: > 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

Re: [PATCH v3 06/20] plugins: Use emit_before_op for PLUGIN_GEN_AFTER_INSN

2024-04-29 Thread Pierrick Bouvier
On 4/24/24 16:02, Richard Henderson wrote: Introduce a new plugin_cb op and migrate one operation. By using emit_before_op, we do not need to emit opcodes early and modify them later -- we can simply emit the final set of opcodes once. Signed-off-by: Richard Henderson --- include/tcg/tcg-op-c

Re: [PATCH v3 07/20] plugins: Use emit_before_op for PLUGIN_GEN_FROM_TB

2024-04-29 Thread Pierrick Bouvier
On 4/24/24 16:02, Richard Henderson wrote: By having the qemu_plugin_cb_flags be recorded in the TCGHelperInfo, we no longer need to distinguish PLUGIN_CB_REGULAR from PLUGIN_CB_REGULAR_R, so place all TB callbacks in the same queue. Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c

Re: [PATCH RFC 23/26] migration/multifd: Device state transfer support - send side

2024-04-29 Thread Peter Xu
On Tue, Apr 16, 2024 at 04:43:02PM +0200, Maciej S. Szmigiero wrote: > +bool multifd_queue_page(RAMBlock *block, ram_addr_t offset) > +{ > +g_autoptr(GMutexLocker) locker = NULL; > + > +/* > + * Device state submissions for shared channels can come > + * from multiple threads and co

Re: [PATCH RFC 00/26] Multifd 🔀 device state transfer support with VFIO consumer

2024-04-29 Thread Peter Xu
On Fri, Apr 26, 2024 at 07:35:36PM +0200, Maciej S. Szmigiero wrote: > On 24.04.2024 00:27, Peter Xu wrote: > > On Tue, Apr 23, 2024 at 06:14:18PM +0200, Maciej S. Szmigiero wrote: > > > We don't lose any genericity since by default the transfer is done via > > > mixed RAM / device state multifd ch

Re: [PATCH] tests/avocado: update sunxi kernel from armbian to 6.6.16

2024-04-29 Thread Niek Linnenbank
Hi Peter, Strahinja, I can confirm that the orangepi-pc and cubieboard based tests are working OK using the newer kernel 6.6.16: $ ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes ./build/pyvenv/bin/avocado --show=app,console run -t machine:orangepi-pc -t machine:cubieboard tests/av

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

2024-04-29 Thread Yu Zhang
Hello Michael and Peter, We are very glad at your quick and kind reply about our plan to take over the maintenance of your code. The message is for presenting our plan and working together. If we were able to obtain the maintainer's role, our plan is: 1. Create the necessary unit-test cases and g

Re: [PATCH 00/41] target/sparc: Implement VIS4

2024-04-29 Thread Mark Cave-Ayland
On 02/03/2024 05:15, Richard Henderson wrote: I whipped this up over the Christmas break, but I'm just now getting around to posting. I have not attempted to model the newer cpus that have these features, but it is possible to enable the features manually via -cpu properties. Possibly the firs

Re: [PATCH 14/24] accel/tcg: Move plugin fields to CPUNegativeOffsetState

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 16:42, Richard Henderson wrote: On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   include/hw/core/cpu.h  | 22 ++   include/qemu/plugin.h  |  2 +-   accel/tcg/plugin-gen.c |  8 +---   hw/core/cpu-common.c   |  2 +-   pl

<    1   2   3   >