[PULL 12/13] qapi: Tidy up references to job state CONCLUDED

2025-06-02 Thread Markus Armbruster
When talking about the job state machine, we refer to the states like READY, ABORTING, CONCLUDED, and so forth. Except in two places, where we use JOB_STATUS_CONCLUDED. Replace by CONCLUDED for consistency. We should arguably use the JobStatus enum values instead. Left for another day. Signed-

[PULL 13/13] qapi: Improve documentation around job state @concluded

2025-06-02 Thread Markus Armbruster
We use "the query list" in a few places. It's not entirely obvious what that means. It's actually the output of query-jobs or query-block-jobs. Documentation of @auto-dismiss talks about the job disappearing from the query list when it reaches state @concluded. This is less than precise. The j

[PULL 09/13] qapi: Spell JSON null correctly in blockdev-reopen documentation

2025-06-02 Thread Markus Armbruster
The doc comment misspells JSON null as NULL. Fix that. Cc: Kevin Wolf Signed-off-by: Markus Armbruster Message-ID: <20250527073916.1243024-10-arm...@redhat.com> Reviewed-by: Eric Blake --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core

Re: [PATCH 00/13] qapi: Doc fixes and improvements

2025-06-02 Thread Markus Armbruster
Queued.

Re: [PULL 36/58] pc-bios: Move device tree files in their own subdir

2025-06-02 Thread Bernhard Beschow
Am 2. Juni 2025 08:12:39 UTC schrieb "Philippe Mathieu-Daudé" : >On 30/5/25 02:54, BALATON Zoltan wrote: >> On Thu, 29 May 2025, Bernhard Beschow wrote: >>> Am 25. April 2025 15:28:20 UTC schrieb "Philippe Mathieu-Daudé" >>> : From: BALATON Zoltan We have several device tree f

[PULL 11/13] qapi: Mention both job-cancel and block-job-cancel in doc comments

2025-06-02 Thread Markus Armbruster
Several doc comments mention block-job-cancel where the more generic job-cancel would also work. Adjust them to mention both. Signed-off-by: Markus Armbruster Message-ID: <20250527073916.1243024-12-arm...@redhat.com> Reviewed-by: Eric Blake --- qapi/block-core.json | 10 +- 1 file chan

[PULL 02/13] qapi: Tidy up whitespace in doc comments

2025-06-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20250527073916.1243024-3-arm...@redhat.com> Reviewed-by: Eric Blake --- qapi/block-core.json | 16 qapi/block-export.json | 4 ++-- qapi/char.json | 2 +- qapi/crypto.json | 3 ++- qapi/job.json | 8 -

[PULL 01/13] qapi: Tidy up run-together sentences in doc comments

2025-06-02 Thread Markus Armbruster
Fixes: a937b6aa739f (qapi: Reformat doc comments to conform to current conventions) Signed-off-by: Markus Armbruster Message-ID: <20250527073916.1243024-2-arm...@redhat.com> Reviewed-by: Eric Blake --- qapi/acpi.json | 2 +- qapi/block-core.json | 14 +++--- qapi/crypto.json

[PULL 07/13] qapi: Fix capitalization in doc comments

2025-06-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20250527073916.1243024-8-arm...@redhat.com> Reviewed-by: Eric Blake --- qapi/block-core.json | 6 +++--- qapi/block.json | 2 +- qapi/cryptodev.json | 2 +- qapi/cxl.json | 2 +- qapi/machine.json | 2 +- qapi/misc-i386.json |

[PULL 08/13] qapi: Use proper markup instead of CAPS for emphasis in doc comments

2025-06-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-ID: <20250527073916.1243024-9-arm...@redhat.com> Reviewed-by: Eric Blake --- qapi/block-core.json | 2 +- qapi/dump.json | 6 +++--- qapi/migration.json | 26 +- qapi/misc.json | 4 ++-- 4 files changed, 19 insertio

[PULL 10/13] qapi: Refer to job-FOO instead of deprecated block-job-FOO in docs

2025-06-02 Thread Markus Armbruster
We deprecated several block-job-FOO commands in commit b836bf2ab68 (qapi/block-core: deprecate some block-job- APIs). Update the doc comments to refer to their replacements instead. Signed-off-by: Markus Armbruster Message-ID: <20250527073916.1243024-11-arm...@redhat.com> Reviewed-by: Eric Blake

[PULL 00/13] QAPI patches patches for 2025-06-03

2025-06-02 Thread Markus Armbruster
The following changes since commit 6322b753f798337835e205b6d805356bea582c86: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2025-06-02 14:52:45 -0400) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2025-0

[PULL 05/13] qapi: Drop a problematic (Since: 2.11) from query-hotpluggable-cpus

2025-06-02 Thread Markus Armbruster
There is a (Since: 2.11) in a query-hotpluggable-cpus example. Versioning information ought to be in the command description, not examples. The command description is basically empty (there is a TODO about it). What exactly didn't work before 2.11 is not quite clear from the documentation. The e

Re: [PATCH v6 4/5] ram-block-attributes: Introduce RamBlockAttributes to manage RAMBlock with guest_memfd

2025-06-02 Thread Chenyi Qiang
On 6/3/2025 1:26 PM, Gupta, Pankaj wrote: > On 6/3/2025 3:26 AM, Chenyi Qiang wrote: >> >> >> On 6/1/2025 5:58 PM, Gupta, Pankaj wrote: >>> On 5/30/2025 10:32 AM, Chenyi Qiang wrote: Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") highlighted that subsyst

Re: [PATCH] meson: use config_base_arch for target libraries

2025-06-02 Thread Thomas Huth
On 03/06/2025 01.38, Pierrick Bouvier wrote: Fixed commit introduced common dependencies for target libraries. Alas, it wrongly reused the 'target' variable, which was previously set from another loop. Thus, some dependencies were missing depending on order of target list, as found here [1]. Th

Re: [RFC 08/11] aio-posix: gracefully handle io_uring_queue_init() failure

2025-06-02 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Wed, May 28, 2025 at 05:12:14PM -0500, Eric Blake wrote: >> On Wed, May 28, 2025 at 03:09:13PM -0400, Stefan Hajnoczi wrote: >> > io_uring may not be available at runtime due to system policies (e.g. >> > the io_uring_disabled sysctl) or creation could fail due to fil

Re: [PATCH 14/14] docs: update Rust module status

2025-06-02 Thread Zhao Liu
On Fri, May 30, 2025 at 10:03:06AM +0200, Paolo Bonzini wrote: > Date: Fri, 30 May 2025 10:03:06 +0200 > From: Paolo Bonzini > Subject: [PATCH 14/14] docs: update Rust module status > X-Mailer: git-send-email 2.49.0 > > error is new; offset_of is gone. > > Signed-off-by: Paolo Bonzini > --- >

[PATCH 2/3] i386/tdx: Fix the typo of the comment of struct TdxGuest

2025-06-02 Thread Xiaoyao Li
Change sha348 to sha384. Signed-off-by: Xiaoyao Li --- target/i386/kvm/tdx.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/kvm/tdx.h b/target/i386/kvm/tdx.h index 04b5afe199f9..8dd66e90149b 100644 --- a/target/i386/kvm/tdx.h +++ b/target/i386/kvm/tdx.h @@

Re: [PATCH v6 4/5] ram-block-attributes: Introduce RamBlockAttributes to manage RAMBlock with guest_memfd

2025-06-02 Thread Gupta, Pankaj
On 6/3/2025 3:26 AM, Chenyi Qiang wrote: On 6/1/2025 5:58 PM, Gupta, Pankaj wrote: On 5/30/2025 10:32 AM, Chenyi Qiang wrote: Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") highlighted that subsystems like VFIO may disable RAM block discard. However, guest_memf

[PATCH 0/3] TDX: Fix and enhancement

2025-06-02 Thread Xiaoyao Li
Patch 1 and patch 3 are the left review feedback of TDX QEMU v9 series. Patch 2 is caught during preparing patch 3. Xiaoyao Li (3): i386/cpu: Rename enable_cpuid_0x1f to force_cpuid_0x1f i386/tdx: Fix the typo of the comment of struct TdxGuest i386/tdx: Clarify the error message of mrc

[PATCH 1/3] i386/cpu: Rename enable_cpuid_0x1f to force_cpuid_0x1f

2025-06-02 Thread Xiaoyao Li
The name of "enable_cpuid_0x1f" isn't right to its behavior because the leaf 0x1f can be enabled even when "enable_cpuid_0x1f" is false. Rename it to "force_cpuid_0x1f" to better reflect its behavior. Suggested-by: Igor Mammedov Signed-off-by: Xiaoyao Li --- Suggested by Igor at https://lore.k

[PATCH 3/3] i386/tdx: Clarify the error message of mrconfigid/mrowner/mrownerconfig

2025-06-02 Thread Xiaoyao Li
The error message is misleading - we successfully decoded the data, the decoded data was simply with the wrong length. Change the error message to show it is an length check failure with both the received and expected values. Suggested-by: Daniel P. Berrangé Signed-off-by: Xiaoyao Li --- Sugges

Re: [PATCH] hw/riscv/riscv-iommu: Fix PPN field of Translation-reponse register

2025-06-02 Thread liu
Hi Alistair, Thanks for your review. On 6/2/2025 1:11 PM, Alistair Francis wrote: > On Thu, May 29, 2025 at 10:52 PM Nutty Liu > wrote: >> The original implementation incorrectly performed a bitwise AND >> operation between the PPN of iova and PPN Mask, leading to an >> incorrect PPN field in Tr

RE: [PATCH v2 2/2] target/riscv: Support matching scontext in Sdtrig's textra CSRs

2025-06-02 Thread 張哲嘉
Hi Alistair, > -Original Message- > From: qemu-riscv-bounces+alvinga=andestech@nongnu.org > On Behalf Of > Alistair Francis > Sent: Thursday, March 6, 2025 2:18 PM > To: Florian Lugou > Cc: qemu-devel@nongnu.org; Palmer Dabbelt ; > Alistair Francis ; Bin Meng > ; Weiwei Li ; Daniel >

Re: [PATCH] hw/loongarch/virt: inform guest of kvm

2025-06-02 Thread Bibo Mao
Reviewed-by: Bibo Mao On 2025/6/3 上午11:18, Qiang Ma wrote: Commit bab27ea2e3 ("hw/arm/virt: smbios: inform guest of kvm") fixes the same issue on arm. without this patch: [root@localhost ~]# virt-what qemu with this patch: [root@localhost ~]# virt-what kvm Signed-off-by: Qiang Ma --- hw/l

Re: [PATCH 10/14] hpet: adjust VMState for consistency with Rust version

2025-06-02 Thread Zhao Liu
On Fri, May 30, 2025 at 10:03:02AM +0200, Paolo Bonzini wrote: > Date: Fri, 30 May 2025 10:03:02 +0200 > From: Paolo Bonzini > Subject: [PATCH 10/14] hpet: adjust VMState for consistency with Rust > version > X-Mailer: git-send-email 2.49.0 > > No functional change intended. > > Suggested-by: Z

[PATCH] hw/loongarch/virt: inform guest of kvm

2025-06-02 Thread Qiang Ma
Commit bab27ea2e3 ("hw/arm/virt: smbios: inform guest of kvm") fixes the same issue on arm. without this patch: [root@localhost ~]# virt-what qemu with this patch: [root@localhost ~]# virt-what kvm Signed-off-by: Qiang Ma --- hw/loongarch/virt.c | 4 1 file changed, 4 insertions(+) diff

RE: [PATCH v2 3/4] vfio/iommufd: Implement [at|de]tach_hwpt handlers

2025-06-02 Thread Duan, Zhenzhong
>-Original Message- >From: Nicolin Chen >Subject: Re: [PATCH v2 3/4] vfio/iommufd: Implement [at|de]tach_hwpt handlers > >On Fri, May 30, 2025 at 05:35:11PM +0800, Zhenzhong Duan wrote: >> Implement [at|de]tach_hwpt handlers in VFIO subsystem. vIOMMU >> utilizes them to attach to or det

Re: [PATCH 1/2] i386/tdx: Fix build on 32-bit host

2025-06-02 Thread Xiaoyao Li
On 6/3/2025 1:31 AM, Cédric Le Goater wrote: Use PRI formats where required and fix pointer cast. Maybe we can make 32-bit build exclusive with CONFIG_TDX? since TDX is not supported on 32-bit host. Cc: Xiaoyao Li Signed-off-by: Cédric Le Goater --- target/i386/kvm/tdx.c | 26 ++

Re: [PATCH] hw/loongarch/virt: inform guest of kvm

2025-06-02 Thread gaosong
在 2025/6/3 上午11:18, Qiang Ma 写道: Commit bab27ea2e3 ("hw/arm/virt: smbios: inform guest of kvm") fixes the same issue on arm. without this patch: [root@localhost ~]# virt-what qemu with this patch: [root@localhost ~]# virt-what kvm Signed-off-by: Qiang Ma --- hw/loongarch/virt.c | 4 1

RE: [PATCH v2 4/4] vfio/iommufd: Save vendor specific device info

2025-06-02 Thread Duan, Zhenzhong
>-Original Message- >From: Nicolin Chen >Subject: Re: [PATCH v2 4/4] vfio/iommufd: Save vendor specific device info > >On Fri, May 30, 2025 at 05:35:12PM +0800, Zhenzhong Duan wrote: >> Some device information returned by ioctl(IOMMU_GET_HW_INFO) are vendor >> specific. Save them as raw

[PATCH v2] target/loongarch: add check for fcond

2025-06-02 Thread Song Gao
fcond only has 22 types, add a check for fcond. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2972 Signed-off-by: Song Gao --- .../loongarch/tcg/insn_trans/trans_fcmp.c.inc | 25 +-- .../loongarch/tcg/insn_trans/trans_vec.c.inc | 16 +--- 2 files changed, 30 i

RE: [PATCH v2 2/4] vfio/iommufd: Add properties and handlers to TYPE_HOST_IOMMU_DEVICE_IOMMUFD

2025-06-02 Thread Duan, Zhenzhong
>-Original Message- >From: Nicolin Chen >Subject: Re: [PATCH v2 2/4] vfio/iommufd: Add properties and handlers to >TYPE_HOST_IOMMU_DEVICE_IOMMUFD > >On Fri, May 30, 2025 at 05:35:10PM +0800, Zhenzhong Duan wrote: >> Enhance HostIOMMUDeviceIOMMUFD object with 3 new members, specific >> t

[PATCH v2] target/loongarch: fix vldi/xvldi raise wrong error

2025-06-02 Thread Song Gao
on qemu we got an aborted error ** ERROR:../target/loongarch/tcg/insn_trans/trans_vec.c.inc:3574:vldi_get_value: code should not be reached Bail out! ERROR:../target/loongarch/tcg/insn_trans/trans_vec.c.inc:3574:vldi_get_value: code should not be reached Aborted (core dumped) bu on 3A600/3A5000

Re: [PATCH v2] virtio-net: Add queues for RSS during migration

2025-06-02 Thread Jason Wang
On Fri, May 30, 2025 at 1:19 PM Akihiko Odaki wrote: > > virtio_net_pre_load_queues() inspects vdev->guest_features to tell if > VIRTIO_NET_F_RSS or VIRTIO_NET_F_MQ is enabled to infer the required > number of queues. This works for VIRTIO_NET_F_MQ but it doesn't for > VIRTIO_NET_F_RSS because onl

Re: [PATCH] net: fix buffer overflow in af_xdp_umem_create()

2025-06-02 Thread Jason Wang
On Mon, Jun 2, 2025 at 4:57 PM Anastasia Belova wrote: > > s->pool has n_descs elements so maximum i should be > n_descs - 1. Fix the upper bound. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: cb039ef3d9 ("net: add initial support for AF_XDP network backend") > S

Re: [PATCH 03/14] util/error: expose Error definition to Rust code

2025-06-02 Thread Zhao Liu
On Fri, May 30, 2025 at 10:02:55AM +0200, Paolo Bonzini wrote: > Date: Fri, 30 May 2025 10:02:55 +0200 > From: Paolo Bonzini > Subject: [PATCH 03/14] util/error: expose Error definition to Rust code > X-Mailer: git-send-email 2.49.0 > > This is used to preserve the file and line in a roundtrip fr

Re: [PATCH 0/5] Enable QEMU TCI to run 64bit guests on browsers

2025-06-02 Thread Kohei Tokunaga
Hi all, Kinldy ping on this patch series. I would appreciate any feedback or comments. Patchew URL: https://patchew.org/QEMU/cover.1747922170.git.ktokunaga.m...@gmail.com/ Kohei

Re: [PATCH v6 4/5] ram-block-attributes: Introduce RamBlockAttributes to manage RAMBlock with guest_memfd

2025-06-02 Thread Chenyi Qiang
On 6/3/2025 5:10 AM, David Hildenbrand wrote: > On 30.05.25 10:32, Chenyi Qiang wrote: >> Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated >> discard") highlighted that subsystems like VFIO may disable RAM block >> discard. However, guest_memfd relies on discard operations fo

[PATCH 15/21] migration: Add capabilities into MigrationParameters

2025-06-02 Thread Fabiano Rosas
Add capabilities to MigrationParameters. This structure will hold all migration options. Capabilities will go away in the next patch. Also add capabilities to MigrationParameter as the enum needs to be kept in sync with MigrationParameters. This affects the parsing of migration HMP commands so mak

[PATCH 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-02 Thread Fabiano Rosas
QAPI_CLONE_MEMBERS is a better option than copying parameters one by one because it operates on the entire struct and follows pointers. It also avoids the need to alter this function every time a new parameter is added. Note, since this is a deep clone, now we must free the TLS strings before assi

[PATCH 16/21] qapi/migration: Mark that query/set-migrate-parameters support capabilities

2025-06-02 Thread Fabiano Rosas
Add a QAPI command feature "capabilities" that can be queried by the client to check that the parameters commands now also support capabilities. Signed-off-by: Fabiano Rosas --- qapi/migration.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/mig

[PATCH 21/21] tests/qtest/migration: Add a test for config passing

2025-06-02 Thread Fabiano Rosas
Pass the config directly via the migrate/incoming command. Signed-off-by: Fabiano Rosas --- tests/qtest/migration/framework.h | 2 ++ tests/qtest/migration/misc-tests.c | 39 ++ 2 files changed, 41 insertions(+) diff --git a/tests/qtest/migration/framework.h b/tes

[PATCH 05/21] migration: Add a flag to track block-bitmap-mapping input

2025-06-02 Thread Fabiano Rosas
The QAPI converts an empty list on the block-bitmap-mapping input into a NULL BitmapMigrationNodeAliasList. The empty list is a valid input for the block-bitmap-mapping option, so commit 3cba22c9ad ("migration: Fix block_bitmap_mapping migration") started using the s->parameters.has_block_bitmap_ma

[PATCH 00/21] migration: Unify capabilities and parameters

2025-06-02 Thread Fabiano Rosas
Hi, Thanks for the reviews in the last round. Your feedback has allowed me to reduce the complexity of the series and the code considerably. Changes in this v2: - Followed the suggestion to unify the TLS strings as StrOrNull. This allows the complete removal of the MigrateSetParameters type.

[PATCH 07/21] migration: Set block_bitmap_mapping unconditionally in query-migrate-parameters

2025-06-02 Thread Fabiano Rosas
The response type of query-migrate-parameters is MigrationParameters, the members of which are marked as optional in migration.json. However, the design of query-migrate-parameters is that all members are to be non-optional. The optionality is an attempt at compatibility with MigrateSetParameters,

[PATCH 17/21] migration: Remove s->capabilities

2025-06-02 Thread Fabiano Rosas
Last patch added capabilities to s->parameters. Now we can replace all instances of s->capabilities with s->parameters: - The -global properties now get set directly in s->parameters. - Accessors from options.c now read from s->parameters. - migrate_caps_check() now takes a MigrationParameters o

[PATCH 04/21] migration: Run a post update routine after setting parameters

2025-06-02 Thread Fabiano Rosas
Some migration parameters are updated immediately once they are set via migrate-set-parameters. Move that work outside of migrate_params_apply() and leave that function with the single responsibility of setting s->parameters and not doing any side-effects. Reviewed-by: Peter Xu Signed-off-by: Fab

[PATCH 09/21] migration: Extract code to mark all parameters as present

2025-06-02 Thread Fabiano Rosas
MigrationParameters needs to have all of its has_* fields marked as true when used as the return of query_migrate_parameters because the corresponding QMP command has all of its members non-optional by design, despite them being marked as optional in migration.json. Extract this code into a functi

[PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-02 Thread Fabiano Rosas
Allow the migrate and migrate_incoming commands to pass the migration configuration options all at once, dispensing the use of migrate-set-parameters and migrate-set-capabilities. The motivation of this is to simplify the interface with the management layer and avoid the usage of several command i

[PATCH 06/21] migration: Remove checks for s->parameters has_* fields

2025-06-02 Thread Fabiano Rosas
The migration parameters validation produces a temporary structure which is the merge of the current parameter values (s->parameters, MigrationParameters) with the new parameters set by the user (MigrateSetParameters). When copying the values from s->parameters into the temporary structure, the ha

[PATCH 14/21] migration: Cleanup hmp_info_migrate_parameters

2025-06-02 Thread Fabiano Rosas
Do a cleanup of hmp_info_migrate_parameters() before adding more lines into it: - Make sure every parameter asserts that the has_* field is set. qmp_query_migrate_parameters should have set them all. - Remove the if (params), qmp_query_migrate_parameters never returns NULL. - Add a macro to

[PATCH 20/21] libqtest: Add a function to check whether a QMP command supports a feature

2025-06-02 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- tests/qtest/libqtest.c | 42 ++ tests/qtest/libqtest.h | 12 2 files changed, 54 insertions(+) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 94526b7f9c..7ee4831841 100644 --- a/tests/qtest/

[PATCH 11/21] migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_apply

2025-06-02 Thread Fabiano Rosas
Use QAPI_CLONE_MEMBERS instead of making an assignment. The QAPI method makes the handling of the TLS strings more intuitive because it clones them as well. Signed-off-by: Fabiano Rosas --- migration/options.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff -

[PATCH 03/21] qapi/migration: Don't document MigrationParameter

2025-06-02 Thread Fabiano Rosas
The MigrationParameter (singular) enumeration is not part of the migration QMP API, it's only used for nicely converting HMP strings into MigrationParameters (plural) members and for providing readline completion. Documenting this enum only serves to duplicate documentation between MigrationParame

[PATCH 12/21] migration: Use QAPI_CLONE_MEMBERS in migrate_params_apply

2025-06-02 Thread Fabiano Rosas
Instead of setting parameters one by one, use the temporary object, which already contains the current migration parameters plus the new ones and was just validated by migration_params_check(). Use cloning to overwrite it. This avoids the need to alter this function every time a new parameter is a

[PATCH 08/21] migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE

2025-06-02 Thread Fabiano Rosas
The QERR_INVALID_PARAMETER_VALUE macro is documented as not to be used in new code. Remove the usage from migration/options.c. Signed-off-by: Fabiano Rosas --- migration/migration.c | 3 +-- migration/options.c| 56 +++--- migration/page_cache.c | 6 ++-

[PATCH 18/21] qapi/migration: Deprecate capabilities commands

2025-06-02 Thread Fabiano Rosas
The concept of capabilities is being merged into the concept of parameters. From now on, the commands that handle capabilities are deprecated in favor of the commands that handle parameters. Affected commands: - migrate-set-capabilities - query-migrate-capabilities Signed-off-by: Fabiano Rosas

[PATCH 02/21] migration: Remove MigrateSetParameters

2025-06-02 Thread Fabiano Rosas
Now that the TLS options have been made the same between migrate-set-parameters and query-migrate-parameters, a single type can be used. Remove MigrateSetParameters. The TLS options documentation from MigrationParameters were replaced with the ones from MigrateSetParameters which was more complete

[PATCH 01/21] migration: Normalize tls arguments

2025-06-02 Thread Fabiano Rosas
The migration parameters tls_creds, tls_authz and tls_hostname currently have a non-uniform handling. When used as arguments to migrate-set-parameters, their type is StrOrNull and when used as return value from query-migrate-parameters, their type is a plain string. Not only having to convert betw

[PATCH 13/21] migration: Use visitors in migrate_params_test_apply

2025-06-02 Thread Fabiano Rosas
Convert the code in migrate_params_test_apply() from an open-coded copy of every migration parameter to a copy using visitors. This hides the details of QAPI from the migration code and avoids the need to update migrate_params_test_apply() every time a new migration parameter is added. Both were v

Re: [PATCH v6 4/5] ram-block-attributes: Introduce RamBlockAttributes to manage RAMBlock with guest_memfd

2025-06-02 Thread Chenyi Qiang
On 6/1/2025 5:58 PM, Gupta, Pankaj wrote: > On 5/30/2025 10:32 AM, Chenyi Qiang wrote: >> Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated >> discard") highlighted that subsystems like VFIO may disable RAM block >> discard. However, guest_memfd relies on discard operations fo

Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests

2025-06-02 Thread Bibo Mao
On 2025/6/3 上午5:58, Michael S. Tsirkin wrote: On Mon, Jun 02, 2025 at 02:31:19PM -0400, Michael S. Tsirkin wrote: On Mon, Jun 02, 2025 at 02:25:48PM -0400, Stefan Hajnoczi wrote: On Mon, Jun 2, 2025 at 1:54 PM Michael S. Tsirkin wrote: On Mon, Jun 02, 2025 at 12:39:17PM -0400, Stefan Hajn

Re: [PATCH 01/13] migration: Add option to set postcopy-blocktime

2025-06-02 Thread Fabiano Rosas
Peter Xu writes: > Add a global property to allow enabling postcopy-blocktime feature. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

[PATCH 0/2] Add support for NVMe Namespace and Boundary Atomic Parameters

2025-06-02 Thread Alan Adamson
This patch set is a follow on to commit ebd1568fc732 ("hw/nvme: add atomic write support"). These patches introduces two updates to the NVMe subsystem in QEMU, both aimed at enhancing atomic write support for namespaces. hw/nvme: enable ns atomic writes This patc

Re: [PATCH] meson: use config_base_arch for target libraries

2025-06-02 Thread Pierrick Bouvier
On 6/2/25 4:38 PM, Pierrick Bouvier wrote: Fixed commit introduced common dependencies for target libraries. Alas, it wrongly reused the 'target' variable, which was previously set from another loop. Thus, some dependencies were missing depending on order of target list, as found here [1]. The

Re: [PULL 02/77] hw/arm: remove explicit dependencies listed

2025-06-02 Thread Pierrick Bouvier
On 6/2/25 3:37 PM, Pierrick Bouvier wrote: On 6/2/25 2:11 PM, Cédric Le Goater wrote: On 6/2/25 22:53, Nabih Estefan wrote: Hi Pierrick, For what it's worth, those files were also breaking on Ubuntu and Debian for me. I had to explicitly `sudo apt install libfdt-dev` for it to work again. I do

[PATCH] meson: use config_base_arch for target libraries

2025-06-02 Thread Pierrick Bouvier
Fixed commit introduced common dependencies for target libraries. Alas, it wrongly reused the 'target' variable, which was previously set from another loop. Thus, some dependencies were missing depending on order of target list, as found here [1]. The fix is to use the correct config_base_arch in

Re: [PATCH v7 3/9] plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W callbacks

2025-06-02 Thread Pierrick Bouvier
On 6/2/25 12:57 PM, Rowan Hart wrote: This patch adds functionality to enforce the requested QEMU_PLUGIN_CB_ flags level passed when registering a callback function using the plugins API. Each time a callback is about to be invoked, a thread-local variable will be updated with the level that call

[PATCH 1/2] hw/nvme: enable ns atomic writes

2025-06-02 Thread Alan Adamson
Add support for the namespace atomic paramters: NAWUN and NAWUN. Namespace Atomic Compare and Write Unit (NACWU) is not currently supported. Writes that adhere to the NACWU and NAWUPF parameters are guaranteed to be atomic. New NVMe QEMU Paramters (See NVMe Specification for details): ato

[PATCH 2/2] hw/nvme: add atomic boundary support

2025-06-02 Thread Alan Adamson
Add support for the namespace atomic boundary paramters: NABO, NABSN, and NABSPF. Writes that cross an atomic boundary whose size is less than or equal to values reported by AWUN/AWUPF are guaranteed to be atomic. If AWUN/AWUPF is set to zero, writes that cross an atomic boundary are not guarant

Re: [RFC 08/11] aio-posix: gracefully handle io_uring_queue_init() failure

2025-06-02 Thread Brian
On 6/2/25 4:20 PM, Stefan Hajnoczi wrote: On Mon, Jun 02, 2025 at 08:26:39AM -0400, Brian wrote: On 5/28/25 3:09 PM, Stefan Hajnoczi wrote: io_uring may not be available at runtime due to system policies (e.g. the io_uring_disabled sysctl) or creation could fail due to file descriptor resource

Re: [PULL 02/77] hw/arm: remove explicit dependencies listed

2025-06-02 Thread Pierrick Bouvier
On 6/2/25 2:11 PM, Cédric Le Goater wrote: On 6/2/25 22:53, Nabih Estefan wrote: Hi Pierrick, For what it's worth, those files were also breaking on Ubuntu and Debian for me. I had to explicitly `sudo apt install libfdt-dev` for it to work again. I don't believe it was installed at all previous

[PULL 1/1] trace/simple: seperate hot paths of tracing fucntions

2025-06-02 Thread Stefan Hajnoczi
From: Tanish Desai This change improves performance by moving the hot path of the trace_vhost_commit()(or any other trace function) logic to the header file. Previously, even when the trace event was disabled, the function call chain:- trace_vhost_commit()(Or any other trace function) →

[PULL 0/1] Tracing patches

2025-06-02 Thread Stefan Hajnoczi
The following changes since commit 6322b753f798337835e205b6d805356bea582c86: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2025-06-02 14:52:45 -0400) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/tracing-pull-r

Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests

2025-06-02 Thread Stefan Hajnoczi
On Mon, Jun 2, 2025 at 5:58 PM Michael S. Tsirkin wrote: > > On Mon, Jun 02, 2025 at 02:31:19PM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 02, 2025 at 02:25:48PM -0400, Stefan Hajnoczi wrote: > > > On Mon, Jun 2, 2025 at 1:54 PM Michael S. Tsirkin wrote: > > > > > > > > On Mon, Jun 02, 2025

Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests

2025-06-02 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH 1/3] trace/syslog: seperate cold paths of tracing functions

2025-06-02 Thread Stefan Hajnoczi
On Sun, Jun 01, 2025 at 06:12:29PM +, Tanish Desai wrote: > inline: move hot paths from .c to .h for better performance > Moved frequently used hot paths from the .c file to the .h file to enable > inlining > and improve performance. This approach is inspired by past QEMU optimizations, > wher

Re: [PATCH] trace/simple: seperate hot paths of tracing fucntions

2025-06-02 Thread Stefan Hajnoczi
Applied to my tracing tree, thanks! https://gitlab.com/stefanha/qemu/-/commit/ffcfb0faaa95fc6ca007f7dd989e390dacf936ca Stefan

Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-02 Thread Stefan Hajnoczi
On Sun, Jun 01, 2025 at 06:12:30PM +, Tanish Desai wrote: > Moved rarely used (cold) code from the header file to the C file to avoid > unnecessary inlining and reduce binary size. How much of a binary size reduction do you measure? Most trace events are only called once, so the difference in

Re: [RFC 08/11] aio-posix: gracefully handle io_uring_queue_init() failure

2025-06-02 Thread Stefan Hajnoczi
On Mon, Jun 02, 2025 at 08:26:39AM -0400, Brian wrote: > On 5/28/25 3:09 PM, Stefan Hajnoczi wrote: > > io_uring may not be available at runtime due to system policies (e.g. > > the io_uring_disabled sysctl) or creation could fail due to file > > descriptor resource limits. > > > > Handle failure

Re: [PULL 00/31] virtio,pci,pc: features, fixes, tests

2025-06-02 Thread Michael S. Tsirkin
On Mon, Jun 02, 2025 at 02:31:19PM -0400, Michael S. Tsirkin wrote: > On Mon, Jun 02, 2025 at 02:25:48PM -0400, Stefan Hajnoczi wrote: > > On Mon, Jun 2, 2025 at 1:54 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Jun 02, 2025 at 12:39:17PM -0400, Stefan Hajnoczi wrote: > > > > On Sun, Jun 1, 20

Re: [PATCH v7 3/9] plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W callbacks

2025-06-02 Thread Rowan Hart
@@ -437,6 +437,10 @@ int qemu_plugin_read_register(struct qemu_plugin_register *reg, GByteArray *buf)   {   g_assert(current_cpu);   +    if (qemu_plugin_get_cb_flags() == QEMU_PLUGIN_CB_NO_REGS) { +    return -1; +    } +   return gdb_read_register(current_cpu, buf, GPOINTER_TO_INT

[PATCH v3 6/6] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation

2025-06-02 Thread Shameer Kolothum via
Allow cold-plug of smmuv3 device to virt if there is no machine wide legacy smmuv3 or a virtio-iommu is specified. Device tree support for new smmuv3 dev is limited to the case where it is associated with the default pcie.0 RC. Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3.c | 2 ++ h

Re: [PATCH v6 4/5] ram-block-attributes: Introduce RamBlockAttributes to manage RAMBlock with guest_memfd

2025-06-02 Thread David Hildenbrand
On 30.05.25 10:32, Chenyi Qiang wrote: Commit 852f0048f3 ("RAMBlock: make guest_memfd require uncoordinated discard") highlighted that subsystems like VFIO may disable RAM block discard. However, guest_memfd relies on discard operations for page conversion between private and shared memory, poten

Re: [PULL 02/77] hw/arm: remove explicit dependencies listed

2025-06-02 Thread Cédric Le Goater
On 6/2/25 22:53, Nabih Estefan wrote: Hi Pierrick, For what it's worth, those files were also breaking on Ubuntu and Debian for me. I had to explicitly `sudo apt install libfdt-dev` for it to work again. I don't believe it was installed at all previously, but QEMU was building and working correc

Re: [PULL 02/77] hw/arm: remove explicit dependencies listed

2025-06-02 Thread Nabih Estefan
Hi Pierrick, For what it's worth, those files were also breaking on Ubuntu and Debian for me. I had to explicitly `sudo apt install libfdt-dev` for it to work again. I don't believe it was installed at all previously, but QEMU was building and working correctly without it being explicitly installe

Re: [PATCH] hw/arm/virt: Check bypass iommu is not set for iommu-map DT property

2025-06-02 Thread Donald Dutile
On 6/2/25 7:46 AM, Shameer Kolothum wrote: default_bus_bypass_iommu tells us whether the bypass_iommu is set for the default PCIe root bus. Make sure we check that before adding the "iommu-map" DT property. Fixes: 6d7a85483a06 ("hw/arm/virt: Add default_bus_bypass_iommu machine option") Sugge

Re: [PATCH v3 0/2] amd_iommu: Fixes

2025-06-02 Thread Michael Tokarev
On 16.05.2025 13:05, Sairaj Kodilkar wrote: Fix following two issues in the amd viommu 1. The guest fails to setup the passthrough device when for following setup because amd iommu enables the no DMA memory region even when guest is using DMA remapping mode. -device amd-iommu,intrem

Re: [PATCH 04/13] migration/postcopy: Make all blocktime vars 64bits

2025-06-02 Thread Fabiano Rosas
Peter Xu writes: > I am guessing it was used to be 32bits because of the atomic ops. Now all > the atomic ops are gone and we're protected by a mutex instead, it's ok we > can switch to 64 bits. > > Reasons to move over: > > - Allow further patches to change the unit from ms to us: with postco

[PATCH v7 5/9] plugins: Add memory hardware address read/write API

2025-06-02 Thread Rowan Hart
From: novafacing This patch adds functions to the plugins API to allow plugins to read and write memory via hardware addresses. The functions use the current address space of the current CPU in order to avoid exposing address space information to users. A later patch may want to add a function to

[PATCH v7 0/9] Add additional plugin API functions to read and write memory and registers

2025-06-02 Thread Rowan Hart
This patch series adds several new API functions focused on enabling use cases around reading and writing guest memory from QEMU plugins. To support these new APIs, some utility functionality around retrieving information about address spaces is added as well. The new qemu_plugin_write_register ut

[PATCH v7 4/9] plugins: Add memory virtual address write API

2025-06-02 Thread Rowan Hart
From: novafacing This patch adds functions to the plugins API to allow reading and writing memory via virtual addresses. These functions only permit doing so on the current CPU, because there is no way to ensure consistency if plugins are allowed to read or write to other CPUs that aren't current

[PATCH v7 1/9] gdbstub: Expose gdb_write_register function to consumers of gdbstub

2025-06-02 Thread Rowan Hart
From: novafacing This patch exposes the gdb_write_register function from gdbstub/gdbstub.c via the exec/gdbstub.h header file to support use in plugins to write register contents. Signed-off-by: novafacing Signed-off-by: Rowan Hart Reviewed-by: Alex Benée Reviewed-by: Julian Ganz Reviewed-by

[PATCH v7 8/9] plugins: Remove use of qemu_plugin_read_register where it is not permitted

2025-06-02 Thread Rowan Hart
This patch is required to make the insn plugin work after adding enforcement of QEMU_PLUGIN_CB_ flags in calls to read or write registers. Previously, these flags were not enforced and the API could be called from anywhere, but this was not intended as described by the documentation. Now, the flags

[PATCH v7 7/9] plugins: Add hypercalls plugin and test

2025-06-02 Thread Rowan Hart
From: novafacing This patch adds a plugin that implements a simple form of hypercalls from guest code to the plugin by using the register read API. It accepts only one hypercall, which writes a magic value to guest memory. Signed-off-by: novafacing Signed-off-by: Rowan Hart --- tests/tcg/Make

[PATCH v7 9/9] plugins: Update plugin version and add notes

2025-06-02 Thread Rowan Hart
From: novafacing This patch updates the plugin version to gate new APIs and adds notes describing what has been added. Signed-off-by: Rowan Hart --- include/qemu/qemu-plugin.h | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/

[PATCH v7 3/9] plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W callbacks

2025-06-02 Thread Rowan Hart
This patch adds functionality to enforce the requested QEMU_PLUGIN_CB_ flags level passed when registering a callback function using the plugins API. Each time a callback is about to be invoked, a thread-local variable will be updated with the level that callback requested. Then, called API functio

[PATCH v7 6/9] plugins: Add patcher plugin and test

2025-06-02 Thread Rowan Hart
From: novafacing This patch adds a plugin that exercises the virtual and hardware memory read-write API functions added in a previous patch. The plugin takes a target and patch byte sequence, and will overwrite any instruction matching the target byte sequence with the patch. Signed-off-by: nova

[PATCH v7 2/9] plugins: Add register write API

2025-06-02 Thread Rowan Hart
From: novafacing This patch adds a function to the plugins API to allow plugins to write register contents. It also moves the qemu_plugin_read_register function so all the register-related functions are grouped together in the file. Signed-off-by: novafacing Signed-off-by: Rowan Hart Reviewed-

  1   2   >