Re: [RFC 1/2] iova_tree: add an id member to DMAMap

2024-04-29 Thread Si-Wei Liu
On 4/29/2024 1:14 AM, Eugenio Perez Martin wrote: On Thu, Apr 25, 2024 at 7:44 PM Si-Wei Liu wrote: On 4/24/2024 12:33 AM, Eugenio Perez Martin wrote: On Wed, Apr 24, 2024 at 12:21 AM Si-Wei Liu wrote: On 4/22/2024 1:49 AM, Eugenio Perez Martin wrote: On Sat, Apr 20, 2024 at 1:50 AM

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

2024-04-29 Thread Markus Armbruster
Collin Walling writes: > 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": { >

[PATCH 0/3] qapi/vfio: Add VFIO device migration state change QAPI event

2024-04-29 Thread Avihai Horon
Hello, This series adds a new QAPI event for VFIO device migration state change. This event will be emitted when a VFIO device changes its state, for example, during migration or when stopping/starting the guest. This event can be used by management applications to get updates on the current

[PATCH 1/3] qapi/vfio: Add VFIO device migration state change QAPI event

2024-04-29 Thread Avihai Horon
Add a new QAPI event for VFIO device migration state change. This event will be emitted when a VFIO device changes its migration state, for example, during migration or when stopping/starting the guest. This event can be used by management applications to get updates on the current state of the

[PATCH 3/3] vfio/migration: Don't emit STOP_COPY state change event twice

2024-04-29 Thread Avihai Horon
When migrating a VFIO device that supports pre-copy, it is transitioned to STOP_COPY twice: once in vfio_vmstate_change() and second time in vfio_save_complete_precopy(). The second transition is harmless, as it's a STOP_COPY->STOP_COPY no-op transition. However, with the newly added migration

[PATCH 2/3] vfio/migration: Emit VFIO device migration state change QAPI event

2024-04-29 Thread Avihai Horon
Emit VFIO device migration state change QAPI event when a VFIO device changes its migration state. This can be used by management applications to get updates on the current state of the VFIO device for their own purposes. A new per VFIO device capability, "migration-events", is added so events

Re: [PULL 1/1] hw/ufs: Fix buffer overflow bug

2024-04-29 Thread Thomas Huth
On 30/04/2024 06.32, Thomas Huth wrote: On 30/04/2024 02.17, Richard Henderson wrote: On 4/28/24 20:25, Jeuk Kim wrote: From: Jeuk Kim It fixes the buffer overflow vulnerability in the ufs device. The bug was detected by sanitizers. You can reproduce it by: cat << EOF |\ qemu-system-x86_64

Re: [PULL 1/1] hw/ufs: Fix buffer overflow bug

2024-04-29 Thread Thomas Huth
On 30/04/2024 02.17, Richard Henderson wrote: On 4/28/24 20:25, Jeuk Kim wrote: From: Jeuk Kim It fixes the buffer overflow vulnerability in the ufs device. The bug was detected by sanitizers. You can reproduce it by: cat << EOF |\ qemu-system-x86_64 \ -display none -machine accel=qtest -m

Re: [PATCH] hw/loongarch: Refine default numa id calculation

2024-04-29 Thread gaosong
在 2024/3/19 上午10:26, Bibo Mao 写道: With numa_test test case, there is subcase named test_def_cpu_split(), there are 8 sockets and 2 numa nodes. Here is command line: "-machine smp.cpus=8,smp.sockets=8 -numa node,memdev=ram -numa node" The required result is: node 0 cpus: 0 2 4 6 node 1

Re: [PATCH v2 07/15] test/qtest: add riscv-iommu-pci tests

2024-04-29 Thread Frank Chang
Reviewed-by: Frank Chang Daniel Henrique Barboza 於 2024年3月8日 週五 上午12:05寫道: > > To test the RISC-V IOMMU emulation we'll use its PCI representation. > Create a new 'riscv-iommu-pci' libqos device that will be present with > CONFIG_RISCV_IOMMU. This config is only available for RISC-V, so this >

Re: [PATCH v3] input-linux: Add option to not grab a device upon guest startup

2024-04-29 Thread Justinien Bouron
Just a ping to make sure this patch hasn't been lost in the noise. The relevant patchew page is https://patchew.org/QEMU/20240403055002.890760-1-justinien.bou...@gmail.com/ Regards, Justinien Bouron

Re: [PATCH v2 06/15] hw/riscv/virt.c: support for RISC-V IOMMU PCIDevice hotplug

2024-04-29 Thread Frank Chang
Reviewed-by: Frank Chang Daniel Henrique Barboza 於 2024年3月8日 週五 上午12:06寫道: > > From: Tomasz Jeznach > > Generate device tree entry for riscv-iommu PCI device, along with > mapping all PCI device identifiers to the single IOMMU device instance. > > Signed-off-by: Tomasz Jeznach >

Re: [PATCH] target/loongarch: Put cpucfg operation before CSR register

2024-04-29 Thread gaosong
在 2024/4/28 上午11:16, Bibo Mao 写道: On Loongarch, cpucfg is register for cpu feature, some other registers depend on cpucfg feature such as perf CSR registers. Here put cpucfg read/write operations before CSR register, so that KVM knows how many perf CSR registers are valid from pre-set cpucfg

[PATCH] target/loongarch/kvm: Fix VM recovery from disk failures

2024-04-29 Thread Song Gao
vmstate does not save kvm_state_conter, which can cause VM recovery from disk to fail. Signed-off-by: Song Gao --- target/loongarch/machine.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/loongarch/machine.c b/target/loongarch/machine.c index c7029fb9b4..4cd1bf06ff 100644 ---

Re: [PATCH v2 05/15] hw/riscv: add riscv-iommu-sys platform device

2024-04-29 Thread Frank Chang
Reviewed-by: Frank Chang Daniel Henrique Barboza 於 2024年3月8日 週五 上午12:05寫道: > > From: Tomasz Jeznach > > This device models the RISC-V IOMMU as a sysbus device. > > Signed-off-by: Tomasz Jeznach > Signed-off-by: Daniel Henrique Barboza > --- > hw/riscv/meson.build | 2 +- >

Re: [PATCH v2 10/13] accel/tcg: Remove NULL check in tcg_flush_jmp_cache()

2024-04-29 Thread Ilya Leoshkevich
On Mon, Apr 29, 2024 at 11:30:47PM +0200, Philippe Mathieu-Daudé wrote: > I /think/ this check added in commit 4e4fa6c12d ("accel/tcg: > Complete cpu initialization before registration") is now > unnecessary, but I don't have the WASM reproducer mentioned > in: >

Re: [PULL 1/1] hw/ufs: Fix buffer overflow bug

2024-04-29 Thread Richard Henderson
On 4/28/24 20:25, Jeuk Kim wrote: From: Jeuk Kim It fixes the buffer overflow vulnerability in the ufs device. The bug was detected by sanitizers. You can reproduce it by: cat << EOF |\ qemu-system-x86_64 \ -display none -machine accel=qtest -m 512M -M q35 -nodefaults -drive \

Re: [PULL 0/1] net/slirp: Use newer slirp_*_hostxfwd API

2024-04-29 Thread Richard Henderson
On 4/28/24 17:10, Samuel Thibault wrote: The following changes since commit 03555199b63aa1fbce24d16287e141c33f572a24: net/slirp: Use newer slirp_*_hostxfwd API (2024-04-29 02:04:58 +0200) are available in the Git repository at: https://people.debian.org/~sthibault/qemu.git

Re: [PATCH v2 04/13] accel/tcg: Move @plugin_state from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/29/24 14:30, Philippe Mathieu-Daudé wrote: @plugin_state is specific to TCG accelerator, move it to its AccelCPUState. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- TODO: check dubious include of "accel/tcg/vcpu-state.h" in hw/core/cpu-common.c.

Re: [PATCH v2 03/13] accel/tcg: Move @plugin_mem_cbs from CPUState to CPUNegativeOffsetState

2024-04-29 Thread Richard Henderson
On 4/29/24 14:30, Philippe Mathieu-Daudé wrote: @plugin_mem_cbs is accessed by tcg generated code, move it to CPUNegativeOffsetState. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 2 +- include/hw/core/cpu.h | 13 +++-- include/qemu/plugin.h |

Re: [PATCH v2 01/13] accel/tcg: Restrict qemu_plugin_vcpu_exit_hook() to TCG plugins

2024-04-29 Thread Richard Henderson
On 4/29/24 14:30, Philippe Mathieu-Daudé wrote: qemu_plugin_vcpu_exit_hook() is specific to TCG plugins, so must be restricted to it in cpu_common_unrealizefn(), similarly to how qemu_plugin_create_vcpu_state() is restricted in the cpu_common_realizefn() counterpart. Signed-off-by: Philippe

Re: [PATCH v2 2/6] migration: Remove 'inc' option from migrate command

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

[PATCH v2 09/13] accel/tcg: Move @tb_jmp_cache from CPUState to TCG AccelCPUState

2024-04-29 Thread Philippe Mathieu-Daudé
@tb_jmp_cache is specific to TCG accelerator, move it to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-21-phi...@linaro.org> --- accel/tcg/tb-jmp-cache.h | 4 ++-- accel/tcg/vcpu-state.h| 2 ++

[PATCH v2 04/13] accel/tcg: Move @plugin_state from CPUState to TCG AccelCPUState

2024-04-29 Thread Philippe Mathieu-Daudé
@plugin_state is specific to TCG accelerator, move it to its AccelCPUState. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- TODO: check dubious include of "accel/tcg/vcpu-state.h" in hw/core/cpu-common.c. --- accel/tcg/vcpu-state.h | 5 +

[PATCH v2 13/13] accel/tcg: Move icount fields from CPUState to TCG AccelCPUState

2024-04-29 Thread Philippe Mathieu-Daudé
Both @icount_budget and @icount_extra fields are specific to TCG accelerator, move them to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-25-phi...@linaro.org> --- accel/tcg/vcpu-state.h | 4

[PATCH v2 02/13] accel/tcg: Restrict cpu_plugin_mem_cbs_enabled() to TCG

2024-04-29 Thread Philippe Mathieu-Daudé
So far cpu_plugin_mem_cbs_enabled() is only called from TCG, so reduce it to accel/tcg/. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <5f59c754-44e5-4743-a2dd-87ef8e13e...@linaro.org> --- accel/tcg/internal-common.h | 17 +

[PATCH v2 01/13] accel/tcg: Restrict qemu_plugin_vcpu_exit_hook() to TCG plugins

2024-04-29 Thread Philippe Mathieu-Daudé
qemu_plugin_vcpu_exit_hook() is specific to TCG plugins, so must be restricted to it in cpu_common_unrealizefn(), similarly to how qemu_plugin_create_vcpu_state() is restricted in the cpu_common_realizefn() counterpart. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/cpu-common.c | 4 1

[PATCH v2 07/13] accel/tcg: Move @cflags_next_tb from CPUState to TCG AccelCPUState

2024-04-29 Thread Philippe Mathieu-Daudé
@cflags_next_tb is specific to TCG accelerator, move it to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-19-phi...@linaro.org> --- accel/tcg/vcpu-state.h| 2 ++ include/hw/core/cpu.h | 1 -

[PATCH v2 11/13] accel/tcg: Move @tcg_cflags from CPUState to TCG AccelCPUState

2024-04-29 Thread Philippe Mathieu-Daudé
@tcg_cflags is specific to TCG accelerator, move it to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-23-phi...@linaro.org> --- accel/tcg/vcpu-state.h | 2 ++ include/hw/core/cpu.h | 4 +--- accel/tcg/cpu-exec.c | 6

[PATCH v2 10/13] accel/tcg: Remove NULL check in tcg_flush_jmp_cache()

2024-04-29 Thread Philippe Mathieu-Daudé
I /think/ this check added in commit 4e4fa6c12d ("accel/tcg: Complete cpu initialization before registration") is now unnecessary, but I don't have the WASM reproducer mentioned in: https://lore.kernel.org/qemu-devel/20221027141856.w5umjgklawgu7pqv@heavy/ to confirm. Ilya, do you mind testing? If

[PATCH v2 03/13] accel/tcg: Move @plugin_mem_cbs from CPUState to CPUNegativeOffsetState

2024-04-29 Thread Philippe Mathieu-Daudé
@plugin_mem_cbs is accessed by tcg generated code, move it to CPUNegativeOffsetState. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 2 +- include/hw/core/cpu.h | 13 +++-- include/qemu/plugin.h | 2 +- accel/tcg/plugin-gen.c | 5 +++--

[PATCH v2 08/13] accel/tcg: Move @iommu_notifiers from CPUState to TCG AccelCPUState

2024-04-29 Thread Philippe Mathieu-Daudé
@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é Reviewed-by: Richard Henderson Message-Id:

[PATCH v2 12/13] accel/tcg: Restrict icount to system emulation

2024-04-29 Thread Philippe Mathieu-Daudé
So far we don't support icount on user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-24-phi...@linaro.org> --- accel/tcg/cpu-exec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/accel/tcg/cpu-exec.c

[PATCH v2 05/13] accel/tcg: Restrict IcountDecr / can_do_io / CPUTLB to TCG

2024-04-29 Thread Philippe Mathieu-Daudé
IcountDecr union, the can_do_io field, the CPUTLB* structures and the "exec/tlb-common.h" header are only required for TCG. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-16-phi...@linaro.org> --- include/exec/tlb-common.h | 4

[PATCH v2 06/13] accel/tcg: Move @jmp_env from CPUState to TCG AccelCPUState

2024-04-29 Thread Philippe Mathieu-Daudé
@jmp_env is specific to TCG accelerator, move it to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-17-phi...@linaro.org> --- accel/tcg/internal-common.h | 1 + accel/tcg/tcg-accel-ops.h | 1 + accel/tcg/vcpu-state.h

[PATCH v2 00/13] exec: Rework around CPUState user fields (part 2)

2024-04-29 Thread Philippe Mathieu-Daudé
Missing review: 1, 3, 4, 10 Since v1: - First 13 patches queued - Restrict qemu_plugin_vcpu_exit_hook() to (TCG) plugins - Restrict cpu_plugin_mem_cbs_enabled() to TCG (plugins) - Addressed Richard review comments on the others: - Move cpu_plugin_mem_cbs_enabled() - Do not move mem_io_pc,

Re: [PATCH] MAINTAINERS: Update my email address

2024-04-29 Thread Stefano Stabellini
On Mon, 29 Apr 2024, Anthony PERARD wrote: > From: Anthony PERARD > > Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 302b6fd00c..ea9672fc52 100644 >

Re: [PATCH v2 09/12] accel/tcg: Restrict cpu_loop_exit_requested() to TCG

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 00:17, Philippe Mathieu-Daudé wrote: On 29/4/24 00:08, Richard Henderson wrote: On 4/28/24 14:49, Philippe Mathieu-Daudé wrote: cpu_loop_exit_requested() is specific to TCG, move it to "exec/translate-all.h". Signed-off-by: Philippe Mathieu-Daudé ---   include/exec/exec-all.h  

Re: [PULL 0/1] target/sparc late fix

2024-04-29 Thread Mark Cave-Ayland
On 28/04/2024 04:10, M Bazz wrote: Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0 for any user-visible changes. The 9.0 Changelog was never updated. Could someone with the permissions please add the following to the SPARC section: sparc32: Fixed a

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

2024-04-29 Thread Mark Cave-Ayland
On 29/04/2024 22:02, Richard Henderson wrote: On 4/29/24 13:52, Mark Cave-Ayland wrote: No objections here about the remainder of the series, other than that I don't have an easy/obvious way to test the new instructions... I was thinking about adding support to RISU, but the gcc compile farm

Re: [PATCH 24/24] accel/tcg: Move icount fields from CPUState to TCG AccelCPUState

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: Both @icount_budget and @icount_extra fields are specific to TCG accelerator, move them to its AccelCPUState. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/vcpu-state.h | 4 include/hw/core/cpu.h| 3 ---

Re: [PATCH 23/24] accel/tcg: Restrict icount to system emulation

2024-04-29 Thread Richard Henderson
On 4/28/24 15:14, Philippe Mathieu-Daudé wrote: So far we don't support icount on user emulation. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cpu-exec.c | 6 ++ 1 file changed, 6 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 00/24] exec: Rework around CPUState user fields (part 2)

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 00:14, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (24): exec/user: Move 'thunk.h' from 'exec/user' to 'user' coverity: Update user emulation regexp accel/tcg: Move user definition of cpu_interrupt() to user-exec.c accel/tcg: Duplicate cpu_exit() for user /

Re: [PATCH v2 0/4] Sparc CPU naming and help text improvements

2024-04-29 Thread Mark Cave-Ayland
On 19/04/2024 09:48, Thomas Huth wrote: The Sparc CPU naming and the corresponding help text is somewhat confusing for the users. We should avoid spaces in the Names and provide clear information to the users what can be passed to the "-cpu" option. While we're at it, also remove the "+" from

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

2024-04-29 Thread Richard Henderson
On 4/29/24 13:52, Mark Cave-Ayland wrote: No objections here about the remainder of the series, other than that I don't have an easy/obvious way to test the new instructions... I was thinking about adding support to RISU, but the gcc compile farm sparc machines have been down for ages, so no

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

2024-04-29 Thread Richard Henderson
On 4/29/24 12:40, Matheus Tavares Bernardino wrote: @@ -144,6 +148,9 @@ static inline void cpu_get_tb_cpu_state(CPUHexagonState *env, vaddr *pc, hex_flags = FIELD_DP32(hex_flags, TB_FLAGS, IS_TIGHT_LOOP, 1); } *flags = hex_flags; +if (*pc & PCALIGN_MASK) { +

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

2024-04-29 Thread Michael Galaxy
Reviewed-by: Michael Galaxy Thanks Yu Zhang and Peter. - Michael On 4/29/24 15:45, Yu Zhang wrote: 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

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

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

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

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

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

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

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

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

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

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

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

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

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

[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

[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

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

[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

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

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

[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

[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

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

[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

[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

[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

[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

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

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 >

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

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

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

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

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:

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

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 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/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) {

[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

[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

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

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

[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

[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

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

  1   2   3   >