Re: [PATCH 2/3] virtio-net: Convert feature properties to OnOffAuto

2024-05-01 Thread Akihiko Odaki
On 2024/05/01 0:02, Yuri Benditovich wrote: Question: How will libvirt (as an example) work with this change. In the existing semantic of libvirt profile the "on" means "on if possible" and using existing profile after qemu update will still use "on" with meaning "force"? > Typically this is solv

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

2024-05-01 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 12:16, Philippe Mathieu-Daudé wrote: On 30/4/24 10:56, 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 ---   m

Re: [PATCH 0/3] virtio-net: Convert feature properties to OnOffAuto

2024-05-01 Thread Akihiko Odaki
On 2024/04/29 16:05, Michael S. Tsirkin wrote: On Sun, Apr 28, 2024 at 04:21:06PM +0900, Akihiko Odaki wrote: Based-on: <20240428-rss-v10-0-73cbaa91a...@daynix.com> ("[PATCH v10 00/18] virtio-net RSS/hash report fixes and improvements") Some features are not always available, and virtio-net use

[PULL 8/9] qga: Refactor common SSH functions

2024-05-01 Thread Konstantin Kostiuk
From: aidaleuc Message-Id: <20240424144029.30665-2-aidan_le...@selinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit In preparation of a Windows implementation, move the non-POSIX specific code to commands-common-ssh. Signed-off-by: Aidan Leuck

[PULL 5/9] qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper

2024-05-01 Thread Konstantin Kostiuk
From: Andrey Drobyshev There's no need to check for the existence of the hook executable, as the exec() call will do that for us. Signed-off-by: Andrey Drobyshev Reviewed-by: Daniel P. Berrangé Reviewed-by: Konstantin Kostiuk Link: https://lore.kernel.org/r/20240320161648.158226-6-andrey.dro

[PULL 6/9] qga/commands-posix: don't do fork()/exec() when suspending via sysfs

2024-05-01 Thread Konstantin Kostiuk
From: Andrey Drobyshev Since commit 246d76eba ("qga: guest_suspend: decoupling pm-utils and sys logic") pm-utils logic is running in a separate child from the sysfs logic. Now when suspending via sysfs we don't really need to do that in a separate process as we only need to perform one write to

[PULL 0/9] QGA misc changes for 2024-05-01

2024-05-01 Thread Konstantin Kostiuk
The following changes since commit 9c6c079bc6723da8061ccfb44361d67b1dd785dd: Merge tag 'pull-target-arm-20240430' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-04-30 09:58:54 -0700) are available in the Git repository at: https://github.com/kostyanf14/qemu.git tags/

[PULL 2/9] qga: introduce ga_run_command() helper for guest cmd execution

2024-05-01 Thread Konstantin Kostiuk
From: Andrey Drobyshev When executing guest commands in *nix environment, we repeat the same fork/exec pattern multiple times. Let's just separate it into a single helper which would also be able to feed input data into the launched process' stdin. This way we can avoid code duplication. To ke

[PULL 9/9] qga: Implement SSH commands for Windows

2024-05-01 Thread Konstantin Kostiuk
From: aidaleuc Signed-off-by: Aidan Leuck Tested-by: Dehan Meng Reviewed-by: Konstantin Kostiuk Link: https://lore.kernel.org/r/20240424144029.30665-3-aidan_le...@selinc.com Signed-off-by: Konstantin Kostiuk --- qga/commands-windows-ssh.c | 712 + qga/comm

[PULL 4/9] qga/commands-posix: qmp_guest_set_time: use ga_run_command helper

2024-05-01 Thread Konstantin Kostiuk
From: Andrey Drobyshev There's no need to check for the existence of "/sbin/hwclock", the exec() call will do that for us. Signed-off-by: Andrey Drobyshev Reviewed-by: Daniel P. Berrangé Reviewed-by: Konstantin Kostiuk Link: https://lore.kernel.org/r/20240320161648.158226-5-andrey.drobys...@

[PULL 1/9] qga: guest-get-fsinfo: add optional 'total-bytes-privileged' field

2024-05-01 Thread Konstantin Kostiuk
From: Andrey Drobyshev Since the commit 25b5ff1a86 ("qga: add mountpoint usage info to GuestFilesystemInfo") we have 2 values reported in guest-get-fsinfo: used = (f_blocks - f_bfree), total = (f_blocks - f_bfree + f_bavail) as returned by statvfs(3). While on Windows guests that's all we can ge

[PULL 3/9] qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper

2024-05-01 Thread Konstantin Kostiuk
From: Andrey Drobyshev Also remove the G_GNUC_UNUSED attribute added in the previous commit from the helper. Signed-off-by: Andrey Drobyshev Reviewed-by: Daniel P. Berrangé Reviewed-by: Konstantin Kostiuk Link: https://lore.kernel.org/r/20240320161648.158226-4-andrey.drobys...@virtuozzo.com

[PULL 7/9] qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper

2024-05-01 Thread Konstantin Kostiuk
From: Andrey Drobyshev There's no need to check for the existence of the "chpasswd", "pw" executables, as the exec() call will do that for us. Signed-off-by: Andrey Drobyshev Reviewed-by: Daniel P. Berrangé Reviewed-by: Konstantin Kostiuk Link: https://lore.kernel.org/r/20240320161648.158226

[PATCH] qemu-keymap: Free xkb allocations

2024-05-01 Thread Akihiko Odaki
main(int argc, char *argv[]) xkb_state_unref(state); state = NULL; +xkb_keymap_unref(map); +xkb_context_unref(ctx); + /* add quirks */ fprintf(outfile, "\n" --- base-commit: c25df57ae8f9fe1c72eee2dab37d76d904ac382e change-id: 20240501-xkb-258483cc

Re: [PATCH v4 3/3] qapi: introduce device-sync-config

2024-05-01 Thread Vladimir Sementsov-Ogievskiy
On 30.04.24 11:31, Vladimir Sementsov-Ogievskiy wrote: On 30.04.24 11:19, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command to sync config from vhost-user backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not triggered interrupt

Re: [PATCH v2 01/10] meson: Add optional dependency on IGVM library

2024-05-01 Thread Roy Hopkins
On Tue, 2024-04-16 at 15:13 +0100, Daniel P. Berrangé wrote: > On Wed, Apr 03, 2024 at 12:11:32PM +0100, Roy Hopkins wrote: > > The IGVM library allows Independent Guest Virtual Machine files to be > > parsed and processed. IGVM files are used to configure guest memory > > layout, initial processor

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

2024-05-01 Thread Joao Martins
On 30/04/2024 06:16, Avihai Horon wrote: > 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 applica

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

2024-05-01 Thread Joao Martins
On 30/04/2024 06:16, Avihai Horon wrote: > 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 c

Re: [PATCH v2 03/15] hw/riscv: add RISC-V IOMMU base emulation

2024-05-01 Thread Jason Chien
Daniel Henrique Barboza 於 2024/3/8 上午 12:03 寫道: From: Tomasz Jeznach The RISC-V IOMMU specification is now ratified as-per the RISC-V international process. The latest frozen specifcation can be found at: https://github.com/riscv-non-isa/riscv-iommu/releases/download/v1.0/riscv-iommu.pdf Add t

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

2024-05-01 Thread Avihai Horon
On 01/05/2024 14:50, Joao Martins wrote: External email: Use caution opening links or attachments On 30/04/2024 06:16, Avihai Horon wrote: 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, duri

Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing

2024-05-01 Thread Dario Binacchi
Hello Richard, On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson wrote: > > On 4/30/24 09:47, Dario Binacchi wrote: > > The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not > > always provided by the libc (uClibc). The patch disables its compilation > > in case the header is not a

Re: [PATCH] hw/nvme: Add support for setting the MQES for the NVMe emulation

2024-05-01 Thread Berg, John
On Thu, 2024-04-04 at 15:01 +0200, Klaus Jensen wrote: > On Apr  4 13:04, John Berg wrote: > > From: John Berg > > > > The MQES field in the CAP register describes the Maximum Queue > > Entries > > Supported for the IO queues of an NVMe controller. Adding a +1 to > > the > > value in this field r

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

2024-05-01 Thread Avihai Horon
On 01/05/2024 14:50, Joao Martins wrote: External email: Use caution opening links or attachments On 30/04/2024 06:16, Avihai Horon wrote: 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 upd

RE: [PATCH v3 11/19] backends/iommufd: Implement HostIOMMUDeviceClass::check_cap() handler

2024-05-01 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH v3 11/19] backends/iommufd: Implement >HostIOMMUDeviceClass::check_cap() handler > >On 4/30/24 12:06, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Cédric Le Goater >>> Subject: Re: [PATCH v3 11/19

Re: [PATCH] hw/nvme: Add support for setting the MQES for the NVMe emulation

2024-05-01 Thread Klaus Jensen
On May 1 12:27, Berg, John wrote: > On Thu, 2024-04-04 at 15:01 +0200, Klaus Jensen wrote: > > On Apr  4 13:04, John Berg wrote: > > > From: John Berg > > > > > > The MQES field in the CAP register describes the Maximum Queue > > > Entries > > > Supported for the IO queues of an NVMe controller.

RE: [PATCH intel_iommu 0/7] FLTS for VT-d

2024-05-01 Thread Duan, Zhenzhong
Ah, this is a duplicate effort on stage-1 translation. Hi Clement, We had ever sent a rfcv1 series "intel_iommu: Enable stage-1 translation" for both emulated and passthrough device, link: https://lists.gnu.org/archive/html/qemu-devel/2024-01/msg02740.html which now evolves to rfcv2, link: https:

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

2024-05-01 Thread Nicholas Piggin
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. > > > > The ADU unit actually implements XSCOM, which is the bridge between MMIO > > and PIB. However it also includes cont

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

2024-05-01 Thread Nicholas Piggin
On Wed Apr 17, 2024 at 10:25 PM AEST, Cédric Le Goater wrote: > On 4/17/24 13:02, Nicholas Piggin wrote: > > One of the functions of the ADU is indirect memory access engines that > > send and receive data via ADU registers. > > > > This implements the ADU LPC memory access functionality sufficien

Re: [PATCH v2 3/4] hw/nvme: Support SR-IOV VFs more than 127

2024-05-01 Thread Klaus Jensen
On Apr 1 04:30, Minwoo Im wrote: > From: Minwoo Im > > The number of virtual functions(VFs) supported in SR-IOV is 64k as per > spec. To test a large number of MSI-X vectors mapping to CPU matrix in > the QEMU system, we need much more than 127 VFs. This patch made > support for 256 VFs per a

Re: [PATCH v4 2/4] target/sh4: Fix SUBV opcode

2024-05-01 Thread Yoshinori Sato
On Wed, 01 May 2024 01:31:23 +0900, Philippe Mathieu-Daudé wrote: > > The documentation says: > > SUBV Rm, RnRn - Rm -> Rn, underflow -> T > > The overflow / underflow can be calculated as: > > T = ((Rn ^ Rm) & (Result ^ Rn)) >> 31 > > However we were using the incorrect: > > T

Re: [PATCH v4 1/4] target/sh4: Fix ADDV opcode

2024-05-01 Thread Yoshinori Sato
On Wed, 01 May 2024 01:31:22 +0900, Philippe Mathieu-Daudé wrote: > > The documentation says: > > ADDV Rm, RnRn + Rm -> Rn, overflow -> T > > But QEMU implementation was: > > ADDV Rm, RnRn + Rm -> Rm, overflow -> T > > Fix by filling the correct Rm register. > > Add tests

Re: [PATCH v4 3/4] target/sh4: Rename TCGv variables as manual for ADDV opcode

2024-05-01 Thread Yoshinori Sato
On Wed, 01 May 2024 01:31:24 +0900, Philippe Mathieu-Daudé wrote: > > To easily compare with the SH4 manual, rename: > > REG(B11_8) -> Rn > REG(B7_4) -> Rm > t0 -> result > > Mention how overflow is calculated. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Richard Henderson >

[PATCH 0/3] target/ppc: Fixes and updates for sync instructions

2024-05-01 Thread Nicholas Piggin
I forgot I needed to do this, I tried adding new POWER10 sync instructions to the kernel and patch got nacked because it crashed with TCG. Unfortuantely I don't think our old decoder does a great job with handling reserved bits like this, but decodetree makes this kind of thing much easier. I'll

Re: [PATCH v4 4/4] target/sh4: Rename TCGv variables as manual for SUBV opcode

2024-05-01 Thread Yoshinori Sato
On Wed, 01 May 2024 01:31:25 +0900, Philippe Mathieu-Daudé wrote: > > To easily compare with the SH4 manual, rename: > > REG(B11_8) -> Rn > REG(B7_4) -> Rm > t0 -> result > > Mention how underflow is calculated. > > Reviewed-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé

[PATCH 3/3] target/ppc: Add ISA v3.1 variants of sync instruction

2024-05-01 Thread Nicholas Piggin
POWER10 adds a new field to sync for store-store syncs, and some new variants of the existing syncs that include persistent memory. Implement the store-store syncs and plwsync/phwsync. Signed-off-by: Nicholas Piggin --- target/ppc/insn32.decode | 6 ++-- target/ppc/translate/misc-i

[PATCH 2/3] target/ppc: Fix embedded memory barriers

2024-05-01 Thread Nicholas Piggin
Memory barriers are supposed to do something on BookE systems, these were probably just missed during MTTCG enablement, maybe no targets support SMP. Either way, add proper BookE implementations. Signed-off-by: Nicholas Piggin --- target/ppc/translate/misc-impl.c.inc | 4 ++-- 1 file changed, 2

[PATCH 1/3] target/ppc: Move sync instructions to decodetree

2024-05-01 Thread Nicholas Piggin
This tries to faithfully reproduce the odd BookE logic. It does change the handling of non-zero reserved bits outside the defined fields from being illegal to being ignored, which the architecture specifies ot help with backward compatibility of new fields. The existing behaviour causes illegal in

Re: [PATCH v2 01/10] ppc/pseries: Add Power11 cpu type

2024-05-01 Thread Aditya Gupta
Hi Cédric, > diff --git a/target/ppc/cpu-models.h b/target/ppc/cpu-models.h index 0229ef3a9a5c..a1b540c3aa9e 100644 --- a/target/ppc/cpu-models.h +++ b/target/ppc/cpu-models.h @@ -354,6 +354,7 @@ enum {    CPU_POWERPC_POWER10_BASE   = 0x0080,    CPU_POWERPC_POWER10_DD1    = 0

Re: [PATCH v2 03/10] ppc/pnv: Add a Power11 Pnv11Chip, and a Power11 Machine

2024-05-01 Thread Aditya Gupta
Hello Cédric, Sorry I missed this mail earlier. @@ -1846,7 +1863,11 @@ static void pnv_chip_power10_quad_realize(Pnv10Chip *chip10, Error **errp)    for (i = 0; i < chip10->nr_quads; i++) {    PnvQuad *eq = &chip10->quads[i]; -    pnv_chip_quad_realize_one(chip, eq, chip->cores[

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

2024-05-01 Thread Aditya Gupta
Hello David, On 29/04/24 07:14, David Gibson wrote: On Fri, Apr 26, 2024 at 04:32:18PM +0200, 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

Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing

2024-05-01 Thread Richard Henderson
On 5/1/24 05:18, Dario Binacchi wrote: Hello Richard, On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson wrote: On 4/30/24 09:47, Dario Binacchi wrote: The fp-bench test (i. e. tests/fp/fp-bench.c) use fenv.h that is not always provided by the libc (uClibc). The patch disables its compilation

Re: [PATCH v2] hw/s390x: Attach the sclpconsole to /machine/sclp/s390-sclp-event-facility

2024-05-01 Thread Eric Farman
On Tue, 2024-04-30 at 21:08 +0200, Thomas Huth wrote: > The sclpconsole currently does not have a proper parent in the QOM > tree, so it shows up under /machine/unattached - which is somewhat > ugly. We should rather attach it to /machine/sclp/s390-sclp-event- > facility > where the other devices o

Re: [PATCH 1/1] tests/fp/meson: don't build fp-bench test if fenv.h is missing

2024-05-01 Thread Dario Binacchi
Hello Richard, On Wed, May 1, 2024 at 3:31 PM Richard Henderson wrote: > > On 5/1/24 05:18, Dario Binacchi wrote: > > Hello Richard, > > > > On Tue, Apr 30, 2024 at 8:15 PM Richard Henderson > > wrote: > >> > >> On 4/30/24 09:47, Dario Binacchi wrote: > >>> The fp-bench test (i. e. tests/fp/fp-b

[PULL 01/20] tcg: Make tcg/helper-info.h self-contained

2024-05-01 Thread Richard Henderson
Move MAX_CALL_IARGS from tcg.h and include for the define of TCG_TARGET_REG_BITS. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/helper-info.h | 3 +++ include/tcg/tcg.h | 2 -- tcg/tci.c | 1 + 3 files chan

[PULL 00/20] tcg patch queue

2024-05-01 Thread Richard Henderson
u.git tags/pull-tcg-20240501 for you to fetch changes up to 917d7f8d948d706e275c9f33169b9dd0149ded1e: plugins: Update the documentation block for plugin-gen.c (2024-04-30 16:12:05 -0700) plugins: Rewrite plugin tcg

[PULL 08/20] plugins: Add PLUGIN_GEN_AFTER_TB

2024-05-01 Thread Richard Henderson
Delay test of plugin_tb->mem_helper until the inject pass. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plu

[PULL 04/20] plugins: Move function pointer in qemu_plugin_dyn_cb

2024-05-01 Thread Richard Henderson
The out-of-line function pointer is mutually exclusive with inline expansion, so move it into the union. Wrap the pointer in a structure named 'regular' to match PLUGIN_CB_REGULAR. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qemu/pl

[PULL 09/20] plugins: Use emit_before_op for PLUGIN_GEN_FROM_INSN

2024-05-01 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 1 - accel/tcg/plugin-gen.c | 286 ++--- plugins/api.c | 8 +- 3 files changed, 67 insertions(+), 228 deletions(-) diff --git a/include/qemu/plugin.h b/in

[PULL 05/20] plugins: Create TCGHelperInfo for all out-of-line callbacks

2024-05-01 Thread Richard Henderson
TCGHelperInfo includes the ABI for every function call. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 1 + plugins/core.c| 51 ++- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/includ

[PULL 19/20] plugins: Inline plugin_gen_empty_callback

2024-05-01 Thread Richard Henderson
Each caller can use tcg_gen_plugin_cb directly. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index c0cbc26984..d914d64

[PULL 18/20] plugins: Merge qemu_plugin_tb_insn_get to plugin-gen.c

2024-05-01 Thread Richard Henderson
Merge qemu_plugin_insn_alloc and qemu_plugin_tb_insn_get into plugin_gen_insn_start, since it is used nowhere else. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 39 --- accel/tcg/plugin-gen.c | 39 +++

[PULL 16/20] plugins: Replace pr_ops with a proper debug dump flag

2024-05-01 Thread Richard Henderson
The DEBUG_PLUGIN_GEN_OPS ifdef is replaced with "-d op_plugin". The second pr_ops call can be obtained with "-d op". Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/qemu/log.h | 1 + include/tcg/tcg.h | 1 + accel/tcg/plugin-gen.c | 67 +++--

[PULL 17/20] plugins: Split out common cb expanders

2024-05-01 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 84 +- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 49d9b07438..5b63b93114 100644 --- a/acc

[PULL 20/20] plugins: Update the documentation block for plugin-gen.c

2024-05-01 Thread Richard Henderson
Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 31 --- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index d914d64de0..3db74ae9bf 100644 --- a/accel/tcg/plugi

[PULL 07/20] plugins: Use emit_before_op for PLUGIN_GEN_FROM_TB

2024-05-01 Thread Richard Henderson
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. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 96 +

[PULL 14/20] plugins: Simplify callback queues

2024-05-01 Thread Richard Henderson
We have qemu_plugin_dyn_cb.type to differentiate the various callback types, so we do not need to keep them in separate queues. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 35 ++-- accel/tcg/plugin-gen.c | 90 ++

[PULL 11/20] plugins: Remove plugin helpers

2024-05-01 Thread Richard Henderson
These placeholder helpers are no longer required. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- accel/tcg/plugin-helpers.h | 5 - include/exec/helper-gen-common.h | 4 include/exec/helper-proto-common.h | 4 accel/tcg/plugin-gen.c | 20

[PULL 10/20] plugins: Use emit_before_op for PLUGIN_GEN_FROM_MEM

2024-05-01 Thread Richard Henderson
Introduce a new plugin_mem_cb op to hold the address temp and meminfo computed by tcg-op-ldst.c. Because this now has its own opcode, we no longer need PLUGIN_GEN_FROM_MEM. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/plugin-gen.h | 4 - include/tcg/tcg-o

[PULL 02/20] tcg: Pass function pointer to tcg_gen_call*

2024-05-01 Thread Richard Henderson
For normal helpers, read the function pointer from the structure earlier. For plugins, this will allow the function pointer to come from elsewhere. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 21 +---

[PULL 12/20] tcg: Remove TCG_CALL_PLUGIN

2024-05-01 Thread Richard Henderson
Since we no longer emit plugin helpers during the initial code translation phase, we don't need to specially mark plugin helpers. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 -- plugins/core.c| 10 -- tcg/tcg.c | 4 +--- 3 files

[PULL 06/20] plugins: Use emit_before_op for PLUGIN_GEN_AFTER_INSN

2024-05-01 Thread Richard Henderson
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. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/tcg/tcg-op-common.h | 1 +

[PULL 03/20] plugins: Zero new qemu_plugin_dyn_cb entries

2024-05-01 Thread Richard Henderson
Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- plugins/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/core.c b/plugins/core.c index 11ca20e626..4487cb7c48 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -307,7 +307,7 @@ static struct qemu_pl

[PULL 13/20] tcg: Remove INDEX_op_plugin_cb_{start,end}

2024-05-01 Thread Richard Henderson
These opcodes are no longer used. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/tcg/tcg-op-common.h | 2 -- include/tcg/tcg-opc.h | 2 -- accel/tcg/plugin-gen.c | 18 -- tcg/tcg-op.c| 10 -- 4 files changed, 32 de

Re: [PATCH v2 01/10] ppc/pseries: Add Power11 cpu type

2024-05-01 Thread Aditya Gupta
Hi Cédric, Skiboot reports : [    0.121234172,6] P11 DD1.00 detected It is a DD2.0, with major revision = 0x2, and minor revision = 0. Might need some change in skiboot. Will post a v3 series with changes. The issue was in QEMU, not skiboot. QEMU sets CFAM id for Power10 as DD1.0 (hw/pp

[PULL 15/20] plugins: Introduce PLUGIN_CB_MEM_REGULAR

2024-05-01 Thread Richard Henderson
Use different enumerators for vcpu_udata and vcpu_mem callbacks. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/qemu/plugin.h | 1 + accel/tcg/plugin-gen.c | 2 +- plugins/core.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includ

Re: [PULL 5/5] virtio-gpu: fix scanout migration post-load

2024-05-01 Thread Peter Xu
On Tue, Apr 30, 2024 at 02:30:19PM +0200, Fiona Ebner wrote: > Am 12.03.24 um 15:02 schrieb marcandre.lur...@redhat.com: > > From: Marc-André Lureau > > > > The current post-loading code for scanout has a FIXME: it doesn't take > > the resource region/rect into account. But there is more, when ad

Re: [PATCH v7 09/12] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-05-01 Thread Jonathan Cameron via
> > >> > +# @hid: host id > > >> > > >> @host-id, unless "HID" is established terminology in CXL DCD land. > > > > > > host-id works. > > >> > > >> What is a host ID? > > > > > > It is an id identifying the host to which the capacity is being added. > > > > How are these IDs assign

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

2024-05-01 Thread Peter Xu
On Tue, Apr 30, 2024 at 09:00:49AM +0100, Daniel P. Berrangé wrote: > On Tue, Apr 30, 2024 at 09:15:03AM +0200, Markus Armbruster wrote: > > Peter Xu writes: > > > > > On Mon, Apr 29, 2024 at 08:08:10AM -0500, Michael Galaxy wrote: > > >> Hi All (and Peter), > > > > > > Hi, Michael, > > > > > >>

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

2024-05-01 Thread Peter Xu
On Tue, Apr 30, 2024 at 11:00:24AM -0300, Fabiano Rosas wrote: > Philippe Mathieu-Daudé writes: > > > (Cc'ing migration maintainers) > > > > On 30/4/24 03:23, Song Gao wrote: > >> vmstate does not save kvm_state_conter, > >> which can cause VM recovery from disk to fail. > > > > Cc: qemu-sta...@n

Re: [PATCH v3 0/6] migration removals & deprecations

2024-05-01 Thread Peter Xu
On Tue, Apr 30, 2024 at 11:27:31AM -0300, Fabiano Rosas wrote: > since v2: > > - removed some more stuff which I missed: >blk/inc options from hmp-commands.hx >the entire ram-compress.h >unused declarations from options.h >unused compression functions from qemu-file.c > > - remove

Re: [PATCH v4 01/17] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2024-05-01 Thread David Hildenbrand
On 30.04.24 18:49, Edgar E. Iglesias wrote: From: Juergen Gross qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so modify qemu_ram_ptr_length() a little bit and use it for qemu_map_ram_ptr(), too. Signed-off-by: Juergen Gross Signed-off-by: Vikram Garhwal Signed-off-by: E

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

2024-05-01 Thread Daniel P . Berrangé
On Wed, May 01, 2024 at 11:31:13AM -0400, Peter Xu wrote: > What I worry more is whether this is really what we want to keep rdma in > qemu, and that's also why I was trying to request for some serious > performance measurements comparing rdma v.s. nics. And here when I said > "we" I mean both QEM

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

2024-05-01 Thread Peter Xu
On Tue, Apr 30, 2024 at 11:56:41AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 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". There seem to have one

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

2024-05-01 Thread Peter Xu
On Wed, May 01, 2024 at 04:59:38PM +0100, Daniel P. Berrangé wrote: > On Wed, May 01, 2024 at 11:31:13AM -0400, Peter Xu wrote: > > What I worry more is whether this is really what we want to keep rdma in > > qemu, and that's also why I was trying to request for some serious > > performance measure

Re: [PATCH v10 2/2] tpm: add backend for mssim

2024-05-01 Thread James Bottomley
On Tue, 2024-04-30 at 17:12 -0400, Stefan Berger wrote: > On 4/30/24 15:08, James Bottomley wrote: [...] > > +The mssim backend supports snapshotting and migration by not > > resetting > > I don't thing snapshotting is supported because snapshooting would > require you to be able to set the state

Re: [PATCH v10 2/2] tpm: add backend for mssim

2024-05-01 Thread Stefan Berger
On 5/1/24 12:21, James Bottomley wrote: On Tue, 2024-04-30 at 17:12 -0400, Stefan Berger wrote: On 4/30/24 15:08, James Bottomley wrote: [...] +The mssim backend supports snapshotting and migration by not resetting I don't thing snapshotting is supported because snapshooting would require

Re: [PATCH v4 13/17] softmmu: Pass RAM MemoryRegion and is_write xen_map_cache()

2024-05-01 Thread Peter Xu
On Tue, Apr 30, 2024 at 06:49:35PM +0200, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Propagate MR and is_write to xen_map_cache(). > This is in preparation for adding support for grant mappings. > > No functional change. > > Signed-off-by: Edgar E. Iglesias Acked-by: Peter Xu

Re: [PATCH v4 01/17] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2024-05-01 Thread Peter Xu
On Tue, Apr 30, 2024 at 06:49:23PM +0200, Edgar E. Iglesias wrote: > From: Juergen Gross > > qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so > modify qemu_ram_ptr_length() a little bit and use it for > qemu_map_ram_ptr(), too. > > Signed-off-by: Juergen Gross > Signed-off

Re: [PATCH v10 2/2] tpm: add backend for mssim

2024-05-01 Thread James Bottomley
On Wed, 2024-05-01 at 12:31 -0400, Stefan Berger wrote: > > > On 5/1/24 12:21, James Bottomley wrote: > > On Tue, 2024-04-30 at 17:12 -0400, Stefan Berger wrote: > > > On 4/30/24 15:08, James Bottomley wrote: > > [...] > > > > +The mssim backend supports snapshotting and migration by not > > > >

Re: [PATCH v10 2/2] tpm: add backend for mssim

2024-05-01 Thread Stefan Berger
On 5/1/24 12:52, James Bottomley wrote: On Wed, 2024-05-01 at 12:31 -0400, Stefan Berger wrote: On 5/1/24 12:21, James Bottomley wrote: On Tue, 2024-04-30 at 17:12 -0400, Stefan Berger wrote: On 4/30/24 15:08, James Bottomley wrote: [...] +The mssim backend supports snapshotting and mig

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-01 Thread Marcin Juszkiewicz
W dniu 22.04.2024 o 17:21, Richard Henderson pisze: For Arm's CPUs they fall into two categories:   * older ones don't set MT in their MPIDR, and the Aff0     field is effectively the CPU number   * newer ones do set MT in their MPIDR, but don't have     SMT, so their Aff0 is always 0 and their A

Re: [PATCH v10 2/2] tpm: add backend for mssim

2024-05-01 Thread James Bottomley
On Wed, 2024-05-01 at 13:20 -0400, Stefan Berger wrote: > > > On 5/1/24 12:52, James Bottomley wrote: > > On Wed, 2024-05-01 at 12:31 -0400, Stefan Berger wrote: > > > > > > > > > On 5/1/24 12:21, James Bottomley wrote: > > > > On Tue, 2024-04-30 at 17:12 -0400, Stefan Berger wrote: > > > > > O

[PATCH 02/14] hw/arm: convert 'virt' machine definitions to use new macros

2024-05-01 Thread Daniel P . Berrangé
This changes the DEFINE_VIRT_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. Signed-off-by: Daniel P. Berrangé --- hw/arm/virt.c | 28 +++- 1 file changed, 15 insertions(+), 13 delet

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

2024-05-01 Thread Daniel P . Berrangé
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 couple of helpers to improve the clarity of such code macro. Signed-off-by: Daniel P. Berrangé --- include/hw/b

[PATCH 00/14] hw: define and enforce a standard lifecycle for versioned machines

2024-05-01 Thread Daniel P . Berrangé
Thomas proposed a new deprecation and removal policy for versioned machine types that would see them liable for deletion after 6 years: https://lists.nongnu.org/archive/html/qemu-devel/2024-04/msg04683.html This suggest was met with broad approval, however, I suggested that we could take it fur

[PATCH 05/14] hw/m68k: convert 'virt' machine definitions to use new macros

2024-05-01 Thread Daniel P . Berrangé
This changes the DEFINE_VIRT_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. A DEFINE_VIRT_MACHINE_AS_LATEST helper is added so that it is not required to pass 'false' for every single historical machine type

[PATCH 09/14] hw: temporarily disable deletion of versioned machine types

2024-05-01 Thread Daniel P . Berrangé
The new deprecation and deletion policy for versioned machine types is being introduced in QEMU 9.1.0. Under the new policy a number of old machine types (any prior to 2.12) would be liable for immediate deletion which would be a violation of our historical deprecation and removal policy Thus aut

[PATCH 07/14] hw/i386: convert 'q35' machine definitions to use new macros

2024-05-01 Thread Daniel P . Berrangé
This changes the DEFINE_Q35_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number thrice in three different formats in the calls to DEFINE_Q

[PATCH 08/14] include/hw: add macros for deprecation & removal of versioned machines

2024-05-01 Thread Daniel P . Berrangé
Versioned machines live for a long time to provide back compat for incoming migration and restore of saved images. To guide users away from usage of old machines, however, we want to deprecate any older than 3 years (equiv of 9 releases), and delete any older than 6 years (equiva of 18 releases).

[PATCH 04/14] hw/ppc: convert 'spapr' machine definitions to use new macros

2024-05-01 Thread Daniel P . Berrangé
This changes the DEFINE_SPAPR_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number twice in two different formats in the calls to DEFINE_SP

[PATCH 03/14] hw/s390x: convert 'ccw' machine definitions to use new macros

2024-05-01 Thread Daniel P . Berrangé
This changes the DEFINE_CCW_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number twice in two different formats in the calls to DEFINE_CCW_

[PATCH 13/14] hw/i386: remove obsolete manual deprecation reason string of i440fx machines

2024-05-01 Thread Daniel P . Berrangé
The automatic deprecation mechanism introduced in the preceeding patches will mark every i440fx machine upto and including 2.12 as deprecated. As such we can revert the manually added deprecation which was a subset: commit c7437f0ddb8ee45bf96d949ddfcbb7697ae3d415 Author: Thomas Huth Date:

[PATCH 11/14] hw: skip registration of outdated versioned machine types

2024-05-01 Thread Daniel P . Berrangé
This calls the MACHINE_VER_DELETION() macro in the machine type registration method, so that when a versioned machine type reaches the end of its life, it is no longer registered with QOM and thus cannot be used. The actual definition of the machine type should be deleted at this point, but experi

[PATCH 14/14] docs: document special exception for machine type deprecation & removal

2024-05-01 Thread Daniel P . Berrangé
This extends the deprecation policy to indicate that versioned machine types will be marked deprecated after 3 years, and then subject to removal after a further 3 years has passed. Signed-off-by: Daniel P. Berrangé --- docs/about/deprecated.rst | 12 1 file changed, 12 insertions(+

[PATCH 10/14] hw: set deprecation info for all versioned machine types

2024-05-01 Thread Daniel P . Berrangé
This calls the MACHINE_VER_DEPRECATION() macro in the definition of all machine type classes which support versioning. This ensures that they will automatically get deprecation info set when they reach the appropriate point in their lifecycle. Signed-off-by: Daniel P. Berrangé --- hw/arm/virt.c

[PATCH 12/14] hw/ppc: remove obsolete manual deprecation reason string of spapr machines

2024-05-01 Thread Daniel P . Berrangé
The automatic deprecation mechanism introduced in the preceeding patches will mark every spapr machine upto and including 2.12 as deprecated. As such we can revert the manually added deprecation which was a subset: commit 1392617d35765d5d912625fbb5cab1ffbed8e140 Author: Cédric Le Goater Dat

[PATCH 06/14] hw/i386: convert 'i440fx' machine definitions to use new macros

2024-05-01 Thread Daniel P . Berrangé
This changes the DEFINE_I440FX_MACHINE macro to use the common helpers for constructing versioned symbol names and strings, bringing greater consistency across targets. The added benefit is that it avoids the need to repeat the version number thrice in three different formats in the calls to DEFIN

Re: [PATCH v4 07/14] util/dsa: Implement DSA task asynchronous submission and wait for completion.

2024-05-01 Thread Peter Xu
On Thu, Apr 25, 2024 at 02:21:10AM +, Hao Xiang wrote: > +/** > + * @brief Performs buffer zero comparison on a DSA batch task asynchronously. > + * > + * @param batch_task A pointer to the batch task. > + * @param buf An array of memory buffers. > + * @param count The number of buffers in the

Re: [PATCH v8 07/11] virtio-gpu: Support suspension of commands processing

2024-05-01 Thread Dmitry Osipenko
On 4/27/24 08:48, Akihiko Odaki wrote: >> >> The VIRTIO_GPU_FILL_CMD() macro returns void and this macro is used by >> every function processing commands. Changing process_cmd() to return >> bool will require to change all those functions. Not worthwhile to >> change it, IMO. > >> The flag reflects

Re: [PATCH v4 09/14] migration/multifd: Prepare to introduce DSA acceleration on the multifd path.

2024-05-01 Thread Peter Xu
On Thu, Apr 25, 2024 at 02:21:12AM +, Hao Xiang wrote: > 1. Refactor multifd_send_thread function. > 2. Introduce the batch task structure in MultiFDSendParams. > > Signed-off-by: Hao Xiang > --- > include/qemu/dsa.h | 51 +++-- > migration/multifd.c

  1   2   >