RE: [PATCH v3 12/17] intel_iommu: Add support for PASID-based device IOTLB invalidation

2024-12-16 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Sent: Sunday, September 29, 2024 9:59 AM >Subject: Re: [PATCH v3 12/17] intel_iommu: Add support for PASID-based device >IOTLB invalidation > >On Fri, Sep 27, 2024 at 3:18 PM Duan, Zhenzhong > wrote: >> >> >> >> >-Original Message- >> >From:

RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2024-12-16 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Daniel P. Berrangé > Sent: Friday, December 13, 2024 1:20 PM > To: Jason Gunthorpe > Cc: Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org; eric.au...@redhat.com; > peter.mayd...@linaro.org; nicol...@nvidia.com; ddut...@redhat.com; >

RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2024-12-16 Thread Shameerali Kolothum Thodi via
Hi Nathan, > -Original Message- > From: Nathan Chen > Sent: Friday, December 13, 2024 1:02 AM > To: Shameerali Kolothum Thodi > Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; > eric.au...@redhat.com; peter.mayd...@linaro.org; j...@nvidia.com; > ddut...@redhat.com; Linuxarm ; Wangzhou (B

[PATCH 4/9] vfio/migration: Add vfio_devices_all_dirty_tracking_started() helper

2024-12-16 Thread Avihai Horon
vfio_devices_all_dirty_tracking() and vfio_dma_unmap_dirty_sync_needed() share the same code that checks if dirty page tracking has been started. Extract it to a common helper vfio_devices_all_dirty_tracking_started(). Signed-off-by: Avihai Horon --- hw/vfio/common.c | 25 +-

[PATCH 9/9] migration: Unexport migration_is_active()

2024-12-16 Thread Avihai Horon
After being removed from VFIO and dirty limit, migration_is_active() no longer has any users outside the migration subsystem, and in fact, it's only used in migration.c. Unexport it and also relocate it so it can be made static. Signed-off-by: Avihai Horon --- include/migration/misc.h | 1 - m

[PATCH 3/9] vfio/migration: Refactor vfio_devices_all_running_and_mig_active() logic

2024-12-16 Thread Avihai Horon
During DMA unmap with vIOMMU, vfio_devices_all_running_and_mig_active() is used to check whether a dirty page log sync of the unmapped pages is required. Such log sync is needed during migration pre-copy phase, and the current logic detects it by checking if migration is active and if the VFIO devi

[PATCH 7/9] system/dirtylimit: Don't use migration_is_active()

2024-12-16 Thread Avihai Horon
vcpu_dirty_rate_stat_collect() uses migration_is_active() to detect whether migration is running or not, in order to get the correct dirty rate period value. However, recently there has been an effort to simplify the migration status API and reduce it to a single migration_is_running() function.

[PATCH 8/9] migration: Drop migration_is_device()

2024-12-16 Thread Avihai Horon
After being removed from VFIO, migration_is_device() no longer has any users. Drop it. Signed-off-by: Avihai Horon --- include/migration/misc.h | 1 - migration/migration.c| 7 --- 2 files changed, 8 deletions(-) diff --git a/include/migration/misc.h b/include/migration/misc.h index 804

[PATCH 2/9] vfio/migration: Refactor vfio_devices_all_dirty_tracking() logic

2024-12-16 Thread Avihai Horon
During dirty page log sync, vfio_devices_all_dirty_tracking() is used to check if dirty tracking has been started in order to avoid errors. The current logic checks if migration is in ACTIVE or DEVICE states to ensure dirty tracking has been started. However, recently there has been an effort to s

[PATCH 5/9] vfio/migration: Drop vfio_dma_unmap_dirty_sync_needed()

2024-12-16 Thread Avihai Horon
There is no need for vfio_dma_unmap_dirty_sync_needed(), as it simply calls vfio_devices_all_dirty_tracking_started(). Drop vfio_dma_unmap_dirty_sync_needed(), export vfio_devices_all_dirty_tracking_started() and use it instead. Signed-off-by: Avihai Horon --- include/hw/vfio/vfio-common.h | 3

[PATCH 6/9] vfio/migration: Rename vfio_devices_all_dirty_tracking()

2024-12-16 Thread Avihai Horon
vfio_devices_all_dirty_tracking() is used to check if dirty page log sync is needed. However, besides checking the dirty page tracking status, it also checks the pre_copy_dirty_page_tracking flag. Rename it to vfio_devices_log_sync_needed() which reflects its purpose more accurately and makes the

RE: [PATCH 1/3] target/riscv: add a trap-misaligned-access property

2024-12-16 Thread Konrad, Frederic
> -Original Message- > From: Alistair Francis > Sent: 16 December 2024 05:55 > To: Konrad, Frederic > Cc: qemu-ri...@nongnu.org; pal...@dabbelt.com; alistair.fran...@wdc.com; > bmeng...@gmail.com; liwei1...@gmail.com; > dbarb...@ventanamicro.com; zhiwei_...@linux.alibaba.com; > qemu-d

[PATCH 0/9] migration: Drop/unexport migration_is_device() and migration_is_active()

2024-12-16 Thread Avihai Horon
Hello, This follows up on Peter's series [1] to simplify migration status API to a single migration_is_running() function. Peter's series tried to drop migration_is_device() and migration_is_active(), however VFIO used them to check if dirty page tracking has been started in order to avoid errors

[PATCH 1/9] vfio/container: Add dirty tracking started flag

2024-12-16 Thread Avihai Horon
Add a flag to VFIOContainerBase that indicates whether dirty tracking has been started for the container or not. This will be used in the following patches to allow dirty page syncs only if dirty tracking has been started. Signed-off-by: Avihai Horon --- include/hw/vfio/vfio-container-base.h |

RE: [RFC PATCH 0/5] hw/arm/virt: Add support for user-creatable nested SMMUv3

2024-12-16 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Peter Maydell > Sent: Friday, December 13, 2024 1:33 PM > To: Jason Gunthorpe > Cc: Daniel P. Berrangé ; Shameerali Kolothum > Thodi ; qemu-...@nongnu.org; > qemu-devel@nongnu.org; eric.au...@redhat.com; nicol...@nvidia.com; > ddut...@redhat.com; Linuxarm ;

Re: [PATCH 2/9] vfio/migration: Refactor vfio_devices_all_dirty_tracking() logic

2024-12-16 Thread Joao Martins
On 16/12/2024 15:52, Joao Martins wrote: > On 16/12/2024 14:52, Avihai Horon wrote: >> >> On 16/12/2024 14:32, Joao Martins wrote: >>> External email: Use caution opening links or attachments >>> >>> >>> On 16/12/2024 09:46, Avihai Horon wrote: During dirty page log sync, vfio_devices_all_dirt

[PATCH] accel/tcg: Really restrict cpu_io_recompile() to system emulation

2024-12-16 Thread Philippe Mathieu-Daudé
Commit 38fc4b11e03 ("accel/tcg: Restrict cpu_io_recompile() to system emulation") inadvertently restricted cpu_io_recompile() to SoftMMU. Correct to restrict to system emulation. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20241212185341.2857-11-phi...@linaro.org> --- accel/tcg/internal

Re: [PATCH 3/9] vfio/migration: Refactor vfio_devices_all_running_and_mig_active() logic

2024-12-16 Thread Joao Martins
On 16/12/2024 14:55, Avihai Horon wrote: > > On 16/12/2024 14:45, Joao Martins wrote: >> External email: Use caution opening links or attachments >> >> >> On 16/12/2024 09:46, Avihai Horon wrote: >>> During DMA unmap with vIOMMU, vfio_devices_all_running_and_mig_active() >>> is used to check wheth

Re: [PATCH] accel/tcg: Really restrict cpu_io_recompile() to system emulation

2024-12-16 Thread Richard Henderson
On 12/16/24 10:05, Philippe Mathieu-Daudé wrote: Commit 38fc4b11e03 ("accel/tcg: Restrict cpu_io_recompile() to system emulation") inadvertently restricted cpu_io_recompile() to SoftMMU. Correct to restrict to system emulation. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20241212185341

[PATCH] qmp: update vhost-user protocol feature maps

2024-12-16 Thread Laurent Vivier
Add VHOST_USER_PROTOCOL_F_SHARED_OBJECT and VHOST_USER_PROTOCOL_F_DEVICE_STATE protocol feature maps to the virtio introspection. Cc: jonah.pal...@oracle.com Fixes: 160947666276 ("vhost-user: add shared_object msg") Cc: aest...@redhat.com Fixes: cda83adc62b6 ("vhost-user: Interface for migration s

Re: [PATCH 1/3] osdep: Add qemu_mkdir_with_parents()

2024-12-16 Thread Peter Xu
On Mon, Dec 16, 2024 at 04:56:33PM +, Peter Maydell wrote: > On Mon, 16 Dec 2024 at 16:14, Peter Xu wrote: > > > > QEMU uses g_mkdir_with_parents() a lot, especially in the case where the > > failure case is ignored so an abort is expected when happened. > > > > Provide a helper qemu_mkdir_wit

Re: [PATCH 1/3] osdep: Add qemu_mkdir_with_parents()

2024-12-16 Thread Alex Bennée
Peter Xu writes: > QEMU uses g_mkdir_with_parents() a lot, especially in the case where the > failure case is ignored so an abort is expected when happened. > > Provide a helper qemu_mkdir_with_parents() to do that, and use it in the > two cases in qga/. To be used in more places later. > > Sign

Re: [PATCH 3/3] tests/migration: Drop arch_[source|target]

2024-12-16 Thread Alex Bennée
Peter Xu writes: > Coverity complained about them. These two variables are never used now > after commit 832c732c5d ("migration-test: Create arch_opts"), and/or commit > 34cc54fb35 ("tests/qtest/migration-test: Use custom asm bios for ppc64"). > > Resolves: Coverity CID 1568379 > Resolves: Coveri

Re: [PATCH 2/3] tests: Use qemu_mkdir_with_parents() for all test code

2024-12-16 Thread Alex Bennée
Peter Xu writes: > Coverity isn't happy on the QEMU test cases where g_mkdir_with_parents() is > used without checking retvals. Use qemu_mkdir_with_parents() to fix them. > > Resolves: Coverity CID 1568381 > Resolves: Coverity CID 1568378 > Signed-off-by: Peter Xu Reviewed-by: Alex Bennée --

[PATCH v4 7/7] Update the ACPI tables according to the acpi aml_build change, also empty bios-tables-test-allowed-diff.h.

2024-12-16 Thread Alireza Sanaee via
The disassembled differences between actual and expected PPTT based on the following cache topology representation: ``` test_acpi_one("-M virt,smp-cache.0.cache=l1i,smp-cache.0.topology=cluster," "smp-cache.1.cache=l1d,smp-cache.1.topology=cluster," "smp-cache.2

[PATCH v4 6/7] tests/qtest/bios-table-test: testing new ARM ACPI PPTT topology

2024-12-16 Thread Alireza Sanaee via
Test new PPTT topolopy with cache representation. Signed-off-by: Alireza Sanaee --- tests/qtest/bios-tables-test.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 36e5c0adde..0f72520664 100644 --- a/te

Re: [PATCH] vvfat: fix ubsan issue in create_long_filename

2024-12-16 Thread Pierrick Bouvier
Hi everyone, gentle ping on this series. On 12/4/24 11:51, Pierrick Bouvier wrote: Found with test sbsaref introduced in [1]. [1] https://patchew.org/QEMU/20241203213629.2482806-1-pierrick.bouv...@linaro.org/ ../block/vvfat.c:433:24: runtime error: index 14 out of bounds for type 'uint8_t [

Re: [PATCH v3 08/24] migration: Add thread pool of optional load threads

2024-12-16 Thread Peter Xu
On Thu, Dec 12, 2024 at 11:53:42PM +0100, Maciej S. Szmigiero wrote: > migrate_set_error() wouldn't be called until qemu_loadvm_state() exits > into process_incoming_migration_co(). > > Also this does not account other qemu_loadvm_state() callers like > qmp_xen_load_devices_state() or load_snapsho

[PATCH] virtio-balloon-pci: Allow setting nvectors, so we can use MSI-X

2024-12-16 Thread Reza Arbab
Most virtio-pci devices allow MSI-X. Add it to virtio-balloon-pci, but only enable it in new machine types, so we don't break migration of existing machine types between different qemu versions. This copies what was done for virtio-rng-pci in: 9ea02e8f1306 ("virtio-rng-pci: Allow setting nvectors,

Re: [PATCH RFCv2 00/20] kvm/arm: Introduce a customizable aarch64 KVM host model

2024-12-16 Thread Cornelia Huck
On Thu, Dec 12 2024, Eric Auger wrote: > Connie, > > On 12/6/24 12:21, Cornelia Huck wrote: >> Whether it make sense to continue with the approach of tweaking values in >> the ID registers in general. If we want to be able to migrate between cpus >> that do not differ wildly, we'll encounter diff

[RFC PATCH v4 0/7] Specifying cache topology on ARM

2024-12-16 Thread Alireza Sanaee via
Specifying the cache layout in virtual machines is useful for applications and operating systems to fetch accurate information about the cache structure and make appropriate adjustments. Enforcing correct sharing information can lead to better optimizations. This patch enables the specification of

[PATCH v4 1/7] i386/cpu: add IsDefined flag to smp-cache property

2024-12-16 Thread Alireza Sanaee via
This commit adds IsDefined flag to the object and this helps in avoiding extra checks for every single layer of caches in both x86 and ARM. There is already a discussion on mailing list to have this flag. A patch that enables this flag will follow later. Signed-off-by: Alireza Sanaee --- hw/cor

[PATCH v4 2/7] target/arm/tcg: increase cache level for cpu=max

2024-12-16 Thread Alireza Sanaee via
This patch addresses cache description in the `aarch64_max_tcg_initfn` function for cpu=max. It introduces three layers of caches and modifies the cache description registers accordingly. Signed-off-by: Alireza Sanaee --- target/arm/tcg/cpu64.c | 13 + 1 file changed, 13 insertions(+

Re: [PATCH 1/3] osdep: Add qemu_mkdir_with_parents()

2024-12-16 Thread Peter Xu
On Mon, Dec 16, 2024 at 07:28:19PM +0200, Konstantin Kostiuk wrote: > On Mon, Dec 16, 2024 at 7:12 PM Peter Xu wrote: > > > On Mon, Dec 16, 2024 at 04:56:33PM +, Peter Maydell wrote: > > > On Mon, 16 Dec 2024 at 16:14, Peter Xu wrote: > > > > > > > > QEMU uses g_mkdir_with_parents() a lot, e

[PATCH v4 4/7] bios-tables-test: prepare to change ARM ACPI virt PPTT

2024-12-16 Thread Alireza Sanaee via
Prepare to update `build_pptt` function to add cache description functionalities, thus add binaries in this patch. Signed-off-by: Alireza Sanaee --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/test

[PATCH v4 3/7] arm/virt.c: add cache hierarchy to device tree

2024-12-16 Thread Alireza Sanaee via
Specify which layer (core/cluster/socket) caches found at in the CPU topology. Updating cache topology to device tree (spec v0.4). Example: Here, 2 sockets (packages), and 2 clusters, 4 cores and 2 threads created, in aggregate 2*2*4*2 logical cores. In the smp-cache object, cores will have l1d an

[PATCH v4 5/7] hw/acpi/aml-build.c: add cache hierarchy to pptt table

2024-12-16 Thread Alireza Sanaee via
Add cache topology to PPTT table. With this patch, both ACPI PPTT table and device tree will represent the same cache topology given users input. Signed-off-by: Alireza Sanaee Co-developed-by: Jonathan Cameron Signed-off-by: Jonathan Cameron --- hw/acpi/aml-build.c | 235 ++

Re: [PATCH v2 6/6] migration/block: Rewrite disk activation

2024-12-16 Thread Peter Xu
On Mon, Dec 16, 2024 at 12:58:58PM -0300, Fabiano Rosas wrote: > > @@ -3286,6 +3237,11 @@ static void > > migration_iteration_finish(MigrationState *s) > > case MIGRATION_STATUS_FAILED: > > case MIGRATION_STATUS_CANCELLED: > > case MIGRATION_STATUS_CANCELLING: > > Pre-existing, but

Re: [PATCH 1/3] osdep: Add qemu_mkdir_with_parents()

2024-12-16 Thread Daniel P . Berrangé
On Mon, Dec 16, 2024 at 04:56:33PM +, Peter Maydell wrote: > On Mon, 16 Dec 2024 at 16:14, Peter Xu wrote: > > > > QEMU uses g_mkdir_with_parents() a lot, especially in the case where the > > failure case is ignored so an abort is expected when happened. > > > > Provide a helper qemu_mkdir_wit

Re: [PATCH 2/9] vfio/migration: Refactor vfio_devices_all_dirty_tracking() logic

2024-12-16 Thread Joao Martins
On 16/12/2024 16:05, Joao Martins wrote: > On 16/12/2024 15:52, Joao Martins wrote: >> On 16/12/2024 14:52, Avihai Horon wrote: >>> >>> On 16/12/2024 14:32, Joao Martins wrote: External email: Use caution opening links or attachments On 16/12/2024 09:46, Avihai Horon wrote:

Re: contrib/plugins does not build on 32-bit host

2024-12-16 Thread Pierrick Bouvier
On 12/16/24 10:45, Pierrick Bouvier wrote: On 12/14/24 04:35, Philippe Mathieu-Daudé wrote: On 14/12/24 06:29, Richard Henderson wrote: On 12/13/24 21:44, Pierrick Bouvier wrote: Hi Richard, On 12/13/24 13:47, Richard Henderson wrote: Hi, Several of the recent contrib/plugins/ patches do no

Re: [PATCH 27/71] hw/hyperv: Constify all Property

2024-12-16 Thread Maciej S. Szmigiero
On 13.12.2024 20:07, Richard Henderson wrote: Signed-off-by: Richard Henderson --- hw/hyperv/hv-balloon.c | 2 +- hw/hyperv/syndbg.c | 2 +- hw/hyperv/vmbus.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) Acked-by: Maciej S. Szmigiero Thanks, Maciej

Re: [PATCH v2 00/14] s390x: virtio-mem support

2024-12-16 Thread David Hildenbrand
Thanks, queued to https://github.com/davidhildenbrand/qemu.git mem-next On 13.12.24 15:26, David Hildenbrand wrote: On 13.12.24 13:35, Thomas Huth wrote: On 12/12/2024 22.52, David Hildenbrand wrote: On 13.11.24 15:46, David Hildenbrand wrote: On 08.10.24 12:54, David Hildenbrand wrote: Base

[PATCH] accel/tcg: Restrict curr_cflags() declaration to 'internal-common.h'

2024-12-16 Thread Philippe Mathieu-Daudé
curr_cflags() is only used within accel/tcg/, move its declaration to accel/tcg/internal-common.h. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 3 +++ include/exec/cpu-common.h | 3 --- accel/tcg/watchpoint.c | 1 + 3 files chang

Re: [PATCH 0/9] migration: Drop/unexport migration_is_device() and migration_is_active()

2024-12-16 Thread Cédric Le Goater
On 12/16/24 10:46, Avihai Horon wrote: Hello, This follows up on Peter's series [1] to simplify migration status API to a single migration_is_running() function. Peter's series tried to drop migration_is_device() and migration_is_active(), however VFIO used them to check if dirty page tracking

Re: [PATCH] accel/tcg: Restrict curr_cflags() declaration to 'internal-common.h'

2024-12-16 Thread Richard Henderson
On 12/16/24 15:40, Philippe Mathieu-Daudé wrote: curr_cflags() is only used within accel/tcg/, move its declaration to accel/tcg/internal-common.h. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-common.h | 3 +++ include/exec/cpu-common.h | 3

Re: [PATCH v3 08/24] migration: Add thread pool of optional load threads

2024-12-16 Thread Maciej S. Szmigiero
On 16.12.2024 17:33, Peter Xu wrote: On Thu, Dec 12, 2024 at 11:53:42PM +0100, Maciej S. Szmigiero wrote: migrate_set_error() wouldn't be called until qemu_loadvm_state() exits into process_incoming_migration_co(). Also this does not account other qemu_loadvm_state() callers like qmp_xen_load_d

Re: [PATCH v3 08/24] migration: Add thread pool of optional load threads

2024-12-16 Thread Maciej S. Szmigiero
On 16.12.2024 17:29, Peter Xu wrote: On Thu, Dec 12, 2024 at 11:53:24PM +0100, Maciej S. Szmigiero wrote: On 12.12.2024 17:38, Peter Xu wrote: On Wed, Dec 11, 2024 at 12:05:23AM +0100, Maciej S. Szmigiero wrote: Maybe move it over to migration_object_init()? Then we keep qemu_loadvm_state_set

Re: [PATCH 0/9] target/arm: Helper type cleanups

2024-12-16 Thread Richard Henderson
On 12/16/24 08:01, Peter Maydell wrote: On Fri, 6 Dec 2024 at 03:13, Richard Henderson wrote: Add macros such that "fpst" can be used with DEF_HELPER to indicate float_status* instead of "ptr" for void*. In addition, fix a few uses of "ptr" that should be "env". r~ Richard Henderson (9):

Re: [PATCH 0/2] target/arm: Two more float_status conversions

2024-12-16 Thread Peter Maydell
On Fri, 6 Dec 2024 at 03:20, Richard Henderson wrote: > > Hi Peter, > > You probably have something like this in your AFP tree already, > but while I'm sending all of the other float_status patches, I > thought I might as well send these two. > > Based-on: 20241206031224.78525-1-richard.hender...@

Re: [PATCH 29/71] hw/i386: Constify all Property

2024-12-16 Thread Richard Henderson
On 12/16/24 00:14, CLEMENT MATHIEU--DRIF wrote: Hi Rihard. Good idea, LGTM. Just out of curiosity, what was the motivation for such a patch? It it simply about cleaning the code or is it intended to solve a deeper problem. Simply cleaning the code, prompted by a change to core QAPI code for R

[PATCH v3 1/7] hw/misc/ivshmem-flat: Add ivshmem-flat device

2024-12-16 Thread Gustavo Romero
Add a new device, ivshmem-flat, which is similar to the ivshmem PCI but does not require a PCI bus. It's meant to be used on machines like those with Cortex-M MCUs, which usually lack a PCI/PCIe bus, e.g. lm3s6965evb and mps2-an385. The device currently only supports the sysbus bus. The new devic

Re: [PULL 00/85] target-arm queue

2024-12-16 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

[PATCH v3 2/7] hw/misc/ivshmem-flat: Allow device to wire itself on sysbus

2024-12-16 Thread Gustavo Romero
This commit enables the ivshmem-flat device to wire itself on sysbus. It maps the device's Memory-Mapped Registers (MMRs) and shared memory (shmem) into the VM's memory layout and also allows connection to an input IRQ so that the device can trigger an interrupt for notification. Three device opti

Re: [PULL 0/5] hex queue

2024-12-16 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/20] Misc HW patches for 2024-12-14

2024-12-16 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature

[PATCH v3 5/7] tests/qtest: Reorganize common code in ivshmem-test

2024-12-16 Thread Gustavo Romero
This commit reorganizes the ivshmem-test qtest by moving common structs, functions, and code that can be utilized by other ivshmem qtests into two new files: ivshmem-utils.h and ivshmem-utils.c. Enum Reg, struct ServerThread, and mktempshm() have been relocated to these new files. Two new function

[PATCH v3 4/7] hw/misc/ivshmem: Rename ivshmem to ivshmem-pci

2024-12-16 Thread Gustavo Romero
Because now there is also an MMIO ivshmem device (ivshmem-flat.c), and ivshmem.c is a PCI specific implementation, rename it to ivshmem-pci.c. Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231127052024.435743-5-gustavo.rom...@linaro.org> Signed-off-by: Gustavo Romero --- hw/misc/{ivshmem.c

[RESEND][PATCH v3 0/7] Add ivshmem-flat device

2024-12-16 Thread Gustavo Romero
This is a resend of the series: https://lore.kernel.org/qemu-devel/2024022218.2261956-1-gustavo.rom...@linaro.org/ rebased on the current master. The series was sent about 9 months ago and remains relevant. Besides addressing the longstanding issue: https://gitlab.com/qemu-project/qemu/-/iss

[PATCH v3 7/7] tests/qtest: Add ivshmem-flat test

2024-12-16 Thread Gustavo Romero
This commit adds a qtest for the ivshmem-flat device to test memory sharing, IRQ triggering, and the memory mapped registers in the device. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Gustavo Romero --- tests/qtest/ivshmem-flat-test.c | 338 tests/qtest

[PATCH v3 6/7] tests/qtest: Add API functions to capture IRQ toggling

2024-12-16 Thread Gustavo Romero
Currently, the QTest API does not provide a function to capture when an IRQ line is raised or lowered, although the QTest Protocol already reports such IRQ transitions. As a consequence, it is also not possible to capture when an IRQ line is toggled. Functions like qtest_get_irq() only read the cur

[PATCH v3 3/7] hw/arm: Allow some machines to use the ivshmem-flat device

2024-12-16 Thread Gustavo Romero
Allow Arm machine lm3s6965evb and the mps2 ones, like the mps2-an385, to use the ivshmem-flat device. Message-ID: <20231127052024.435743-2-gustavo.rom...@linaro.org> Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Gustavo Romero --- hw/arm/mps2.c | 3 +++ hw/arm/stellaris.c | 3 +++ h

Re: [PATCH 0/9] target/arm: Helper type cleanups

2024-12-16 Thread Peter Maydell
On Fri, 6 Dec 2024 at 03:13, Richard Henderson wrote: > > Add macros such that "fpst" can be used with DEF_HELPER to > indicate float_status* instead of "ptr" for void*. > In addition, fix a few uses of "ptr" that should be "env". > > r~ > > Richard Henderson (9): > target/arm: Introduce fpst al

Re: [PATCH 1/3] target/arm: document the architectural names of our GTIMERs

2024-12-16 Thread Peter Maydell
On Fri, 6 Dec 2024 at 16:02, Alex Bennée wrote: > > As we are about to add more physical and virtual timers lets make it > clear what each timer does. > > Signed-off-by: Alex Bennée > Cc: qemu-sta...@nongnu.org > --- > target/arm/gtimer.h | 10 +- > 1 file changed, 5 insertions(+), 5 del

Re: [PATCH 00/46] tcg: Remove in-flight mask data from OptContext

2024-12-16 Thread Richard Henderson
Ping. On 12/10/24 09:23, Richard Henderson wrote: The desire is to start re-using some of the fold_* functions while lowering or simplifying operations during tcg_optmize. Many of these fold_* functions set z_mask, s_mask, and a_mask, which hang around until the end of the tcg_optimize loop and

Re: [PATCH] tests/tcg/s390x: Use the SLOF libc headers for the multiarch tests

2024-12-16 Thread Philippe Mathieu-Daudé
On 16/12/24 14:37, Ilya Leoshkevich wrote: Compiling the s390x tests on Fedora, which has the s390x cross-compiler installed, fails with: In file included from qemu/tests/tcg/s390x/console.c:8: qemu/tests/tcg/s390x/../../../pc-bios/s390-ccw/sclp.c:11:10: fatal error: string.h: No such

Re: [PATCH v2 1/2] s390x/pci: add support for guests that request direct mapping

2024-12-16 Thread Philippe Mathieu-Daudé
Hi Matthew, On 13/12/24 23:54, Matthew Rosato wrote: When receiving a guest mpcifc(4) or mpcifc(6) instruction without the T bit set, treat this as a request to perform direct mapping instead of address translation. In order to facilitate this, pin the entirety of guest memory into the host iom

Re: [PATCH 0/9] migration: Drop/unexport migration_is_device() and migration_is_active()

2024-12-16 Thread Joao Martins
On 16/12/2024 14:45, Avihai Horon wrote: > On 16/12/2024 14:00, Joao Martins wrote: >> On 16/12/2024 09:46, Avihai Horon wrote: >> I also have a much >> smaller series for that sort of unblockage that I can give you a pointer. > > Yes, if you have it at hand, that could be useful for testing next

[PATCH v13 3/7] target/riscv: Add helper functions to calculate current number of masked bits for pointer masking

2024-12-16 Thread baturo . alexey
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.h| 5 +++ target/riscv/cpu_helper.c | 73 +++ 2 files changed, 78 insertions(+) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 417ff45544..e7f346ff6b 100644 --- a/targ

[PATCH v13 6/7] target/riscv: Apply pointer masking for virtualized memory accesses

2024-12-16 Thread baturo . alexey
From: Alexey Baturo Signed-off-by: Alexey Baturo --- target/riscv/cpu.h | 1 + target/riscv/cpu_helper.c| 18 +++ target/riscv/internals.h | 44 target/riscv/op_helper.c | 16 ++--- target/riscv/vector_helper.c | 21

[PATCH v13 0/7] Pointer Masking update for Zjpm v1.0

2024-12-16 Thread baturo . alexey
From: Alexey Baturo Hi, Rebased and addressed Daniel's comments about the return type of the helper. Thanks [v12]: Rebased and addressed Richard's comments about proper masking virtualized accesses. Thanks [v11]: As suggested on the mailing list by Daniel, I'm resubmitting this series and

[PATCH v13 2/7] target/riscv: Add new CSR fields for S{sn, mn, m}pm extensions as part of Zjpm v1.0

2024-12-16 Thread baturo . alexey
From: Alexey Baturo Signed-off-by: Alexey Baturo Reviewed-by: Daniel Henrique Barboza --- target/riscv/cpu.h | 8 target/riscv/cpu_bits.h | 4 target/riscv/cpu_cfg.h | 3 +++ target/riscv/csr.c | 31 ++- target/riscv/pmp.c | 14

[PATCH v13 4/7] target/riscv: Add pointer masking tb flags

2024-12-16 Thread baturo . alexey
From: Alexey Baturo Signed-off-by: Alexey Baturo Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: LIU Zhiwei --- target/riscv/cpu.h| 3 +++ target/riscv/cpu_helper.c | 3 +++ target/riscv/translate.c | 5 + 3 files changed, 11 insertions(+) diff --git

[PATCH v3 3/8] user: Introduce user/signal.h

2024-12-16 Thread Ilya Leoshkevich
gdbstub needs target_to_host_signal(), so move its declaration to a public header. Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Signed-off-by: Ilya Leoshkevich --- bsd-user/signal-common.h | 1 - bsd-user/signal.c | 1 + include/user/signal.h | 23 +

[PATCH v3 1/8] gdbstub: Allow the %d placeholder in the socket path

2024-12-16 Thread Ilya Leoshkevich
Just like for QEMU_LOG_FILENAME, replace %d with PID in the GDB socket path. This allows running multi-process applications with, e.g., export QEMU_GDB=/tmp/qemu-%d.sock. Currently this is not possible, since the first process will cause the subsequent ones to fail due to not being able to bind() t

[PATCH v3 5/8] osdep: Introduce qemu_kill_thread()

2024-12-16 Thread Ilya Leoshkevich
Add a function for sending signals to individual threads. It does not make sense on Windows, so do not provide an implementation, so that if someone uses it by accident, they will get a linker error. Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Signed-off-by: Ilya Leoshkevich --- in

Re: [PATCH 22/26] rust: qom: add casting functionality

2024-12-16 Thread Zhao Liu
> +/// Macro to mark superclasses of QOM classes. This enables type-safe > +/// up- and downcasting. > +/// > +/// # Safety > +/// > +/// This macro is a thin wrapper around the [`IsA`] trait and performs > +/// no checking whatsoever of what is declared. It is the caller's > +/// responsibility

Re: [PATCH v12 7/7] target/riscv: Enable updates for pointer masking variables and thus enable pointer masking extension

2024-12-16 Thread Daniel Henrique Barboza
On 12/16/24 9:13 AM, Alexey Baturo wrote: Hi Daniel, Indeed this series doesn't include the *Supm* extension, but it's mandatory for RVA23U64. As for the *Supm* itself, if I get it right, I don't think it should be always-on, unless the proper profile is selected. I think we might need to a

Re: [PATCH 3/9] vfio/migration: Refactor vfio_devices_all_running_and_mig_active() logic

2024-12-16 Thread Joao Martins
On 16/12/2024 09:46, Avihai Horon wrote: > During DMA unmap with vIOMMU, vfio_devices_all_running_and_mig_active() > is used to check whether a dirty page log sync of the unmapped pages is > required. Such log sync is needed during migration pre-copy phase, and > the current logic detects it by che

Re: [PATCH 1/1] tests/avocado: update sbsa-ref firmware

2024-12-16 Thread Peter Maydell
On Mon, 25 Nov 2024 at 13:25, Peter Maydell wrote: > > On Mon, 25 Nov 2024 at 12:54, Marcin Juszkiewicz > wrote: > > > > Firmware is built using Debian 'bookworm' cross toolchain (gcc 12.2.0). > > > > Used versions: > > > > - Trusted Firmware v2.12.0 > > - Tianocore EDK2 stable202411 > > - Tianoc

[PATCH] tests/tcg/s390x: Use the SLOF libc headers for the multiarch tests

2024-12-16 Thread Ilya Leoshkevich
Compiling the s390x tests on Fedora, which has the s390x cross-compiler installed, fails with: In file included from qemu/tests/tcg/s390x/console.c:8: qemu/tests/tcg/s390x/../../../pc-bios/s390-ccw/sclp.c:11:10: fatal error: string.h: No such file or directory 11 | #include This

Re: [PATCH 1/9] vfio/container: Add dirty tracking started flag

2024-12-16 Thread Avihai Horon
On 16/12/2024 14:15, Joao Martins wrote: External email: Use caution opening links or attachments On 16/12/2024 09:46, Avihai Horon wrote: Add a flag to VFIOContainerBase that indicates whether dirty tracking has been started for the container or not. This will be used in the following patc

Re: [PATCH 71/71] docs: Constify all Property in examples

2024-12-16 Thread Peter Xu
On Fri, Dec 13, 2024 at 01:31:04PM -0600, Richard Henderson wrote: > Signed-off-by: Richard Henderson Acked-by: Peter Xu -- Peter Xu

Re: [PATCH 0/9] migration: Drop/unexport migration_is_device() and migration_is_active()

2024-12-16 Thread Avihai Horon
On 16/12/2024 14:00, Joao Martins wrote: External email: Use caution opening links or attachments On 16/12/2024 09:46, Avihai Horon wrote: Hello, This follows up on Peter's series [1] to simplify migration status API to a single migration_is_running() function. Peter's series tried to drop

Re: [PATCH 2/9] vfio/migration: Refactor vfio_devices_all_dirty_tracking() logic

2024-12-16 Thread Avihai Horon
On 16/12/2024 14:32, Joao Martins wrote: External email: Use caution opening links or attachments On 16/12/2024 09:46, Avihai Horon wrote: During dirty page log sync, vfio_devices_all_dirty_tracking() is used to check if dirty tracking has been started in order to avoid errors. The current l

Re: [PATCH 3/9] vfio/migration: Refactor vfio_devices_all_running_and_mig_active() logic

2024-12-16 Thread Avihai Horon
On 16/12/2024 14:45, Joao Martins wrote: External email: Use caution opening links or attachments On 16/12/2024 09:46, Avihai Horon wrote: During DMA unmap with vIOMMU, vfio_devices_all_running_and_mig_active() is used to check whether a dirty page log sync of the unmapped pages is required.

Re: [PATCH v2] tests/qtest/sse-timer-test: Add watchdog reset to sse-timer test

2024-12-16 Thread Peter Maydell
On Fri, 13 Dec 2024 at 22:40, Nabih Estefan wrote: > > V2: Removed scripts/meson-buildoptions.sh.tmp Extra file that slipped > through the cracks and shouldn't be in this patch > > Recent CDMSK Watchdog changes (eff9dc5660fad3a610171c56a5ec3fada245e519) > updated the CDMSK APB Watchdog to not free

Re: [PATCH v9 0/6] Add Smrnmi support

2024-12-16 Thread Daniel Henrique Barboza
Hi Frank, Sorry for the delay. It seems like this series is breaking the "make check-functional" test: $ make check-functional (...) 9/10 qemu:func-thorough+func-riscv32-thorough+thorough / func-riscv32-riscv32_tuxrun TIMEOUT 90.03s killed by signal 15 SIGTERM 10/10 qemu:func-thorou

[PATCH] gdbstub: implement reset in system mode

2024-12-16 Thread David Malaschonok
Added a handler for RSP reset commands `R` and `r`. In system mode, we call qemu_system_reset_request. In user mode, no reset is implemented. An error packet is sent instead. Signed-off-by: David Malaschonok --- gdbstub/gdbstub.c | 5 + gdbstub/internals.h | 5 + gdbstub/system.c

Re: [PATCH 5/9] vfio/migration: Drop vfio_dma_unmap_dirty_sync_needed()

2024-12-16 Thread Avihai Horon
On 16/12/2024 14:57, Joao Martins wrote: External email: Use caution opening links or attachments On 16/12/2024 09:46, Avihai Horon wrote: There is no need for vfio_dma_unmap_dirty_sync_needed(), as it simply calls vfio_devices_all_dirty_tracking_started(). Drop vfio_dma_unmap_dirty_sync_ne

Re: [PATCH 23/26] rust: qom: add initial subset of methods on Object

2024-12-16 Thread Zhao Liu
On Mon, Dec 09, 2024 at 01:37:14PM +0100, Paolo Bonzini wrote: > Date: Mon, 9 Dec 2024 13:37:14 +0100 > From: Paolo Bonzini > Subject: [PATCH 23/26] rust: qom: add initial subset of methods on Object > X-Mailer: git-send-email 2.47.1 > > Add an example of implementing instance methods and conver

Re: [PATCH v2] hw/misc/vmfwupdate: Introduce hypervisor fw-cfg interface support

2024-12-16 Thread Philippe Mathieu-Daudé
Hi Ani, On 16/12/24 12:48, Ani Sinha wrote: VM firmware update is a mechanism where the virtual machines can use their preferred and trusted firmware image in their execution environment without having to depend on a untrusted party to provide the firmware bundle. This is particularly useful for

Re: [PATCH 21/26] rust: tests: allow writing more than one test

2024-12-16 Thread Paolo Bonzini
On Thu, Dec 12, 2024 at 10:46 AM Zhao Liu wrote: > > > +fn init_qom() { > > +static ONCE: Mutex> = Mutex::new(Cell::new(false)); > > + > > +let g = ONCE.lock().unwrap(); > > +if !g.get() { > > +unsafe { > > +module_call_init(module_init_type::MODULE_INIT_QOM); > > +

Re: [PATCH v2 2/6] qmp/cont: Only activate disks if migration completed

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > As the comment says, the activation of disks is for the case where > migration has completed, rather than when QEMU is still during > migration (RUN_STATE_INMIGRATE). > > Move the code over to reflect what the comment is describing. > > Cc: Kevin Wolf > Cc: Markus Armbruster

Re: [PATCH v2 3/6] migration/block: Make late-block-active the default

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > Migration capability 'late-block-active' controls when the block drives > will be activated. If enabled, block drives will only be activated until > VM starts, either src runstate was "live" (RUNNING, or SUSPENDED), or it'll > be postponed until qmp_cont(). > > Let's do this u

Re: [PATCH v2 4/6] migration/block: Apply late-block-active behavior to postcopy

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > Postcopy never cared about late-block-active. However there's no mention > in the capability that it doesn't apply to postcopy. > > Considering that we _assumed_ late activation is always good, do that too > for postcopy unconditionally, just like precopy. After this patch, w

Re: [PATCH 22/26] rust: qom: add casting functionality

2024-12-16 Thread Paolo Bonzini
On Mon, Dec 16, 2024 at 1:35 PM Zhao Liu wrote: > > > +/// Macro to mark superclasses of QOM classes. This enables type-safe > > +/// up- and downcasting. > > +/// > > +/// # Safety > > +/// > > +/// This macro is a thin wrapper around the [`IsA`] trait and performs > > +/// no checking whatsoeve

Re: [PATCH v2 5/6] migration/block: Fix possible race with block_inactive

2024-12-16 Thread Fabiano Rosas
Peter Xu writes: > Src QEMU sets block_inactive=true very early before the invalidation takes > place. It means if something wrong happened during setting the flag but > before reaching qemu_savevm_state_complete_precopy_non_iterable() where it > did the invalidation work, it'll make block_inact

Re: [PATCH v12 7/7] target/riscv: Enable updates for pointer masking variables and thus enable pointer masking extension

2024-12-16 Thread Alexey Baturo
Hi Daniel, Indeed this series doesn't include the *Supm* extension, but it's mandatory for RVA23U64. As for the *Supm* itself, if I get it right, I don't think it should be always-on, unless the proper profile is selected. I think we might need to add extra flags like *ext_supm* and *ext_sspm*. Th

Re: [PATCH] target/arm: remove redundant code

2024-12-16 Thread Peter Maydell
On Thu, 12 Dec 2024 at 12:06, wrote: > > From: Denis Rastyogin > > This call is redundant as it only retrieves a value that is not used further. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Denis Rastyogin Applied to target-arm.next, thanks. -- PMM

  1   2   3   >