Re: [PATCH] migration: Simplify initial conditionals in migration for better readability

2024-01-03 Thread Het Gala
Ping. In-case this patch has been missed out. Waiting for other maintainers to respond. Thanks! On 11/12/23 6:43 pm, Het Gala wrote: Ping? Waiting for other maintainers to respond on this patch On 05/12/23 6:28 pm, Fabiano Rosas wrote: Het Gala writes: The inital conditional statements in

Re: [PATCH v6 05/11] virtio-gpu: Introduce virgl_gpu_resource structure

2024-01-03 Thread Huang Rui
On Tue, Jan 02, 2024 at 07:52:04PM +0800, Marc-André Lureau wrote: > Hi > > On Tue, Dec 19, 2023 at 11:55 AM Huang Rui wrote: > > > > Introduce a new virgl_gpu_resource data structure and helper functions > > for virgl. It's used to add new member which is specific for virgl in > > following

[PATCH] hw/virtio: Add ioeventfd option for balloon

2024-01-03 Thread 沈哲赟
Traditional mmio in balloon makes Qemu do balloon inflation in the same thread as vcpu thread. In a CPU overcommitment scenario, host may run more than one vcpu threads on one host CPU, which makes madvise_dontneed_free() wait for a long time due to the function cond_resched() at host side. If

[PATCH] docs/system/riscv: sifive_u: Update S-mode U-Boot image build instructions

2024-01-03 Thread Bin Meng
Currently, the documentation outlines the process for building the S-mode U-Boot image using `make menuconfig` and manual actions within the menuconfig UI. However, this approach is fragile due to Kconfig options potentially changing across different releases. For example, CONFIG_OF_PRIOR_STAGE

Re: [PATCH for 9.0 08/12] vdpa: add vhost_vdpa_load_setup

2024-01-03 Thread Peter Xu
On Wed, Jan 03, 2024 at 12:11:19PM +0100, Eugenio Perez Martin wrote: > On Wed, Jan 3, 2024 at 7:16 AM Peter Xu wrote: > > > > On Tue, Jan 02, 2024 at 12:28:48PM +0100, Eugenio Perez Martin wrote: > > > On Tue, Jan 2, 2024 at 6:33 AM Peter Xu wrote: > > > > > > > > Jason, Eugenio, > > > > > > >

Re: [PATCH v13 18/26] target/riscv: add 'rva22u64' CPU

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:56 PM Daniel Henrique Barboza wrote: > > This CPU was suggested by Alistair [1] and others during the profile > design discussions. It consists of the bare 'rv64i' CPU with rva22u64 > enabled by default, like an alias of '-cpu rv64i,rva22u64=true'. > > Users now have an

Re: [PATCH v13 17/26] riscv-qmp-cmds.c: add profile flags in cpu-model-expansion

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:56 PM Daniel Henrique Barboza wrote: > > Expose all profile flags for all CPUs when executing > query-cpu-model-expansion. This will allow callers to quickly determine > if a certain profile is implemented by a given CPU. This includes vendor > CPUs - the fact that they

Re: [PATCH v13 16/26] target/riscv/tcg: validate profiles during finalize

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:57 PM Daniel Henrique Barboza wrote: > > Enabling a profile and then disabling some of its mandatory extensions > is a valid use. It can be useful for debugging and testing. But the > common expected use of enabling a profile is to enable all its mandatory > extensions.

Re: [PATCH v13 14/26] target/riscv/tcg: add hash table insert helpers

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:57 PM Daniel Henrique Barboza wrote: > > Previous patches added several g_hash_table_insert() patterns. Add two > helpers, one for each user hash, to make the code cleaner. > > Signed-off-by: Daniel Henrique Barboza > Reviewed-by: Andrew Jones Reviewed-by: Alistair

Re: [RFC PATCH v2 1/6] target/riscv: Remove obsolete pointer masking extension code.

2024-01-03 Thread Alistair Francis
On Tue, Dec 19, 2023 at 2:54 AM Alexey Baturo wrote: > > Hi Alistair, > > Thanks for the lightning fast reply! > Could you please tell who should bump those numbers and to what values? Just increment them by 1 > Do you think I could submit this patch series for the review? Yes, I think so

Re: [PATCH v13 10/26] target/riscv/tcg: add user flag for profile support

2024-01-03 Thread Alistair Francis
On Tue, Dec 19, 2023 at 12:09 AM Daniel Henrique Barboza wrote: > > The TCG emulation implements all the extensions described in the > RVA22U64 profile, both mandatory and optional. The mandatory extensions > will be enabled via the profile flag. We'll leave the optional > extensions to be

Re: [PATCH v2 1/1] docs/system/riscv: document acpi parameter of virt machine

2024-01-03 Thread Alistair Francis
On Thu, Dec 21, 2023 at 6:03 AM Heinrich Schuchardt wrote: > > Since QEMU v8.0.0 the RISC-V virt machine has a switch to disable ACPI > table generation. Add it to the documentation. > > Fixes: 168b8c29cedb ("hw/riscv/virt: Add a switch to disable ACPI") > Signed-off-by: Heinrich Schuchardt

Re: [PATCH v2 1/1] docs/system/riscv: document acpi parameter of virt machine

2024-01-03 Thread Alistair Francis
On Thu, Dec 21, 2023 at 6:03 AM Heinrich Schuchardt wrote: > > Since QEMU v8.0.0 the RISC-V virt machine has a switch to disable ACPI > table generation. Add it to the documentation. > > Fixes: 168b8c29cedb ("hw/riscv/virt: Add a switch to disable ACPI") > Signed-off-by: Heinrich Schuchardt

Re: [PATCH 0/2] Add support for (ratified) Zacas extension

2024-01-03 Thread Alistair Francis
On Fri, Dec 8, 2023 at 1:40 AM Rob Bradford wrote: > > The Zacas extension is now ratified: > https://github.com/riscv/riscv-zacas > > This series uses a patch from Weiwei Li from: > https://github.com/plctlab/plct-qemu/tree/plct-zacas-dev with the > following changes: > > * Fixed destination

Re: [PATCH 1/2] target/riscv: Add support for Zacas extension

2024-01-03 Thread Alistair Francis
On Fri, Dec 8, 2023 at 1:40 AM Rob Bradford wrote: > > From: Weiwei Li > > Add support for amocas.w/d/q instructions which are part of the ratified > Zacas extension: https://github.com/riscv/riscv-zacas > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Signed-off-by: Rob Bradford

Re: [PATCH v13 07/26] riscv-qmp-cmds.c: expose named features in cpu_model_expansion

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:57 PM Daniel Henrique Barboza wrote: > > Named features (zic64b the sole example at this moment) aren't expose to > users, thus we need another way to expose them. > > Go through each named feature, get its boolean value, do the needed > conversions (bool to qbool,

Re: [PATCH v13 06/26] target/riscv/tcg: add 'zic64b' support

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:54 PM Daniel Henrique Barboza wrote: > > zic64b is defined in the RVA22U64 profile [1] as a named feature for > "Cache blocks must be 64 bytes in size, naturally aligned in the address > space". It's a fantasy name for 64 bytes cache blocks. The RVA22U64 > profile

Re: [PATCH v1 0/7] migration cleanups and testing improvements

2024-01-03 Thread Peter Xu
On Fri, Nov 24, 2023 at 01:14:25PM -0300, Fabiano Rosas wrote: > Hi, > > These are some general cleanups and improvements to testing and > debugging that I collected over the past month. > > Fabiano Rosas (7): > migration/multifd: Remove MultiFDPages_t::packet_num > migration/multifd: Remove

Re: [PATCH] migration: fix coverity migrate_mode finding

2024-01-03 Thread Peter Xu
On Mon, Nov 13, 2023 at 12:23:45PM -0800, Steve Sistare wrote: > Coverity diagnoses a possible out-of-range array index here ... > > static GSList *migration_blockers[MIG_MODE__MAX]; > > fill_source_migration_info() { > GSList *cur_blocker = migration_blockers[migrate_mode()]; >

Re: [PATCH 00/11] migration: Misc cleanups and fixes

2024-01-03 Thread Peter Xu
On Sun, Dec 31, 2023 at 11:30:05AM +0200, Avihai Horon wrote: > Hi, > > This series contains misc cleanups and fixes in migration code that I > noticed while going over the code. queued. -- Peter Xu

Re: [PATCH V9 00/12] fix migration of suspended runstate

2024-01-03 Thread Peter Xu
On Wed, Jan 03, 2024 at 12:05:29PM -0800, Steve Sistare wrote: > Migration of a guest in the suspended runstate is broken. The incoming > migration code automatically tries to wake the guest, which is wrong; > the guest should end migration in the same runstate it started. Further, > after

[PULL 26/26] migration: fix coverity migrate_mode finding

2024-01-03 Thread peterx
From: Steve Sistare Coverity diagnoses a possible out-of-range array index here ... static GSList *migration_blockers[MIG_MODE__MAX]; fill_source_migration_info() { GSList *cur_blocker = migration_blockers[migrate_mode()]; ... because it does not know that MIG_MODE__MAX will

[PULL 25/26] migration/multifd: Remove unnecessary usage of local Error

2024-01-03 Thread peterx
From: Avihai Horon According to Error API, usage of ERRP_GUARD() or a local Error instead of errp is needed if errp is passed to void functions, where it is later dereferenced to see if an error occurred. There are several places in multifd.c that use local Error although it is not needed.

[PULL 18/26] migration: Remove errp parameter in migration_fd_process_incoming()

2024-01-03 Thread peterx
From: Avihai Horon Errp parameter in migration_fd_process_incoming() is unused. Remove it. Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20231231093016.14204-5-avih...@nvidia.com Signed-off-by: Peter Xu --- migration/migration.h | 2 +-

[PULL 23/26] migration: Fix migration_channel_read_peek() error path

2024-01-03 Thread peterx
From: Avihai Horon migration_channel_read_peek() calls qio_channel_readv_full() and handles both cases of return value == 0 and return value < 0 the same way, by calling error_setg() with errp. However, if return value < 0, errp is already set, so calling error_setg() with errp will lead to an

[PULL 11/26] tests/qtest: migration events

2024-01-03 Thread peterx
From: Steve Sistare Define a state object to capture events seen by migration tests, to allow more events to be captured in a subsequent patch, and simplify event checking in wait_for_migration_pass. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by:

[PULL 17/26] migration: Refactor migration_incoming_setup()

2024-01-03 Thread peterx
From: Avihai Horon Commit 6720c2b32725 ("migration: check magic value for deciding the mapping of channels") extracted the only code that could fail in migration_incoming_setup(). Now migration_incoming_setup() can't fail, so refactor it to return void and remove errp parameter. Signed-off-by:

[PULL 21/26] migration/multifd: Fix leaking of Error in TLS error flow

2024-01-03 Thread peterx
From: Avihai Horon If there is an error in multifd TLS handshake task, multifd_tls_outgoing_handshake() retrieves the error with qio_task_propagate_error() but never frees it. Fix it by freeing the obtained Error. In addition, the error is not reported at all, so report it with

[PULL 20/26] migration/multifd: Simplify multifd_channel_connect() if else statement

2024-01-03 Thread peterx
From: Avihai Horon The else branch in multifd_channel_connect() is redundant because when the if branch is taken the function returns. Simplify the code by removing the else branch. Signed-off-by: Avihai Horon Reviewed-by: Philippe Mathieu-Daudé Link:

[PULL 04/26] cpus: stop vm in suspended runstate

2024-01-03 Thread peterx
From: Steve Sistare Currently, a vm in the suspended state is not completely stopped. The VCPUs have been paused, but the cpu clock still runs, and runstate notifiers for the transition to stopped have not been called. This causes problems for live migration. Stale cpu timers_state is saved

[PULL 22/26] migration/multifd: Remove error_setg() in migration_ioc_process_incoming()

2024-01-03 Thread peterx
From: Avihai Horon If multifd_load_setup() fails in migration_ioc_process_incoming(), error_setg() is called with errp. This will lead to an assert because in that case errp already contains an error. Fix it by removing the redundant error_setg(). Fixes: 6720c2b32725 ("migration: check magic

[PULL 14/26] tests/qtest: postcopy migration with suspend

2024-01-03 Thread peterx
From: Steve Sistare Add a test case to verify that the suspended state is handled correctly by live migration postcopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Link:

[PULL 24/26] migration: Remove unnecessary usage of local Error

2024-01-03 Thread peterx
From: Avihai Horon According to Error API, usage of ERRP_GUARD() or a local Error instead of errp is needed if errp is passed to void functions, where it is later dereferenced to see if an error occurred. There are several places in migration.c that use local Error although it is not needed.

[PULL 02/26] MAINTAINERS: Remove myself as reviewer from Live Migration

2024-01-03 Thread peterx
From: Leonardo Bras I am currently focusing in kernel development, so I will probably not be of much help in reviewing general Live Migration changes. For above reason I am removing my Reviewer status from Migration and RDMA Migration. Signed-off-by: Leonardo Bras Link:

[PULL 15/26] migration: Remove migrate_max_downtime() declaration

2024-01-03 Thread peterx
From: Avihai Horon migrate_max_downtime() has been removed long ago, but its declaration was mistakenly left. Remove it. Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20231231093016.14204-2-avih...@nvidia.com Signed-off-by: Peter Xu ---

[PULL 09/26] migration: preserve suspended for snapshot

2024-01-03 Thread peterx
From: Steve Sistare Restoring a snapshot can break a suspended guest. Snapshots suffer from the same suspended-state issues that affect live migration, plus they must handle an additional problematic scenario, which is that a running vm must remain running if it loads a suspended snapshot. To

[PULL 19/26] migration/multifd: Fix error message in multifd_recv_initial_packet()

2024-01-03 Thread peterx
From: Avihai Horon In multifd_recv_initial_packet(), if MultiFDInit_t->id is greater than the configured number of multifd channels, an irrelevant error message about multifd version is printed. Change the error message to a relevant one about the channel id. Signed-off-by: Avihai Horon

[PULL 16/26] migration: Remove nulling of hostname in migrate_init()

2024-01-03 Thread peterx
From: Avihai Horon MigrationState->hostname is set to NULL in migrate_init(). This is redundant because it is already freed and set to NULL in migrade_fd_cleanup(). Remove it. Signed-off-by: Avihai Horon Reviewed-by: Fabiano Rosas Link:

[PULL 05/26] cpus: check running not RUN_STATE_RUNNING

2024-01-03 Thread peterx
From: Steve Sistare When a vm transitions from running to suspended, runstate notifiers are not called, so the notifiers still think the vm is running. Hence, when we call vm_start to restore the suspended state, we call vm_state_notify with running=1. However, some notifiers check for

[PULL 08/26] migration: preserve suspended runstate

2024-01-03 Thread peterx
From: Steve Sistare A guest that is migrated in the suspended state automaticaly wakes and continues execution. This is wrong; the guest should end migration in the same state it started. The root cause is that the outgoing migration code automatically wakes the guest, then saves the RUNNING

[PULL 06/26] cpus: vm_resume

2024-01-03 Thread peterx
From: Steve Sistare Define the vm_resume helper, for use in subsequent patches. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Link: https://lore.kernel.org/r/1704312341-66640-5-git-send-email-steven.sist...@oracle.com Signed-off-by: Peter Xu --- include/sysemu/runstate.h | 9 +

[PULL 12/26] tests/qtest: option to suspend during migration

2024-01-03 Thread peterx
From: Steve Sistare Add an option to suspend the src in a-b-bootblock.S, which puts the guest in S3 state after one round of writing to memory. The option is enabled by poking a 1 into the suspend_me word in the boot block prior to starting the src vm. Generate symbol offsets in

[PULL 13/26] tests/qtest: precopy migration with suspend

2024-01-03 Thread peterx
From: Steve Sistare Add a test case to verify that the suspended state is handled correctly during live migration precopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Link:

[PULL 10/26] migration: preserve suspended for bg_migration

2024-01-03 Thread peterx
From: Steve Sistare Do not wake a suspended guest during bg_migration, and restore the prior state at finish rather than unconditionally running. Allow the additional state transitions that occur. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Link:

[PULL 01/26] MAINTAINERS: Leaving Migration

2024-01-03 Thread peterx
From: Juan Quintela I am leaving Red Hat, and as part of that I am leaving Migration maintenarship. You are left in good hands with Peter and Fabiano. Thanks for all the fish. Signed-off-by: Juan Quintela Reviewed-by: Bin Meng Link:

[PULL 07/26] migration: propagate suspended runstate

2024-01-03 Thread peterx
From: Steve Sistare If the outgoing machine was previously suspended, propagate that to the incoming side via global_state, so a subsequent vm_start restores the suspended state. To maintain backward and forward compatibility, reclaim some space from the runstate member. Signed-off-by: Steve

[PULL 03/26] cpus: vm_was_suspended

2024-01-03 Thread peterx
From: Steve Sistare Add a state variable to remember if a vm previously transitioned into a suspended state. Signed-off-by: Steve Sistare Reviewed-by: Peter Xu Link: https://lore.kernel.org/r/1704312341-66640-2-git-send-email-steven.sist...@oracle.com Signed-off-by: Peter Xu ---

[PULL 00/26] Migration 20240104 patches

2024-01-03 Thread peterx
From: Peter Xu The following changes since commit 7425b6277f12e82952cede1f531bfc689bf77fb1: Merge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-12-27 05:15:32 -0500) are available in the Git repository at: https://gitlab.com/peterx/qemu.git

Re: [PATCH v13 05/26] target/riscv: add zicbop extension flag

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:54 PM Daniel Henrique Barboza wrote: > > QEMU already implements zicbom (Cache Block Management Operations) and > zicboz (Cache Block Zero Operations). Commit 59cb29d6a5 ("target/riscv: > add Zicbop cbo.prefetch{i, r, m} placeholder") added placeholders for > what would

Re: [PATCH v13 04/26] target/riscv: add rv64i CPU

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:56 PM Daniel Henrique Barboza wrote: > > We don't have any form of a 'bare bones' CPU. rv64, our default CPUs, > comes with a lot of defaults. This is fine for most regular uses but > it's not suitable when more control of what is actually loaded in the > CPU is

Re: [PATCH v13 03/26] target/riscv/tcg: update priv_ver on user_set extensions

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 10:58 PM Daniel Henrique Barboza wrote: > > We'll add a new bare CPU type that won't have any default priv_ver. This > means that the CPU will default to priv_ver = 0, i.e. 1.10.0. > > At the same we'll allow these CPUs to enable extensions at will, but > then, if the

Re: [PATCH 0/2] Added the ability to delegate LCOFI to VS

2024-01-03 Thread Alistair Francis
On Fri, Dec 22, 2023 at 1:08 AM Vadim Shakirov wrote: > > This series of patches adds LCOFI delegation from HS-mode to VS-mode. > > This possibility must be implemented, as in the AIA spec in section 6.3.2 > it is indicated in table 6.1 that in the case when the hideleg bit is set, > the

Re: [PATCH v5 3/3] hw/arm: Connect STM32L4x5 EXTI to STM32L4x5 SoC

2024-01-03 Thread Alistair Francis
On Fri, Dec 29, 2023 at 2:21 AM Inès Varhol wrote: > > Signed-off-by: Arnaud Minier > Signed-off-by: Inès Varhol Reviewed-by: Alistair Francis Alistair > --- > hw/arm/Kconfig | 1 + > hw/arm/stm32l4x5_soc.c | 56 -- >

Re: [PATCH v5 2/3] tests/qtest: Add STM32L4x5 EXTI QTest testcase

2024-01-03 Thread Alistair Francis
On Fri, Dec 29, 2023 at 3:34 AM Inès Varhol wrote: > > Signed-off-by: Arnaud Minier > Signed-off-by: Inès Varhol Acked-by: Alistair Francis Alistair > --- > tests/qtest/meson.build | 5 + > tests/qtest/stm32l4x5_exti-test.c | 596 ++ > 2 files

Re: [PATCH v6 1/2] qom: new object to associate device to numa node

2024-01-03 Thread Ankit Agrawal
Thanks Jonathan for the review. > As per reply to the cover letter I definitely want to see SRAT table dumps > in here though so we can easily see what this is actually building. Ack. > I worry that some OS might make the assumption that it's one GI node > per PCI device though. The language in

Re: [PATCH v4 1/3] hw/misc: Implement STM32L4x5 EXTI

2024-01-03 Thread Alistair Francis
On Fri, Dec 29, 2023 at 2:07 AM Inès Varhol wrote: > > Although very similar to the STM32F4xx EXTI, STM32L4x5 EXTI generates > more than 32 event/interrupt requests and thus uses more registers > than STM32F4xx EXTI which generates 23 event/interrupt requests. > > Signed-off-by: Arnaud Minier >

[PATCH v3 2/4] multifd: Implement multifd compression accelerator

2024-01-03 Thread Yuan Liu
when starting multifd live migration, if the compression method is enabled, compression method can be accelerated using accelerators. Signed-off-by: Yuan Liu Reviewed-by: Nanhai Zou Reviewed-by: Fabiano Rosas --- migration/multifd.c | 40 ++--

[PATCH v3 1/4] migration: Introduce multifd-compression-accel parameter

2024-01-03 Thread Yuan Liu
Introduce the multifd-compression-accel option to enable or disable live migration data (de)compression accelerator. The default value of multifd-compression-accel is auto, and the enabling and selection of the accelerator are automatically detected. By setting multifd-compression-accel=none, the

[PATCH v3 0/4] Live Migration Acceleration with IAA Compression

2024-01-03 Thread Yuan Liu
Hi, I am writing to submit a code change aimed at enhancing live migration acceleration by leveraging the compression capability of the Intel In-Memory Analytics Accelerator (IAA). The implementation of the IAA (de)compression code is based on Intel Query Processing Library (QPL), an open-source

[PATCH v3 3/4] configure: add qpl option

2024-01-03 Thread Yuan Liu
the Query Processing Library (QPL) is an open-source library that supports data compression and decompression features. add --enable-qpl and --disable-qpl options to enable and disable the QPL compression accelerator. The QPL compression accelerator can accelerate the Zlib compression algorithm

[PATCH v3 4/4] multifd: Introduce QPL compression accelerator

2024-01-03 Thread Yuan Liu
Intel Query Processing Library (QPL) is an open-source library for data compression, it supports the deflate compression algorithm, compatible with Zlib and GZIP. QPL supports both software compression and hardware compression. Software compression is based on instruction optimization to

Re: [PATCH v6 0/2] acpi: report numa nodes for device memory using GI

2024-01-03 Thread Ankit Agrawal
>> >> -numa node,nodeid=2 -numa node,nodeid=3 -numa node,nodeid=4 \ >> -numa node,nodeid=5 -numa node,nodeid=6 -numa node,nodeid=7 \ >> -numa node,nodeid=8 -numa node,nodeid=9 \ >> -device >> vfio-pci-nohotplug,host=0009:01:00.0,bus=pcie.0,addr=04.0,rombar=0,id=dev0 \ >> -object

Re: [PATCH v4 0/4] Support RISC-V IOPMP

2024-01-03 Thread Ethan Chen via
On Mon, Dec 18, 2023 at 02:18:58PM +1000, Alistair Francis wrote: > On Wed, Nov 22, 2023 at 3:36 PM Ethan Chen via wrote: > > > > This series implements IOPMP specification v1.0.0-draft4 rapid-k model. > > The specification url: > >

RE: [PATCH 0/2] backends/iommufd: Remove mutex

2024-01-03 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Tuesday, January 2, 2024 8:32 PM >To: qemu-devel@nongnu.org >Cc: Liu, Yi L ; Eric Auger ; Duan, >Zhenzhong ; Cédric Le Goater > >Subject: [PATCH 0/2] backends/iommufd: Remove mutex > >Hello ! > >Coverity has some reports regarding the

RE: [PATCH 1/2] backends/iommufd: Remove check on number of backend users

2024-01-03 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH 1/2] backends/iommufd: Remove check on number of >backend users > >Hello Zhenzhong, > >On 1/3/24 02:40, Duan, Zhenzhong wrote: >> Hi Cédric, >> >>> -Original Message- >>> From: Cédric Le Goater >>> Sent: Tuesday,

Re: [PATCH] MAINTAINERS: Remove myself as reviewer from Live Migration

2024-01-03 Thread Peter Xu
On Thu, Dec 21, 2023 at 02:07:34PM -0300, Leonardo Bras wrote: > I am currently focusing in kernel development, so I will probably not be > of much help in reviewing general Live Migration changes. > > For above reason I am removing my Reviewer status from Migration and RDMA > Migration. > >

Re: QEMU developers call

2024-01-03 Thread Peter Xu
On Wed, Jan 03, 2024 at 11:57:04AM +, Alex Bennée wrote: > Another way of saying M-x rot13-region ;-) Ah.. :) ROT13 is used in online forums as a means of hiding spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance. Thanks for

Re: [PATCH 1/1] hw/riscv/virt.c: fix the interrupts-extended property format of PLIC

2024-01-03 Thread Alistair Francis
On Mon, Dec 18, 2023 at 7:07 PM Yong-Xuan Wang wrote: > > The interrupts-extended property of PLIC only has 2 * hart number > fields when KVM enabled, copy 4 * hart number fields to fdt will > expose some uninitialized value. > > In this patch, I also refactor the code about the setting of >

[PATCH v3 07/20] util/dsa: Implement DSA device start and stop logic.

2024-01-03 Thread Hao Xiang
* DSA device open and close. * DSA group contains multiple DSA devices. * DSA group configure/start/stop/clean. Signed-off-by: Hao Xiang Signed-off-by: Bryan Zhang --- include/qemu/dsa.h | 72 +++ util/dsa.c | 316 + util/meson.build

[PATCH v3 16/20] migration/multifd: Enable set normal page ratio test hook in multifd.

2024-01-03 Thread Hao Xiang
Test hook is disabled by default. To set it, a normal page ratio between 0 and 100 are valid. If the ratio is set to 50, it means at least 50% of all pages are sent as normal pages. Set the option: migrate_set_parameter multifd-normal-page-ratio 60 Signed-off-by: Hao Xiang ---

[PATCH v3 15/20] migration/multifd: Add test hook to set normal page ratio.

2024-01-03 Thread Hao Xiang
Multifd sender thread performs zero page checking. If a page is a zero page, only the page's metadata is sent to the receiver. If a page is a normal page, the entire page's content is sent to the receiver. This change adds a test hook to set the normal page ratio. A zero page will be forced to be

[PATCH v3 06/20] util/dsa: Add dependency idxd.

2024-01-03 Thread Hao Xiang
Idxd is the device driver for DSA (Intel Data Streaming Accelerator). The driver is fully functioning since Linux kernel 5.19. This change adds the driver's header file used for userspace development. Signed-off-by: Hao Xiang --- linux-headers/linux/idxd.h | 356

[PATCH v3 17/20] migration/multifd: Add migration option set packet size.

2024-01-03 Thread Hao Xiang
The current multifd packet size is 128 * 4kb. This change adds an option to set the packet size. Both sender and receiver needs to set the same packet size for things to work. Signed-off-by: Hao Xiang --- migration/options.c | 36 migration/options.h | 1 +

[PATCH v3 09/20] util/dsa: Implement DSA task asynchronous completion thread model.

2024-01-03 Thread Hao Xiang
* Create a dedicated thread for DSA task completion. * DSA completion thread runs a loop and poll for completed tasks. * Start and stop DSA completion thread during DSA device start stop. User space application can directly submit task to Intel DSA accelerator by writing to DSA's device memory

[PATCH v3 02/20] multifd: Support for zero pages transmission

2024-01-03 Thread Hao Xiang
From: Juan Quintela This patch adds counters and similar. Logic will be added on the following patch. Signed-off-by: Juan Quintela --- migration/multifd.c| 37 ++--- migration/multifd.h| 17 - migration/trace-events | 8 3

[PATCH v3 13/20] migration/multifd: Prepare to introduce DSA acceleration on the multifd path.

2024-01-03 Thread Hao Xiang
1. Refactor multifd_send_thread function. 2. Implement buffer_is_zero_use_cpu to handle CPU based zero page checking. 3. Introduce the batch task structure in MultiFDSendParams. Signed-off-by: Hao Xiang --- include/qemu/dsa.h | 43 +++-- migration/multifd.c | 77

[PATCH v3 05/20] meson: Introduce new instruction set enqcmd to the build system.

2024-01-03 Thread Hao Xiang
Enable instruction set enqcmd in build. Signed-off-by: Hao Xiang --- meson.build | 14 ++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 19 insertions(+) diff --git a/meson.build b/meson.build index

[PATCH v3 08/20] util/dsa: Implement DSA task enqueue and dequeue.

2024-01-03 Thread Hao Xiang
* Use a safe thread queue for DSA task enqueue/dequeue. * Implement DSA task submission. * Implement DSA batch task submission. Signed-off-by: Hao Xiang --- include/qemu/dsa.h | 28 +++ util/dsa.c | 201 + 2 files changed, 229

[PATCH v3 12/20] migration/multifd: Add new migration option for multifd DSA offloading.

2024-01-03 Thread Hao Xiang
Intel DSA offloading is an optional feature that turns on if proper hardware and software stack is available. To turn on DSA offloading in multifd live migration: multifd-dsa-accel="[dsa_dev_path1] [dsa_dev_path2] ... [dsa_dev_pathX]" This feature is turned off by default. Signed-off-by: Hao

[PATCH v3 03/20] multifd: Zero pages transmission

2024-01-03 Thread Hao Xiang
From: Juan Quintela This implements the zero page dection and handling. Signed-off-by: Juan Quintela --- migration/multifd.c | 41 +++-- migration/multifd.h | 5 + 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c

[PATCH v3 00/20] Use Intel DSA accelerator to offload zero page checking in multifd live migration.

2024-01-03 Thread Hao Xiang
v3 * Rebase on top of 7425b6277f12e82952cede1f531bfc689bf77fb1. * Fix error/warning from checkpatch.pl * Fix use-after-free bug when multifd-dsa-accel option is not set. * Handle error from dsa_init and correctly propogate the error. * Remove unnecessary call to dsa_stop. * Detect availability of

[PATCH v3 11/20] util/dsa: Implement DSA task asynchronous submission and wait for completion.

2024-01-03 Thread Hao Xiang
* Add a DSA task completion callback. * DSA completion thread will call the tasks's completion callback on every task/batch task completion. * DSA submission path to wait for completion. * Implement CPU fallback if DSA is not able to complete the task. Signed-off-by: Hao Xiang Signed-off-by:

[PATCH v3 10/20] util/dsa: Implement zero page checking in DSA task.

2024-01-03 Thread Hao Xiang
Create DSA task with operation code DSA_OPCODE_COMPVAL. Here we create two types of DSA tasks, a single DSA task and a batch DSA task. Batch DSA task reduces task submission overhead and hence should be the default option. However, due to the way DSA hardware works, a DSA batch task must contain

[PATCH v3 14/20] migration/multifd: Enable DSA offloading in multifd sender path.

2024-01-03 Thread Hao Xiang
Multifd sender path gets an array of pages queued by the migration thread. It performs zero page checking on every page in the array. The pages are classfied as either a zero page or a normal page. This change uses Intel DSA to offload the zero page checking from CPU to the DSA accelerator. The

[PATCH v3 01/20] multifd: Add capability to enable/disable zero_page

2024-01-03 Thread Hao Xiang
From: Juan Quintela We have to enable it by default until we introduce the new code. Signed-off-by: Juan Quintela --- migration/options.c | 15 +++ migration/options.h | 1 + qapi/migration.json | 8 +++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git

[PATCH v3 18/20] migration/multifd: Enable set packet size migration option.

2024-01-03 Thread Hao Xiang
During live migration, if the latency between sender and receiver is high and bandwidth is also high (a long and fat pipe), using a bigger packet size can help reduce migration total time. In addition, Intel DSA offloading performs better with a large batch task. Providing an option to set the

[PATCH v3 19/20] util/dsa: Add unit test coverage for Intel DSA task submission and completion.

2024-01-03 Thread Hao Xiang
* Test DSA start and stop path. * Test DSA configure and cleanup path. * Test DSA task submission and completion path. Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang --- tests/unit/meson.build | 6 + tests/unit/test-dsa.c | 475 + 2 files

[PATCH v3 04/20] So we use multifd to transmit zero pages.

2024-01-03 Thread Hao Xiang
From: Juan Quintela Signed-off-by: Juan Quintela Reviewed-by: Leonardo Bras --- migration/multifd.c | 7 --- migration/options.c | 17 + migration/ram.c | 45 ++--- qapi/migration.json | 1 - 4 files changed, 51 insertions(+),

[PATCH v3 20/20] migration/multifd: Add integration tests for multifd with Intel DSA offloading.

2024-01-03 Thread Hao Xiang
* Add test case to start and complete multifd live migration with DSA offloading enabled. * Add test case to start and cancel multifd live migration with DSA offloading enabled. Signed-off-by: Bryan Zhang Signed-off-by: Hao Xiang --- tests/qtest/migration-test.c | 77

Re: [v2 4/5] target/riscv: Add cycle & instret privilege mode filtering support

2024-01-03 Thread Atish Kumar Patra
On Wed, Jan 3, 2024 at 12:18 PM Daniel Henrique Barboza wrote: > > > > On 12/28/23 21:49, Atish Patra wrote: > > From: Kaiwen Xue > > > > QEMU only calculates dummy cycles and instructions, so there is no > > actual means to stop the icount in QEMU. Hence this patch merely adds > > the

Re: [v2 2/5] target/riscv: Add cycle & instret privilege mode filtering properties

2024-01-03 Thread Atish Kumar Patra
On Wed, Jan 3, 2024 at 12:11 PM Daniel Henrique Barboza wrote: > > > > On 12/28/23 21:49, Atish Patra wrote: > > From: Kaiwen Xue > > > > This adds the properties for ISA extension smcntrpmf. Patches > > implementing it will follow. > > > > Signed-off-by: Atish Patra > > Signed-off-by: Kaiwen

[PATCH v2] hw/net/can/sja1000: fix bug for single acceptance filter and standard frame

2024-01-03 Thread Pavel Pisa
From: Pavel Pisa A CAN sja1000 standard frame filter mask has been computed and applied incorrectly for standard frames when single Acceptance Filter Mode (MOD_AFM = 1) has been selected. The problem has not been found by Linux kernel testing because it uses dual filter mode (MOD_AFM = 0) and

Re: chacha20-s390 broken in 8.2.0 in TCG on s390x

2024-01-03 Thread Richard Henderson
On 1/4/24 01:37, Philippe Mathieu-Daudé wrote: Finally changing the constraints on op_rotli_vec seems to fix it: --- diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index fbee43d3b0..b3456fe857 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@

Re: [PATCH] hw/net/can/sja1000: fix bug for single acceptance filer and standard frame

2024-01-03 Thread Bernhard Beschow
Typo in commit subject: s/filer/filter/ Am 14. Dezember 2023 10:46:23 UTC schrieb Pavel Pisa : >From: Pavel Pisa > >A CAN sja1000 standard frame filter mask has been computed and applied >incorrectly for standard frames when single Acceptance Filter Mode >(MOD_AFM = 1) has been selected. The

Re: [PATCH v3 5/6] target/riscv: Update address modify functions to take into account pointer masking

2024-01-03 Thread Richard Henderson
On 1/4/24 05:57, Alexey Baturo wrote: From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/translate.c | 12 target/riscv/vector_helper.c | 12 2 files changed, 20 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v3 4/6] target/riscv: Add pointer masking tb flags

2024-01-03 Thread Richard Henderson
On 1/4/24 05:57, Alexey Baturo wrote: From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.h| 3 +++ target/riscv/cpu_helper.c | 3 +++ target/riscv/translate.c | 11 +++ 3 files changed, 17 insertions(+) diff --git a/target/riscv/cpu.h

Re: [QEMU-devel][RFC PATCH 1/1] backends/hostmem: qapi/qom: Add an ObjectOption for memory-backend-* called HostMemType and its arg 'cxlram'

2024-01-03 Thread Gregory Price
On Sun, Dec 31, 2023 at 11:53:15PM -0800, Ho-Ren (Jack) Chuang wrote: > Introduce a new configuration option 'host-mem-type=' in the > '-object memory-backend-ram', allowing users to specify > from which type of memory to allocate. > > Users can specify 'cxlram' as an argument, and QEMU will then

Re: [PATCH 04/20] tcg/s390x: Implement vector NAND, NOR, EQV

2024-01-03 Thread Richard Henderson
On 1/4/24 00:21, Philippe Mathieu-Daudé wrote: Hi Richard, (revisiting this old patch which is now commit 21eab5bfae) On 18/12/21 20:42, Richard Henderson wrote: Signed-off-by: Richard Henderson ---   tcg/s390x/tcg-target.h |  6 +++---   tcg/s390x/tcg-target.c.inc | 17 +  

Re: [PATCH] docs: use "buses" rather than "busses"

2024-01-03 Thread Pavel Pisa
On Wednesday 03 of January 2024 18:28:17 Samuel Tardieu wrote: > If "busses" might be encountered as a plural of "bus" (5 instances), > the correct spelling is "buses" (26 instances). Fixing those 5 > instances makes the doc more consistent. > > Signed-off-by: Samuel Tardieu Reviewed-by: Pavel

Re: [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine

2024-01-03 Thread Daniel Henrique Barboza
On 12/29/23 09:07, Heinrich Schuchardt wrote: Generate SMBIOS tables for the RISC-V mach-virt. Add CONFIG_SMBIOS=y to the RISC-V default config. Set the default processor family in the type 4 table. The implementation is based on the corresponding ARM and Loongson code. With the patch the

  1   2   3   >