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

2024-04-29 Thread Michael S. Tsirkin
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 used to disable > them when not available eve

Re: [PATCH v2 04/15] hw/riscv: add riscv-iommu-pci device

2024-04-29 Thread Frank Chang
Daniel Henrique Barboza 於 2024年3月8日 週五 上午12:04寫道: > > From: Tomasz Jeznach > > The RISC-V IOMMU can be modelled as a PCIe device following the > guidelines of the RISC-V IOMMU spec, chapter 7.1, "Integrating an IOMMU > as a PCIe device". > > Signed-off-by: Tomasz Jeznach > Signed-off-by: Daniel

[PATCH v5] riscv: thead: Add th.sxstatus CSR emulation

2024-04-29 Thread Christoph Müllner
The th.sxstatus CSR can be used to identify available custom extension on T-Head CPUs. The CSR is documented here: https://github.com/T-head-Semi/thead-extension-spec/blob/master/xtheadsxstatus.adoc An important property of this patch is, that the th.sxstatus MAEE field is not set (indicating t

Re: [PATCH v4] riscv: thead: Add th.sxstatus CSR emulation

2024-04-29 Thread Christoph Müllner
On Mon, Apr 29, 2024 at 5:29 AM Alistair Francis wrote: > > On Mon, Apr 22, 2024 at 4:53 PM Christoph Müllner > wrote: > > > > The th.sxstatus CSR can be used to identify available custom extension > > on T-Head CPUs. The CSR is documented here: > > > > https://github.com/T-head-Semi/thead-ext

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
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_QEMU_LOCK_GUARD(&s->error_mutex) { -error_report_err(s->error); +if (m

[PATCH v4 1/4] 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

[PATCH v4 2/4] 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

[PATCH v4 0/4] 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". v4: - add r-b and a-b by Fabiano and Markus - improve wording in 04 as Markus suggested v3: - don't refactor

[PATCH v4 3/4] 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 | 20 +++- 1 file changed, 11 insertions(+

[PATCH v4 4/4] 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

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

2024-04-29 Thread Markus Armbruster
fan writes: > On Fri, Apr 26, 2024 at 11:12:50AM +0200, Markus Armbruster wrote: >> nifan@gmail.com writes: [...] >> > diff --git a/qapi/cxl.json b/qapi/cxl.json >> > index 4281726dec..2dcf03d973 100644 >> > --- a/qapi/cxl.json >> > +++ b/qapi/cxl.json >> > @@ -361,3 +361,72 @@ >> > ## >>

Re: [PATCH v4] target/riscv: Implement dynamic establishment of custom decoder

2024-04-29 Thread Huang Tao
On 2024/4/29 11:51, Alistair Francis wrote: On Thu, Mar 14, 2024 at 7:23 PM Huang Tao wrote: In this patch, we modify the decoder to be a freely composable data structure instead of a hardcoded one. It can be dynamically builded up according to the extensions. This approach has several benefi

[PATCH] hw/char/stm32l4x5_usart: Fix memory corruption by adding correct class_size

2024-04-29 Thread Thomas Huth
"make check-qtest-aarch64" recently started failing on FreeBSD builds, and valgrind on Linux also detected that there is something fishy with the new stm32l4x5-usart: The code forgot to set the correct class_size here, so the various class_init functions in this file wrote beyond the allocated buff

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

2024-04-29 Thread Eugenio Perez Martin
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 Si-Wei Liu wrote: > > >>

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 24.04.24 14:48, 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 to the guest or just not available (not supported by vh

Re: [PATCH] hw/char/stm32l4x5_usart: Fix memory corruption by adding correct class_size

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 09:59, Thomas Huth wrote: "make check-qtest-aarch64" recently started failing on FreeBSD builds, and valgrind on Linux also detected that there is something fishy with the new stm32l4x5-usart: The code forgot to set the correct class_size here, so the various class_init functions in th

Re: [PULL 20/38] accel/whpx: Use accel-specific per-vcpu @dirty field

2024-04-29 Thread Philippe Mathieu-Daudé
On 28/4/24 22:12, Volker Rümelin wrote: Am 26.04.24 um 21:41 schrieb Philippe Mathieu-Daudé: WHPX has a specific use of the CPUState::vcpu_dirty field (CPUState::vcpu_dirty is not used by common code). To make this field accel-specific, add and use a new @dirty variable in the AccelCPUState stru

Re: [PATCH v4] target/riscv: Implement dynamic establishment of custom decoder

2024-04-29 Thread Huang Tao
On 2024/4/29 15:58, Huang Tao wrote: On 2024/4/29 11:51, Alistair Francis wrote: On Thu, Mar 14, 2024 at 7:23 PM Huang Tao wrote: In this patch, we modify the decoder to be a freely composable data structure instead of a hardcoded one. It can be dynamically builded up according to the exten

Re: [PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Markus Armbruster
Daniil Tatianin writes: > This can be used to force-synchronize the time in guest after a long > stop-cont pause, which can be useful for serverless-type workload. > > Also add a comment to highlight the fact that this (and one other QMP > command) only works for the MC146818 RTC controller. > >

Re: [PATCH v3 5/5] qapi: introduce CONFIG_READ event

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
On 24.04.24 15:11, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Send a new event when guest reads virtio-pci config after virtio_notify_config() call. That's useful to check that guest fetched modified config, for example after resizing disk backend. Signed-off-by: Vladimir

[PATCH 0/2] accel: Fix NULL deref in NVMM / WHPX vCPU init

2024-04-29 Thread Philippe Mathieu-Daudé
Fix recently introduced NULL deref in NVMM/WHPX vCPU init() handlers. Philippe Mathieu-Daudé (2): accel/whpx: Fix NULL dereference in whpx_init_vcpu() accel/nvmm: Fix NULL dereference in nvmm_init_vcpu() target/i386/nvmm/nvmm-all.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- 2 files changed,

[PATCH 1/2] accel/whpx: Fix NULL dereference in whpx_init_vcpu()

2024-04-29 Thread Philippe Mathieu-Daudé
When mechanically moving the @dirty field to AccelCPUState in commit 9ad49538c7, we neglected cpu->accel is still NULL when we want to dereference it. Fixes: 9ad49538c7 ("accel/whpx: Use accel-specific per-vcpu @dirty field") Reported-by: Volker Rümelin Suggested-by: Volker Rümelin Signed-off-by

[PATCH 2/2] accel/nvmm: Fix NULL dereference in nvmm_init_vcpu()

2024-04-29 Thread Philippe Mathieu-Daudé
When mechanically moving the @dirty field to AccelCPUState in commit 79f1926b2d, we neglected cpu->accel is still NULL when we want to dereference it. Reported-by: Volker Rümelin Suggested-by: Volker Rümelin Fixes: 79f1926b2d ("accel/nvmm: Use accel-specific per-vcpu @dirty field") Signed-off-by

Re: [PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Daniil Tatianin
On 4/29/24 11:51 AM, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only wo

Re: [PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 11:34, Daniil Tatianin wrote: On 4/29/24 11:51 AM, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact tha

[PATCH v2] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Daniil Tatianin
This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only works for the MC146818 RTC controller. Signed-off-by: Daniil Tatianin --- C

Re: [PATCH 2/2] target/riscv: do not set mtval2 for non guest-page faults

2024-04-29 Thread Daniel Henrique Barboza
On 4/13/24 07:59, Alexei Filippov wrote: Previous patch fixed the PMP priority in raise_mmu_exception() but we're still setting mtval2 incorrectly. In riscv_cpu_tlb_fill(), after pmp check in 2 stage translation part, mtval2 will be set in case of successes 2 stage translation but failed pmp

Re: [PATCH] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Philippe Mathieu-Daudé
On 26/4/24 11:48, Philippe Mathieu-Daudé wrote: Hi Daniil, Markus, On 26/4/24 10:39, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Signed-off-by: Daniil

Re: [PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Daniil Tatianin
On 4/29/24 12:40 PM, Philippe Mathieu-Daudé wrote: On 29/4/24 11:34, Daniil Tatianin wrote: On 4/29/24 11:51 AM, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type wo

Re: [PATCH v1] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 11:43, Daniil Tatianin wrote: On 4/29/24 12:40 PM, Philippe Mathieu-Daudé wrote: On 29/4/24 11:34, Daniil Tatianin wrote: On 4/29/24 11:51 AM, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont pause,

Re: [PATCH v2] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 11:41, Daniil Tatianin wrote: This can be used to force-synchronize the time in guest after a long stop-cont pause, which can be useful for serverless-type workload. Also add a comment to highlight the fact that this (and one other QMP command) only works for the MC146818 RTC controll

[PATCH] .gitlab-ci.d/cirrus.yml: Shorten the runtime of the macOS and FreeBSD jobs

2024-04-29 Thread Thomas Huth
Cirrus-CI introduced limitations to the free CI minutes. To avoid that we are consuming them too fast, let's drop the usual targets that are not that important since they are either a subset of another target (like i386 or ppc being a subset of x86_64 or ppc64 respectively), or since there is still

Re: [PATCH] qga: Re-enable the qga-ssh-test when running without fuzzing

2024-04-29 Thread Konstantin Kostiuk
Reviewed-by: Konstantin Kostiuk On Fri, Apr 26, 2024 at 7:23 PM Thomas Huth wrote: > According to the comment in qga/meson.build, the test got disabled > since there were problems with the fuzzing job. But instead of > disabling this test completely, we should still be fine running > it when

Re: [PATCH v2 1/1] stubs: Add missing qga stubs

2024-04-29 Thread Konstantin Kostiuk
Hi Paolo, Are you ok if I merge this patch with other QGA patches? Or don't you agree with this version of the patch? Best Regards, Konstantin Kostiuk. On Fri, Apr 26, 2024 at 3:15 PM Konstantin Kostiuk wrote: > Compilation QGA without system and user fails > ./configure --disable-system --di

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
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 to the guest or just not available (not supported by vhost-user server). Command result is racy if allow it during migration. Let's allow th

[PATCH v4 2/3] vhost-user-blk: split vhost_user_blk_sync_config()

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Split vhost_user_blk_sync_config() out from vhost_user_blk_handle_config_change(), to be reused in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/block/vhost-user-blk.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/hw/bl

[PATCH v4 1/3] qdev-monitor: add option to report GenericError from find_device_state

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Here we just prepare for the following patch, making possible to report GenericError as recommended. This patch doesn't aim to prevent further use of DeviceNotFound by future interfaces: - find_device_state() is used in blk_by_qdev_id() and qmp_get_blk() functions, which may lead to spread of

[PATCH v4 0/3] vhost-user-blk: live resize additional APIs

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
v4: Fixes 01-02 from v3 are already merged. 02: new, split out from 03 03: refacting vhost_user_blk_handle_config_change() split out to 02 drop current_run_state_str() helper some rewordings (Markus) Vladimir Sementsov-Ogievskiy (3): qdev-monitor: add option to report GenericError from f

Re: [PATCH 0/3] Remove useless architecture prefix from the CPU list

2024-04-29 Thread Philippe Mathieu-Daudé
On 22/4/24 10:22, Thomas Huth wrote: On 22/04/2024 10.03, Daniel P. Berrangé wrote: On Sat, Apr 20, 2024 at 07:46:03AM +0200, Thomas Huth wrote: Printing an architecture prefix in front of each CPU name is not helpful at all: It is confusing for the users since they don't know whether they have

Re: [PATCH 0/3] Make it possible to compile the x86 binaries without FDC

2024-04-29 Thread Kevin Wolf
[ Cc: qemu-block ] Am 25.04.2024 um 20:43 hat Thomas Huth geschrieben: > For downstream versions of QEMU, we'd like to be able to compile QEMU > without the FDC code included (since it's not required for modern VMs > anymore and the FDC code has rather a bad reputation, see the VENOM CVE). > > Th

Re: [PATCH v2 06/33] accel/tcg: Record mmio bytes during translation

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:31, Richard Henderson wrote: This will be able to replace plugin_insn_append, and will be usable for disassembly. Signed-off-by: Richard Henderson --- include/exec/translator.h | 12 accel/tcg/translator.c| 41 +++ 2 files c

Re: [PATCH v2 07/33] accel/tcg: Record when translator_fake_ldb is used

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:31, Richard Henderson wrote: Remove left-over command from commit dcd092a063 ("accel/tcg: Improve can_do_io management"). Signed-off-by: Richard Henderson --- include/exec/translator.h | 3 ++- accel/tcg/translator.c| 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)

Re: [PATCH v2 1/1] stubs: Add missing qga stubs

2024-04-29 Thread Thomas Huth
On 29/04/2024 12.09, Konstantin Kostiuk wrote: Hi Paolo, Are you ok if I merge this patch with other QGA patches? Or don't you agree with this version of the patch? Phil asked me in IRC to pick this patch up, so I'll include it in my next pull request. Thomas

Re: [PATCH v2 09/33] plugins: Copy memory in qemu_plugin_insn_data

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:31, Richard Henderson wrote: Instead of returning a host pointer, copy the data into storage provided by the caller. Signed-off-by: Richard Henderson --- include/qemu/qemu-plugin.h | 15 +++ contrib/plugins/execlog.c | 5 +++-- contrib/plugins/howvec.c | 4 ++-

Re: [PATCH v2 11/33] plugins: Use translator_st for qemu_plugin_insn_data

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:31, Richard Henderson wrote: Use the bytes that we record for the entire TB, rather than a per-insn GByteArray. Record the length of the insn in plugin_gen_insn_end rather than infering from the length of the array. Signed-off-by: Richard Henderson --- include/qemu/plugin.h |

Re: [PATCH v2 12/33] plugins: Read mem_only directly from TB cflags

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:31, Richard Henderson wrote: Do not pass around a boolean between multiple structures, just read it from the TranslationBlock in the TCGContext. Signed-off-by: Richard Henderson --- include/exec/plugin-gen.h | 7 +++ include/qemu/plugin.h | 3 --- accel/tcg/plugin-ge

Re: [PATCH v2 23/33] target/hexagon: Use translator_ldl in pkt_crosses_page

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

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

2024-04-29 Thread Markus Armbruster
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 backend to the device. It >>> may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not >>> triggered interrupt

Re: [PATCH v2 00/33] accel/tcg: Improve disassembly for target and plugin

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:30, Richard Henderson wrote: Based-on: 20240424230224.941028-1-richard.hender...@linaro.org ("[PATCH v3 00/20] Rewrite plugin code generation") Cc'ing qemu-s390x@ for these 3 patches: Richard Henderson (32): target/s390x: Fix translator_fake_ld length target/s390x: Disa

Re: [PATCH v2 29/33] target/riscv: Use translator_ld* for everything

2024-04-29 Thread Philippe Mathieu-Daudé
Cc'ing qemu-riscv@ On 25/4/24 01:31, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target/riscv/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index c999e942e1..2c27fd4ce1 100644 --- a/

Re: [PATCH v3 01/20] tcg: Make tcg/helper-info.h self-contained

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:02, Richard Henderson wrote: Move MAX_CALL_IARGS from tcg.h and include for the define of TCG_TARGET_REG_BITS. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/tcg/helper-info.h | 3 +++ include/tcg/tcg.h | 2 -- tcg/tci.c | 1 +

Re: [PATCH v3 04/20] plugins: Move function pointer in qemu_plugin_dyn_cb

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:02, Richard Henderson wrote: 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 Signed-off-by: Richard Henderson --- includ

Re: [PATCH v3 02/20] tcg: Pass function pointer to tcg_gen_call*

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 01:02, Richard Henderson wrote: 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 Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 21 +++

Re: [PATCH 6.1.y] virtio_net: Do not send RSS key if it is not supported

2024-04-29 Thread Greg KH
On Wed, Apr 24, 2024 at 03:57:04AM -0700, Konstantin Ovsepian wrote: > From: Breno Leitao > > commit 059a49aa2e25c58f90b50151f109dd3c4cdb3a47 upstream > > There is a bug when setting the RSS options in virtio_net that can break > the whole machine, getting the kernel into an infinite loop. > >

Re: [PATCH v6 08/10] util/bufferiszero: Simplify test_buffer_is_zero_next_accel

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 00:57, Richard Henderson wrote: Because the three alternatives are monotonic, we don't need to keep a couple of bitmasks, just identify the strongest alternative at startup. Signed-off-by: Richard Henderson --- util/bufferiszero.c | 56 ++---

Re: [PATCH v6 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-04-29 Thread Philippe Mathieu-Daudé
Cc'ing Ard :) On 25/4/24 00:57, Richard Henderson wrote: Because non-embedded aarch64 is expected to have AdvSIMD enabled, merely double-check with the compiler flags for __ARM_NEON and don't bother with a runtime check. Otherwise, model the loop after the x86 SSE2 function. Use UMAXV for the

Patch "virtio_net: Do not send RSS key if it is not supported" has been added to the 6.1-stable tree

2024-04-29 Thread gregkh
This is a note to let you know that I've just added the patch titled virtio_net: Do not send RSS key if it is not supported to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Re: [PATCH v6 10/10] tests/bench: Add bufferiszero-bench

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 00:57, Richard Henderson wrote: Benchmark each acceleration function vs an aligned buffer of zeros. Signed-off-by: Richard Henderson --- tests/bench/bufferiszero-bench.c | 47 tests/bench/meson.build | 1 + 2 files changed, 48 insertions

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

2024-04-29 Thread Michael Tokarev
29.04.2024 06:25, Jeuk Kim wrote: From: Jeuk Kim It fixes the buffer overflow vulnerability in the ufs device. The bug was detected by sanitizers. ... Resolves: #2299 Fixes: 329f16624499 ("hw/ufs: Support for Query Transfer Requests") Reported-by: Zheyu Ma Signed-off-by: Jeuk Kim Cc: qem

Re: [PATCH v6 07/10] util/bufferiszero: Introduce biz_accel_fn typedef

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 00:57, Richard Henderson wrote: Signed-off-by: Richard Henderson --- util/bufferiszero.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) @@ -178,13 +179,15 @@ buffer_zero_avx2(const void *buf, size_t len) } #endif /* CONFIG_AVX2_OPT */ + + Spurious new

Re: [PATCH v6 02/10] util/bufferiszero: Remove AVX512 variant

2024-04-29 Thread Daniel P . Berrangé
On Wed, Apr 24, 2024 at 03:56:57PM -0700, Richard Henderson wrote: > From: Alexander Monakov > > Thanks to early checks in the inline buffer_is_zero wrapper, the SIMD > routines are invoked much more rarely in normal use when most buffers > are non-zero. This makes use of AVX512 unprofitable, as

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

2024-04-29 Thread Jonah Palmer
On 4/29/24 4: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 S

Re: [PATCH v2] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 29/4/24 11:41, Daniil Tatianin wrote: >> This can be used to force-synchronize the time in guest after a long >> stop-cont pause, which can be useful for serverless-type workload. >> Also add a comment to highlight the fact that this (and one other QMP >> comma

Re: [PATCH v6 02/10] util/bufferiszero: Remove AVX512 variant

2024-04-29 Thread Alexander Monakov
On Mon, 29 Apr 2024, Daniel P. Berrangé wrote: > On Wed, Apr 24, 2024 at 03:56:57PM -0700, Richard Henderson wrote: > > From: Alexander Monakov > > > > Thanks to early checks in the inline buffer_is_zero wrapper, the SIMD > > routines are invoked much more rarely in normal use when most buffers

Re: [PATCH] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Daniil, Markus, > > On 26/4/24 10:39, Markus Armbruster wrote: >> Daniil Tatianin writes: >> >>> This can be used to force-synchronize the time in guest after a long >>> stop-cont pause, which can be useful for serverless-type workload. >>> >>> Signed-off-by:

[PATCH 1/1] vhost-vsock: add VIRTIO_F_RING_PACKED to feaure_bits

2024-04-29 Thread Halil Pasic
Not having VIRTIO_F_RING_PACKED in feature_bits[] is a problem when the vhost-vsock device does not offer the feature bit VIRTIO_F_RING_PACKED but the in QEMU device is configured to try to use the packed layout (the virtio property "packed" is on). As of today, the Linux kernel vhost-vsock devic

[PULL 0/6] Block jobs patches for 2024-04-29

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
The following changes since commit fd87be1dada5672f877e03c2ca8504458292c479: Merge tag 'accel-20240426' of https://github.com/philmd/qemu into staging (2024-04-26 15:28:13 -0700) are available in the Git repository at: https://gitlab.com/vsementsov/qemu.git tags/pull-block-jobs-2024-04-29

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
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-Ogievskiy --- .../qemu-iotests/tests/backup-discard-s

[PULL 1/6] blockcommit: Reopen base image as RO after abort

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
From: Alexander Ivanov If a blockcommit is aborted the base image remains in RW mode, that leads to a fail of subsequent live migration. How to reproduce: $ virsh snapshot-create-as vm snp1 --disk-only *** write something to the disk inside the guest *** $ virsh blockcommit vm vda --acti

[PULL 2/6] block/copy-before-write: fix permission

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
In case when source node does not have any parents, the condition still works as required: backup job do create the parent by block_job_create -> block_job_add_bdrv -> bdrv_root_attach_child Still, in this case checking @perm variable doesn't work, as backup job creates the root blk with empty

[PULL 3/6] block/copy-before-write: support unligned snapshot-discard

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
First thing that crashes on unligned access here is bdrv_reset_dirty_bitmap(). Correct way is to align-down the snapshot-discard request. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Fiona Ebner Tested-by: Fiona Ebner Message-Id: <20240313152822.626493-3-vsement...@yandex-team.ru> S

[PULL 5/6] qapi: blockdev-backup: add discard-source parameter

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Add a parameter that enables discard-after-copy. That is mostly useful in "push backup with fleecing" scheme, when source is snapshot-access format driver node, based on copy-before-write filter snapshot-access API: [guest] [snapshot-access] ~~ blockdev-backup ~~> [backup target] |

[PULL 4/6] block/copy-before-write: create block_copy bitmap in filter node

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Currently block_copy creates copy_bitmap in source node. But that is in bad relation with .independent_close=true of copy-before-write filter: source node may be detached and removed before .bdrv_close() handler called, which should call block_copy_state_free(), which in turn should remove copy_bit

Re: [PULL 0/6] Block jobs patches for 2024-04-29

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
Sorry for too much CC-ing, I've mistakenly added --cc-cmd=./scripts/get_maintainer.pl On 29.04.24 14:51, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit fd87be1dada5672f877e03c2ca8504458292c479: Merge tag 'accel-20240426' of https://github.com/philmd/qemu into stagin

Re: [PATCH v2 00/12] exec: Rework around CPUState user fields

2024-04-29 Thread Philippe Mathieu-Daudé
On 28/4/24 23:49, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (12): plugins: Update stale comment plugins/api: Only include 'exec/ram_addr.h' with system emulation exec: Include missing license in 'exec/cpu-common.h' exec/cpu: Indent TARGET_PAGE_foo definitions exec/cpu:

Re: [PULL 6/9] backends/cryptodev-builtin: Fix local_error leaks

2024-04-29 Thread Richard Henderson
On 4/28/24 23:45, Michael Tokarev wrote: From: Li Zhijian via Please fix the author on this patch. r~ It seems that this error does not need to be propagated to the upper, directly output the error to avoid the leaks Closes: https://gitlab.com/qemu-project/qemu/-/issues/2283 Fixes: 2fda10

Re: [PATCH v6 06/10] util/bufferiszero: Improve scalar variant

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 00:57, Richard Henderson wrote: Split less-than and greater-than 256 cases. Use unaligned accesses for head and tail. Avoid using out-of-bounds pointers in loop boundary conditions. Signed-off-by: Richard Henderson --- util/bufferiszero.c | 85 +++---

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

2024-04-29 Thread Vladimir Sementsov-Ogievskiy
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 backend to the device. It may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG fail

Re: [PATCH v4 1/1] hw/arm/sbsa-ref: Enable CPU cluster on ARM sbsa machine

2024-04-29 Thread Richard Henderson
On 4/28/24 23:35, Marcin Juszkiewicz wrote: W dniu 26.04.2024 o 18:06, Richard Henderson pisze: Isn't this basically what MPIDR_EL1 is supposed to indicate? We do not yet implement all of that in QEMU, but should. QEMU has socket/cluster/core/thread model which could map to aff3/aff2/aff1/aff

Re: [PATCH 0/2] accel: Fix NULL deref in NVMM / WHPX vCPU init

2024-04-29 Thread Richard Henderson
On 4/29/24 02:19, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (2): accel/whpx: Fix NULL dereference in whpx_init_vcpu() accel/nvmm: Fix NULL dereference in nvmm_init_vcpu() Reviewed-by: Richard Henderson r~

[PULL v2 0/9] Trivial patches for 2024-04-29

2024-04-29 Thread Michael Tokarev
The following changes since commit fd87be1dada5672f877e03c2ca8504458292c479: Merge tag 'accel-20240426' of https://github.com/philmd/qemu into staging (2024-04-26 15:28:13 -0700) are available in the Git repository at: https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches for you to

[PULL v2 6/9] backends/cryptodev-builtin: Fix local_error leaks

2024-04-29 Thread Michael Tokarev
From: Li Zhijian It seems that this error does not need to be propagated to the upper, directly output the error to avoid the leaks Closes: https://gitlab.com/qemu-project/qemu/-/issues/2283 Fixes: 2fda101de07 ("virtio-crypto: Support asynchronous mode") Signed-off-by: Li Zhijian Reviewed-by: P

Re: [PATCH v6 06/10] util/bufferiszero: Improve scalar variant

2024-04-29 Thread Richard Henderson
On 4/29/24 05:18, Philippe Mathieu-Daudé wrote: + +    t = ldq_he_p(buf) | ldq_he_p(buf + len - 8); Here we read #0 and #31, ... +    p = QEMU_ALIGN_PTR_DOWN(buf + 8, 8); +    e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 8); + +    /* Read 0 to 31 aligned words from the middle. */ ... so here is

Re: [PATCH v3] vfio/pci: migration: Skip config space check for Vendor Specific Information in VSC during restore/load

2024-04-29 Thread Cédric Le Goater
Hello Vinayak, On 3/28/24 10:30, Cédric Le Goater wrote: On 3/27/24 21:52, Alex Williamson wrote: On Wed, 27 Mar 2024 16:11:37 -0400 "Michael S. Tsirkin" wrote: On Wed, Mar 27, 2024 at 11:39:15AM -0600, Alex Williamson wrote: On Fri, 22 Mar 2024 12:12:10 +0530 Vinayak Kale wrote: In case

Re: [PATCH v6 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-04-29 Thread Philippe Mathieu-Daudé
On 25/4/24 00:57, Richard Henderson wrote: Because non-embedded aarch64 is expected to have AdvSIMD enabled, merely double-check with the compiler flags for __ARM_NEON and don't bother with a runtime check. Otherwise, model the loop after the x86 SSE2 function. Use UMAXV for the vector reductio

Re: [PATCH 1/3] target/ppc: Move VMX storage access instructions to decodetree

2024-04-29 Thread Richard Henderson
On 4/28/24 22:13, Chinmay Rath wrote: +static bool trans_LVX(DisasContext *ctx, arg_X *a) +{ +TCGv EA; +TCGv_i64 avr; +REQUIRE_INSNS_FLAGS(ctx, ALTIVEC); +REQUIRE_VECTOR(ctx); +gen_set_access_type(ctx, ACCESS_INT); +avr = tcg_temp_new_i64(); +EA = do_ea_calc(ctx, a->ra

Re: [PATCH 2/3] target/ppc: Move VMX integer logical instructions to decodetree.

2024-04-29 Thread Richard Henderson
On 4/28/24 22:13, Chinmay Rath wrote: Moving the following instructions to decodetree specification: v{and, andc, nand, or, orc, nor, xor, eqv} : VX-form The changes were verified by validating that the tcp ops generated by those instructions remain the same, which were captured wi

Re: [PATCH 3/3] target/ppc: Move VMX integer max/min instructions to decodetree.

2024-04-29 Thread Richard Henderson
On 4/28/24 22:13, Chinmay Rath wrote: Moving the following instructions to decodetree specification : v{max, min}{u, s}{b, h, w, d} : VX-form The changes were verified by validating that the tcg ops generated by those instructions remain the same, which were captured with the '-d in_a

[RFC] vhost-blk: add a vhost_blk implementation

2024-04-29 Thread inspurisinspur
From: Rock Li vhost-blk could accelerate io for high-performance devices such as NVME, or high end SAN backend. The main benefit is that syscall costs are eliminated because vhost-blk could bypass the qemu io processing. This patch works along with vhost-blk implementation in kernel. Signed-off-

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

2024-04-29 Thread Markus Armbruster
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 backend to the device. I

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

2024-04-29 Thread Fabiano Rosas
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_QEMU_LOCK_GUARD(&s->erro

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

2024-04-29 Thread Michael Galaxy
Hi All (and Peter), 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 original author of the RDMA implementation. I've been discussing with Yu Zhang for a lit

Re: [PATCH v6 06/10] util/bufferiszero: Improve scalar variant

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 14:31, Richard Henderson wrote: On 4/29/24 05:18, Philippe Mathieu-Daudé wrote: + +    t = ldq_he_p(buf) | ldq_he_p(buf + len - 8); Here we read #0 and #31, ... +    p = QEMU_ALIGN_PTR_DOWN(buf + 8, 8); +    e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 8); + +    /* Read 0 to 31 aligned

Re: [PATCH] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Philippe Mathieu-Daudé
(+Peter who has more experience on such design). On 29/4/24 13:32, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: Hi Daniil, Markus, On 26/4/24 10:39, Markus Armbruster wrote: Daniil Tatianin writes: This can be used to force-synchronize the time in guest after a long stop-cont

Re: [PULL 0/1] ufs queue

2024-04-29 Thread Stefan Hajnoczi
0) > > are available in the Git repository at: > > https://gitlab.com/jeuk20.kim/qemu.git tags/pull-ufs-20240429 > > for you to fetch changes up to f2c8aeb1afefcda92054c448b21fc59cdd99db30: > > hw/ufs

[PULL 0/1] Block patches

2024-04-29 Thread Stefan Hajnoczi
The following changes since commit fd87be1dada5672f877e03c2ca8504458292c479: Merge tag 'accel-20240426' of https://github.com/philmd/qemu into staging (2024-04-26 15:28:13 -0700) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for you to

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

2024-04-29 Thread Stefan Hajnoczi
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 \ file=null-co://,if=none,id=disk0 -device ufs,id=ufs

Re: [PULL 0/1] ufs queue

2024-04-29 Thread Richard Henderson
6 15:28:13 -0700) are available in the Git repository at: https://gitlab.com/jeuk20.kim/qemu.git tags/pull-ufs-20240429 for you to fetch changes up to f2c8aeb1afefcda92054c448b21fc59cdd99db30: hw/ufs: Fix buffer overflow bug (2024-04-29 12:1

Re: [PATCH] mc146818rtc: add a way to generate RTC interrupts via QMP

2024-04-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > (+Peter who has more experience on such design). > > On 29/4/24 13:32, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: [...] >>> IMO to avoid any future ambiguity (in heterogeneous machines), this >>> command must take a QOM device path (or a list of

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

2024-04-29 Thread Philippe Mathieu-Daudé
On 29/4/24 00: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

  1   2   3   >