Re: [PATCH for-10.1 v2 11/37] vfio: Introduce new files for VFIORegion definitions and declarations

2025-04-07 Thread Cédric Le Goater
On 3/27/25 10:37, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Subject: [PATCH for-10.1 v2 11/37] vfio: Introduce new files for VFIORegion definitions and declarations Gather all VFIORegion related declarations and definitions into their own files to reduce exposu

Re: [PATCH for-10.1 v2 27/37] vfio: Make vfio_devices_query_dirty_bitmap() static

2025-04-07 Thread Cédric Le Goater
On 4/2/25 14:43, Avihai Horon wrote: On 26/03/2025 9:51, Cédric Le Goater wrote: External email: Use caution opening links or attachments vfio_devices_query_dirty_bitmap() is only used in "container-base.c". Also, rename to vfio_container_devices_query_dirty_bitmap() to reflect with the prefi

Re: [PATCH for-10.1 v2 28/37] vfio: Make vfio_container_query_dirty_bitmap() static

2025-04-07 Thread Cédric Le Goater
On 4/2/25 15:03, Avihai Horon wrote: On 26/03/2025 9:51, Cédric Le Goater wrote: External email: Use caution opening links or attachments vfio_container_query_dirty_bitmap() is only used in "container-base.c". Also, rename to vfio_container_vioc_query_dirty_bitmap() to reflect it is using the

[PATCH v6 4/4] virtio_net: Add third acceptable configuration for MAC setup.

2025-04-07 Thread Cindy Lu
For VDPA devices, Allow configurations where both the hardware MAC address and QEMU command line MAC address are zero. Signed-off-by: Cindy Lu --- hw/net/virtio-net.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 45b63eb9de..6c6

RE: [PATCH v2 00/13] Introduce AST27x0 multi-SoC machine

2025-04-07 Thread Steven Lee
> -Original Message- > From: Cédric Le Goater > Sent: Wednesday, March 26, 2025 1:34 AM > To: Steven Lee ; Peter Maydell > ; Troy Lee ; Jamin Lin > ; Andrew Jeffery > ; Joel Stanley ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee ; Yunlin Tang > > Subject: Re:

Re: [PATCH v4 02/13] memory: Change memory_region_set_ram_discard_manager() to return the result

2025-04-07 Thread Chenyi Qiang
On 4/7/2025 5:53 PM, Xiaoyao Li wrote: > On 4/7/2025 3:49 PM, Chenyi Qiang wrote: >> Modify memory_region_set_ram_discard_manager() to return false if a >> RamDiscardManager is already set in the MemoryRegion. > > It doesn't return false, but -EBUSY. Nice catch! Forgot to modify this commit m

Re: [PATCH v6 1/4] vhost_vdpa : Add a new parameter to enable check mac address

2025-04-07 Thread Jason Wang
On Tue, Apr 8, 2025 at 2:13 PM Cindy Lu wrote: > > When using a VDPA device, it's important to ensure that the MAC > address is correctly set. > Add a new parameter in qemu cmdline to enable this check, default value > is false > > The usage is: > > -netdev > type=vhost-vdpa,vhostdev=/dev/vh

RE: [PATCH 06/13] hw/arm/aspeed_ast27x0-ssp: Introduce AST27x0 A1 SSP SoC

2025-04-07 Thread Steven Lee
> -Original Message- > From: Cédric Le Goater > Sent: Monday, April 7, 2025 11:18 PM > To: Steven Lee ; Peter Maydell > ; Troy Lee ; Jamin Lin > ; Andrew Jeffery > ; Joel Stanley ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee ; Yunlin Tang > > Subject: Re: [PA

Re: [PATCH v5 49/65] i386/tdx: handle TDG.VP.VMCALL

2025-04-07 Thread Xiaoyao Li
On 4/3/2025 4:10 PM, Daniel P. Berrangé wrote: On Thu, Apr 03, 2025 at 03:28:43PM +0800, Xiaoyao Li wrote: On 4/2/2025 11:49 PM, Daniel P. Berrangé wrote: On Wed, Apr 02, 2025 at 11:26:11PM +0800, Xiaoyao Li wrote: I guess the raw mode was introduced due to the design was changed to let guest

Re: [PATCH 2/3] add vnc h264 encoder

2025-04-07 Thread Marc-André Lureau
Hi Please resend the series with a cover letter (https://www.qemu.org/docs/master/devel/submitting-a-patch.html#use-git-format-patch) Some people prefer when the commit message has content too :) At least, it would be useful if you point to a client that supports the codec and allow us to test/u

RE: [PATCH 05/13] hw/arm/aspeed_ast27x0-ssp: Introduce AST27x0 A0 SSP SoC

2025-04-07 Thread Steven Lee
> -Original Message- > From: Cédric Le Goater > Sent: Monday, April 7, 2025 11:16 PM > To: Steven Lee ; Peter Maydell > ; Troy Lee ; Jamin Lin > ; Andrew Jeffery > ; Joel Stanley ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc: Troy Lee ; Yunlin Tang > > Subject: Re: [PA

Re: [PATCH v8 55/55] docs: Add TDX documentation

2025-04-07 Thread Xiaoyao Li
On 4/2/2025 6:50 PM, Daniel P. Berrangé wrote: CC libvirt / Jiri, for confirmation about whether the CPUID restrictions listed below will have any possible impact on libvirt CPUID handling... On Tue, Apr 01, 2025 at 09:02:05AM -0400, Xiaoyao Li wrote: Add docs/system/i386/tdx.rst for TDX suppor

Re: [PULL 0/1] riscv-to-apply queue

2025-04-07 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: [RFC PATCH-for-10.1 20/39] target/arm: Extract PSCI definitions to 'psci.h'

2025-04-07 Thread Pierrick Bouvier
On 4/5/25 07:43, Philippe Mathieu-Daudé wrote: On 5/4/25 03:03, Pierrick Bouvier wrote: On 4/4/25 14:54, Philippe Mathieu-Daudé wrote: On 4/4/25 20:21, Pierrick Bouvier wrote: On 4/3/25 16:58, Philippe Mathieu-Daudé wrote: Extract PSCI definitions (which are not target specific) to the new "t

Re: [PATCH v6 3/6] hw/loongarch/virt: Fix error handling in cpu unplug

2025-04-07 Thread bibo mao
On 2025/4/4 下午7:59, Igor Mammedov wrote: On Fri, 21 Mar 2025 15:35:37 +0800 bibo mao wrote: On 2025/3/21 下午3:21, Markus Armbruster wrote: bibo mao writes: +Igor On 2025/3/21 下午2:47, Markus Armbruster wrote: Bibo Mao writes: In function virt_cpu_unplug(), it will send cpu unpl

[PATCH v3 1/2] target/riscv: Add BOSC's Xiangshan Kunminghu CPU

2025-04-07 Thread Huang Borong
Add a CPU entry for the Xiangshan Kunminghu CPU, an open-source, high-performance RISC-V processor. More details can be found at: https://github.com/OpenXiangShan/XiangShan Note: The ISA extensions supported by the Xiangshan Kunminghu CPU are categorized based on four RISC-V specifications: Volume

[PATCH v3 2/2] hw/riscv: Initial support for BOSC's Xiangshan Kunminghu FPGA prototype

2025-04-07 Thread Huang Borong
This implementation provides emulation for the Xiangshan Kunminghu FPGA prototype platform, including support for UART, CLINT, IMSIC, and APLIC devices. More details can be found at https://github.com/OpenXiangShan/XiangShan Signed-off-by: qinshaoqing Signed-off-by: Yang Wang Signed-off-by: Yu H

Re: [PATCH v8 13/55] i386/tdx: Support user configurable mrconfigid/mrowner/mrownerconfig

2025-04-07 Thread Xiaoyao Li
On 4/2/2025 7:51 PM, Daniel P. Berrangé wrote: On Tue, Apr 01, 2025 at 09:01:23AM -0400, Xiaoyao Li wrote: From: Isaku Yamahata Three sha384 hash values, mrconfigid, mrowner and mrownerconfig, of a TD can be provided for TDX attestation. Detailed meaning of them can be found: https://lore.ker

[RFC 3/3] cxl/i2c_mctp_cxl: Add support to process MCTP command remotely

2025-04-07 Thread nifan . cxl
From: Fan Ni With the change, if "mctp-msg-forward" property is turned on for i2c_mctp_cxl device, we setup a QMP connection to the other VM identified by the "qmp" property, and forward the MCTP requests to the VM for processing. Note: 1. The VM with "mctp-msg-forward=on" acts as a FM VM. 2. Be

[RFC 2/3] cxl_type3: Add qmp_cxl_process_mctp_message qmp interface

2025-04-07 Thread nifan . cxl
From: Fan Ni Add a new QAPI "qmp-cxl-process-mctp-message" to process the MCTP request cached in the shared buffer from FM VM. Signed-off-by: Fan Ni --- hw/mem/cxl_type3.c | 41 hw/mem/cxl_type3_stubs.c | 5 + qapi/cxl.json| 18 ++

[RFC 0/3] Qemu FM emulation

2025-04-07 Thread nifan . cxl
From: Fan Ni The RFC provides a way for FM emulation in Qemu. The goal is to provide a context where we can have more FM emulation discussions and share solutions for a reasonable FM implementation in Qemu. The basic idea is, We have two VMs, one is the VM we want to test (named Target VM) and

Re: [PATCH v6 4/4] virtio_net: Add third acceptable configuration for MAC setup.

2025-04-07 Thread Jason Wang
On Tue, Apr 8, 2025 at 2:14 PM Cindy Lu wrote: > > For VDPA devices, Allow configurations where both the hardware MAC address > and QEMU command line MAC address are zero. > Let's explain why this can work. Thanks

Re: [PATCH v6 3/4] virtio_net: Add second acceptable configuration for MAC setup

2025-04-07 Thread Jason Wang
On Tue, Apr 8, 2025 at 2:13 PM Cindy Lu wrote: > > For VDPA devices, Allow configurations where the hardware MAC address > is non-zero while the MAC address in the QEMU command line is zero. > > Signed-off-by: Cindy Lu > --- > hw/net/virtio-net.c | 14 ++ > 1 file changed, 14 inserti

Re: [PATCH v6 2/4] virtio_net: Add the check for vdpa's mac address

2025-04-07 Thread Jason Wang
On Tue, Apr 8, 2025 at 2:13 PM Cindy Lu wrote: > > When using a VDPA device, it is important to ensure that the MAC > address is correctly set. The MAC address in the hardware should > match the MAC address from the QEMU command line. This is a recommended > configuration and will allow the system

Re: [RFC PATCH v2 0/5] virtio-balloon: Working Set Reporting

2025-04-07 Thread Michael S. Tsirkin
On Thu, May 25, 2023 at 10:20:11PM +, T.J. Alumbaugh wrote: > This is the device implementation for the proposed expanded balloon feature > described here: > > https://lore.kernel.org/linux-mm/20230509185419.1088297-1-yuan...@google.com/ > > This series has a fixed number of "bins" for the wo

Re: [PATCH for-10.1 v2 00/37] vfio: Spring cleanup

2025-04-07 Thread Cédric Le Goater
On 3/26/25 08:50, Cédric Le Goater wrote: Hello, Several large extensions were merged in VFIO recently: migration support with dirty tracking, support for different host IOMMU backend devices, multifd support, etc. This adds up to the previous extensions: vfio-platform, AP, CCW. The result is th

Re: [PATCH rfcv2 03/20] HostIOMMUDevice: Introduce realize_late callback

2025-04-07 Thread Cédric Le Goater
On 2/19/25 09:22, Zhenzhong Duan wrote: Currently we have realize() callback which is called before attachment. But there are still some elements e.g., hwpt_id is not ready before attachment. So we need a realize_late() callback to further initialize them. The relation between objects HostIOMMU

Re: [PATCH v2 3/3] vhost-user: return failure if backend crash when live migration

2025-04-07 Thread Haoqian He
> 2025年4月4日 15:30,Stefano Garzarella 写道: > > On Thu, Mar 27, 2025 at 02:53:24PM +0800, Haoqian He wrote: >> >>> 2025年3月25日 17:51,Stefano Garzarella 写道: >>> >>> On Tue, Mar 25, 2025 at 04:39:46PM +0800, Haoqian He wrote: > 2025年3月24日 22:31,Stefano Garzarella 写道: > On Thu, Mar 20, 202

Re: [PATCH for-10.1 v2 32/37] vfio: Introduce new files for VFIO MemoryListener

2025-04-07 Thread Cédric Le Goater
On 4/2/25 15:49, Avihai Horon wrote: On 26/03/2025 9:51, Cédric Le Goater wrote: External email: Use caution opening links or attachments File "common.c" has been emptied of most of its definitions by the previous changes and the only definitions left are related to the VFIO MemoryListener ha

[PATCH v4 05/13] memory: Introduce PrivateSharedManager Interface as child of GenericStateManager

2025-04-07 Thread Chenyi Qiang
To manage the private and shared RAM states in confidential VMs, introduce a new class of PrivateShareManager as a child of GenericStateManager, which inherits the six interface callbacks. With a different interface type, it can be distinguished from the RamDiscardManager object and provide the fle

Re: [PATCH 1/4] migration/savevm: Add a compatibility check for capabilities

2025-04-07 Thread Fabiano Rosas
Fabiano Rosas writes: +Cc Markus context: This series was trying to stop savevm from crashing when arbitrary migration capabilities are enabled. Daniel brought up the previous discussion around unifying capabilities + parameters and passing it all via the migrate (or snapshot in this case) comma

Re: [PATCH for-10.1 v2 33/37] vfio: Rename RAM discard related services

2025-04-07 Thread Cédric Le Goater
On 3/27/25 10:51, John Levon wrote: On Wed, Mar 26, 2025 at 08:51:18AM +0100, Cédric Le Goater wrote: Rename some routines to better reflect the namespace they belong to. Signed-off-by: Cédric Le Goater --- hw/vfio/listener.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(

Re: [PATCH-for-10.1 v3 2/9] hw/intc/gicv3_its: Do not check its_class_name() for NULL

2025-04-07 Thread Eric Auger
On 4/3/25 10:40 PM, Philippe Mathieu-Daudé wrote: > Since commit cc5e719e2c8 ("kvm: require KVM_CAP_SIGNAL_MSI"), > its_class_name() single implementation doesn't return NULL > anymore. Update the prototype docstring, and remove the > pointless checks. > > Reported-by: Gustavo Romero > Signed-o

Re: [PATCH v1 0/1] hw/misc/aspeed_sbc: Implement OTP memory and controller

2025-04-07 Thread Cédric Le Goater
Hello Kane, + Markus (for ebc29e1beab0 implementation) On 4/7/25 09:33, Kane Chen wrote: Hi Cédric/Philippe, OTP (One-Time Programmable) memory is a type of non-volatile memory in which each bit can be programmed only once. It is typically used to store critical and permanent information, such

Re: [PATCH 4/4] target/riscv: Enable/Disable S/VS-mode Timer when STCE bit is changed

2025-04-07 Thread Jim Shu
OK, I will fix it in the v2 patchset. Jim Shu On Fri, Apr 4, 2025 at 2:03 PM Alistair Francis wrote: > > On Thu, Mar 20, 2025 at 5:24 AM Jim Shu wrote: > > > > Updating STCE will enable/disable SSTC in S-mode or/and VS-mode, so we > > also need to update S/VS-mode Timer and S/VSTIP bits in $mi

Re: [PATCH for-10.1 v2 36/37] vfio: Rename VFIODevice related services

2025-04-07 Thread Cédric Le Goater
On 3/27/25 10:50, John Levon wrote: On Wed, Mar 26, 2025 at 08:51:21AM +0100, Cédric Le Goater wrote: /* Returns 0 on success, or a negative errno. */ diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 4fdb74e33c427595a9b0a4d28b2b5a70df951e4e..9000702aed960ccb69ca67ec052f1ebe11ee1919 100644 ---

Re: Query on the dirty bitmap

2025-04-07 Thread prashant patil
Thanks Eric. I have a few questions about the bitmap content shown by 'qemu-img map'. >From below sample bitmap data: 1. Why only some of the extents have start and offset values? And why are they the same values? 2. What does the start value indicate? Is it logical offset or physical offset of dat

Re: [PATCH 14/15] fuse: Implement multi-threading

2025-04-07 Thread Stefan Hajnoczi
On Fri, Apr 04, 2025 at 02:49:08PM +0200, Hanna Czenczek wrote: > On 27.03.25 16:55, Stefan Hajnoczi wrote: > > On Tue, Mar 25, 2025 at 05:06:54PM +0100, Hanna Czenczek wrote: > > > FUSE allows creating multiple request queues by "cloning" /dev/fuse FDs > > > (via open("/dev/fuse") + ioctl(FUSE_DEV

[PATCH 1/3] new configure option to enable gstreamer

2025-04-07 Thread Dietmar Maurer
Signed-off-by: Dietmar Maurer --- meson.build | 10 ++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 5 - 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 41f68d3806..28ca37855a 100644 --- a/meso

Re: [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers during VM reset

2025-04-07 Thread Ewan Hai
On 4/7/25 4:51 PM, Zhao Liu wrote: On Tue, Apr 01, 2025 at 11:35:49AM +0800, Ewan Hai wrote: Date: Tue, 1 Apr 2025 11:35:49 +0800 From: Ewan Hai Subject: Re: [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers during VM reset [2] As mentioned in [1], QEMU always sets the vCPU's v

Re: [PATCH v8 13/55] i386/tdx: Support user configurable mrconfigid/mrowner/mrownerconfig

2025-04-07 Thread Markus Armbruster
Xiaoyao Li writes: > From: Isaku Yamahata > > Three sha384 hash values, mrconfigid, mrowner and mrownerconfig, of a TD > can be provided for TDX attestation. Detailed meaning of them can be > found: > https://lore.kernel.org/qemu-devel/31d6dbc1-f453-4cef-ab08-4813f4e0f...@intel.com/ > > Allow u

[PATCH v4 00/13] Enable shared device assignment

2025-04-07 Thread Chenyi Qiang
This is the v4 series of the shared device assignment support. Compared with v3 series, the main changes are: - Introduced a new GenericStateManager parent class, so that the existing RamDiscardManager and new PrivateSharedManager can be its child class and manage different states. - Changed

Re: [PATCH v5] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-07 Thread Stefan Hajnoczi
On Sat, Apr 05, 2025 at 04:52:29PM -0700, Pinku Deb Nath wrote: > Full Unit Access (FUA) is an optimization where a disk write with the > flag set will be persisted to disk immediately instead of potentially > remaining in the disk's write cache. > > This commit address the todo task > for using p

Re: [PATCH v2 1/2] target/riscv: Add BOSC's Xiangshan Kunminghu CPU

2025-04-07 Thread Daniel Henrique Barboza
On 4/7/25 6:19 AM, Huang Borong wrote: Add a CPU entry for the Xiangshan Kunminghu CPU, an open-source, high-performance RISC-V processor. More details can be found at: https://github.com/OpenXiangShan/XiangShan Note: The ISA extensions supported by the Xiangshan Kunminghu CPU are categorized

Re: [PATCH-for-10.1 v3 7/9] hw/arm/virt-acpi: Always build IORT table (even with GIC ITS disabled)

2025-04-07 Thread Eric Auger
Hi Philippe, On 4/3/25 10:40 PM, Philippe Mathieu-Daudé wrote: > Citing Gustavo [*]: > > Gating IORT table generation entirely based on the presence > of ITS looks wrong because IORT table has data beyond GIC ITS, > like for SMMUv3 etc.. > [*] > https://lore.kernel.org/qemu-devel/bae6e29a-7

[PATCH v2 0/5] misc hexagon patches

2025-04-07 Thread Brian Cain
Changes since previous "misc hexagon patches" series (v1): - removed not-yet-usable/necessary from_subtype() - changed author to match MAINTAINERS - dropped 'Add memory order definition' patch, now carried in Phil's https://lore.kernel.org/qemu-devel/20250405161320.76854-1-phi...@linaro.org/ Brian

[PATCH v2 2/5] target/hexagon: Fix badva reference, delete CAUSE

2025-04-07 Thread Brian Cain
From: Brian Cain The BADVA reg is referred to with the wrong identifier. The CAUSE reg field of SSR is not yet modeled. Signed-off-by: Brian Cain --- target/hexagon/cpu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 76

[PATCH] migration: Fix latent bug in migrate_params_test_apply()

2025-04-07 Thread Markus Armbruster
migrate_params_test_apply() neglects to apply tls_authz. Currently harmless, because migrate_params_check() doesn't care. Fix it anyway. Signed-off-by: Markus Armbruster --- migration/options.c | 5 + 1 file changed, 5 insertions(+) diff --git a/migration/options.c b/migration/options.c i

RE: [PATCH v1 0/1] hw/misc/aspeed_sbc: Implement OTP memory and controller

2025-04-07 Thread Kane Chen
Hi Cédric/Philippe, OTP (One-Time Programmable) memory is a type of non-volatile memory in which each bit can be programmed only once. It is typically used to store critical and permanent information, such as the chip ID and secure boot keys. The structure and behavior of OTP memory are consistent

Re: [PATCH for-10.1 v2 28/37] vfio: Make vfio_container_query_dirty_bitmap() static

2025-04-07 Thread Cédric Le Goater
On 4/2/25 15:34, Joao Martins wrote: On 26/03/2025 07:51, Cédric Le Goater wrote: vfio_container_query_dirty_bitmap() is only used in "container-base.c". Also, rename to vfio_container_vioc_query_dirty_bitmap() to reflect it is using the VFIO IOMMU backend device ->query_dirty_bitmap() handler.

Re: [PATCH preview 0/3] rust: update build system for Meson 1.8.0

2025-04-07 Thread Zhao Liu
On Sat, Apr 05, 2025 at 12:06:00PM +0200, Paolo Bonzini wrote: > Date: Sat, 5 Apr 2025 12:06:00 +0200 > From: Paolo Bonzini > Subject: [PATCH preview 0/3] rust: update build system for Meson 1.8.0 > X-Mailer: git-send-email 2.49.0 > > Meson 1.7.0 and 1.8.0 include improved support for Rust, name

Re: [PATCH for-10.1 v2 30/37] vfio: Rename vfio_devices_all_device_dirty_tracking()

2025-04-07 Thread Cédric Le Goater
On 4/2/25 15:17, Avihai Horon wrote: On 26/03/2025 9:51, Cédric Le Goater wrote: External email: Use caution opening links or attachments Use the prefix 'vfio_container_devices_' to reflect the routine simply loops over the container's device list. Signed-off-by: Cédric Le Goater Reviewed

[PATCH v4 01/13] memory: Export a helper to get intersection of a MemoryRegionSection with a given range

2025-04-07 Thread Chenyi Qiang
Rename the helper to memory_region_section_intersect_range() to make it more generic. Meanwhile, define the @end as Int128 and replace the related operations with Int128_* format since the helper is exported as a wider API. Suggested-by: Alexey Kardashevskiy Reviewed-by: David Hildenbrand Signed

[PATCH v4 02/13] memory: Change memory_region_set_ram_discard_manager() to return the result

2025-04-07 Thread Chenyi Qiang
Modify memory_region_set_ram_discard_manager() to return false if a RamDiscardManager is already set in the MemoryRegion. The caller must handle this failure, such as having virtio-mem undo its actions and fail the realize() process. Opportunistically move the call earlier to avoid complex error ha

[PATCH v4 12/13] ram-block-attribute: Add priority listener support for PrivateSharedListener

2025-04-07 Thread Chenyi Qiang
In-place page conversion requires operations to follow a specific sequence: unmap-before-conversion-to-private and map-after-conversion-to-shared. Currently, both attribute changes and VFIO DMA map/unmap operations are handled by PrivateSharedListeners, they need to be invoked in a specific order.

[PATCH v4 10/13] memory: Change NotifyStateClear() definition to return the result

2025-04-07 Thread Chenyi Qiang
So that the caller can check the result of NotifyStateClear() handler if the operation fails. Signed-off-by: Chenyi Qiang --- Changes in v4: - Newly added. --- hw/vfio/common.c | 18 ++ include/exec/memory.h | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-)

[PATCH v4 06/13] vfio: Add the support for PrivateSharedManager Interface

2025-04-07 Thread Chenyi Qiang
Subsystems like VFIO previously disabled ram block discard and only allowed coordinated discarding via RamDiscardManager. However, guest_memfd in confidential VMs relies on discard operations for page conversion between private and shared memory. This can lead to stale IOMMU mapping issue when assi

[PATCH v4 07/13] ram-block-attribute: Introduce RamBlockAttribute to manage RAMBLock with guest_memfd

2025-04-07 Thread Chenyi Qiang
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, potentially leading to stale IOMMU mapping iss

[PATCH v4 11/13] KVM: Introduce CVMPrivateSharedListener for attribute changes during page conversions

2025-04-07 Thread Chenyi Qiang
With the introduction of the RamBlockAttribute object to manage RAMBlocks with guest_memfd and the implementation of PrivateSharedManager interface to convey page conversion events, it is more elegant to move attribute changes into a PrivateSharedListener. The PrivateSharedListener is reigstered/u

[PATCH v4 08/13] ram-block-attribute: Introduce a callback to notify shared/private state changes

2025-04-07 Thread Chenyi Qiang
A new state_change() callback is introduced in PrivateSharedManageClass to efficiently notify all registered PrivateSharedListeners, including VFIO listeners, about memory conversion events in guest_memfd. The VFIO listener can dynamically DMA map/unmap shared pages based on conversion types: - For

[PATCH v4 13/13] RAMBlock: Make guest_memfd require coordinate discard

2025-04-07 Thread Chenyi Qiang
As guest_memfd is now managed by ram_block_attribute with PrivateSharedManager, only block uncoordinated discard. Signed-off-by: Chenyi Qiang --- Changes in v4: - Modify commit message (RamDiscardManager->PrivateSharedManager). Changes in v3: - No change. Changes in v2: - Change the

Re: [PATCH preview 0/3] rust: update build system for Meson 1.8.0

2025-04-07 Thread Paolo Bonzini
On Mon, Apr 7, 2025 at 9:17 AM Zhao Liu wrote: > On Sat, Apr 05, 2025 at 12:06:00PM +0200, Paolo Bonzini wrote: > > Date: Sat, 5 Apr 2025 12:06:00 +0200 > > From: Paolo Bonzini > > Subject: [PATCH preview 0/3] rust: update build system for Meson 1.8.0 > > X-Mailer: git-send-email 2.49.0 > > > >

[PATCH v4 09/13] memory: Attach RamBlockAttribute to guest_memfd-backed RAMBlocks

2025-04-07 Thread Chenyi Qiang
A new field, ram_block_attribute, is introduced in RAMBlock to link to a RamBlockAttribute object. This change centralizes all guest_memfd state information (such as fd and shared_bitmap) within a RAMBlock, simplifying management. The realize()/unrealized() helpers are used to initialize/uninitial

[PATCH v4 04/13] memory: Introduce generic state change parent class for RamDiscardManager

2025-04-07 Thread Chenyi Qiang
RamDiscardManager is an interface used by virtio-mem to adjust VFIO mappings in relation to VM page assignment. It manages the state of populated and discard for the RAM. To accommodate future scnarios for managing RAM states, such as private and shared states in confidential VMs, the existing RamD

RE: [PATCH for-10.1 v2 11/37] vfio: Introduce new files for VFIORegion definitions and declarations

2025-04-07 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: Re: [PATCH for-10.1 v2 11/37] vfio: Introduce new files for VFIORegion >definitions and declarations > >On 3/27/25 10:37, Duan, Zhenzhong wrote: >> >> >>> -Original Message- >>> From: Cédric Le Goater >>> Subject: [PATCH for-

[PATCH v4 03/13] memory: Unify the definiton of ReplayRamPopulate() and ReplayRamDiscard()

2025-04-07 Thread Chenyi Qiang
Update ReplayRamDiscard() function to return the result and unify the ReplayRamPopulate() and ReplayRamDiscard() to ReplayStateChange() at the same time due to their identical definitions. This unification simplifies related structures, such as VirtIOMEMReplayData, which makes it more cleaner and m

[PATCH v2 3/3] cleanup: Drop pointless label at end of function

2025-04-07 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Richard Henderson Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 4 +--- hw/ipmi/ipmi_bmc_sim.c| 7 ++- hw/ipmi/ipmi_bt.c | 7 +++ hw/ipmi/ipmi_kcs.c| 3 +-- 4 files changed, 7 insertions(+), 14 deletions(-) dif

Re: [PATCH for-10.1 v2 11/37] vfio: Introduce new files for VFIORegion definitions and declarations

2025-04-07 Thread Cédric Le Goater
On 4/7/25 09:53, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Subject: Re: [PATCH for-10.1 v2 11/37] vfio: Introduce new files for VFIORegion definitions and declarations On 3/27/25 10:37, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goate

[PATCH v2 0/3] Cleanups around returns

2025-04-07 Thread Markus Armbruster
v2: * Don't touch tests/tcg/mips/user/ [Peter] Markus Armbruster (3): cleanup: Re-run return_directly.cocci cleanup: Drop pointless return at end of function cleanup: Drop pointless label at end of function include/system/os-win32.h | 1 - target/ppc/kvm_ppc.h

[PATCH v2 1/3] cleanup: Re-run return_directly.cocci

2025-04-07 Thread Markus Armbruster
Coccinelle's indentation of virt_create_plic() results in a long line. Avoid that by mimicking the old indentation manually. Don't touch tests/tcg/mips/user/. I'm not sure these files are ours to make style cleanups on. They might be imported third-party code, which we should leave as is to not

Re: [PATCH] virtio-net: Copy all for dhclient workaround

2025-04-07 Thread Antoine Damhet
On Sat, Apr 05, 2025 at 05:04:28PM +0900, Akihiko Odaki wrote: > The goal of commit 7987d2be5a8b ("virtio-net: Copy received header to > buffer") was to remove the need to patch the (const) input buffer with a > recomputed UDP checksum by copying headers to a RW region and inject the > checksum the

Re: [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers during VM reset

2025-04-07 Thread Zhao Liu
On Tue, Apr 01, 2025 at 11:35:49AM +0800, Ewan Hai wrote: > Date: Tue, 1 Apr 2025 11:35:49 +0800 > From: Ewan Hai > Subject: Re: [PATCH v2 08/10] target/i386/kvm: reset AMD PMU registers > during VM reset > > > > [2] As mentioned in [1], QEMU always sets the vCPU's vendor to match the > > > hos

Re: [PATCH 2/4] hw/intc: riscv_aclint: Fix mtime write for sstc extension

2025-04-07 Thread Jim Shu
The period of the stimecmp timer is the time until the next S-mode timer IRQ. The value is calculated as "stimecmp - time". [1] It is equal to "stimecmp - mtime" since the time CSR is a read-only shadow of the memory-mapped mtime register. Thus, changing mtime value will update the period of stimec

Re: [PATCH-for-10.1 v3 3/9] hw/arm/virt: Simplify create_its()

2025-04-07 Thread Eric Auger
On 4/3/25 10:40 PM, Philippe Mathieu-Daudé wrote: > No need to strstr() check the class name when we can > use kvm_irqchip_in_kernel(). > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Richard Henderson Reviewed-by: Eric Auger Eric > --- > hw/arm/virt.c | 12 +++- > 1 file

Re: [PATCH] migration: Fix latent bug in migrate_params_test_apply()

2025-04-07 Thread Fabiano Rosas
Markus Armbruster writes: > migrate_params_test_apply() neglects to apply tls_authz. Currently > harmless, because migrate_params_check() doesn't care. Fix it anyway. > > Signed-off-by: Markus Armbruster > --- > migration/options.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a

Re: [PATCH-for-10.1 v3 4/9] hw/arm/virt-acpi: Factor its_enabled() helper out

2025-04-07 Thread Eric Auger
On 4/3/25 10:40 PM, Philippe Mathieu-Daudé wrote: > GIC ITS is checked for the MADT and IORT tables. > Factor the checks out to the its_enabled() helper. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Gustavo Romero > Reviewed-by: Richard Henderson Reviewed-by: Eric Auger Eric >

Re: Query on the dirty bitmap

2025-04-07 Thread Eric Blake
On Mon, Apr 07, 2025 at 02:46:17PM +0530, prashant patil wrote: > Thanks Eric. [top-posting makes conversations harder to follow, so on this list we typically reply inline] > I have a few questions about the bitmap content shown by 'qemu-img map'. > From below sample bitmap data: > 1. Why only so

[PATCH 01/10] various: Fix type conflict of GLib function pointers

2025-04-07 Thread Kohei Tokunaga
On emscripten, function pointer casts can cause function call failure. This commit fixes the function definition to match to the type of the function call. - qtest_set_command_cb passed to g_once should match to GThreadFunc - object_class_cmp and cpreg_key_compare are passed to g_list_sort as GC

Re: [PATCH 02/11] qapi/rocker: Tidy up query-rocker-of-dpa-flows example

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 02:14:04PM +0200, Markus Armbruster wrote: > The command can return any number of RockerOfDpaFlow objects. The > example shows it returning exactly two, with the second objecy's object's > members elided. Tweak it so it elides elements after the first > instead. > --

Re: [PATCH 04/13] hw/intc/aspeed: Add support for AST2700 TSP INTC

2025-04-07 Thread Cédric Le Goater
On 3/13/25 06:40, Steven Lee wrote: - Define new types for ast2700tsp INTC and INTCIO - Add register definitions for TSP INTC and INTCIO - Implement write handlers for TSP INTC and INTCIO - Register new types in aspeed_intc_register_types The design of the TSP INTC and INTCIO controllers is simi

[PATCH 05/10] meson: Add wasm build in build scripts

2025-04-07 Thread Kohei Tokunaga
has_int128_type is set to false on emscripten as of now to avoid errors by libffi. And tests aren't integrated with Wasm execution environment as of now so this commit disables tests. Signed-off-by: Kohei Tokunaga --- configs/meson/emscripten.txt | 6 ++ configure | 7

[PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-07 Thread Kohei Tokunaga
Emscripten's fiber does not support submitting coroutines to other threads. So this commit modifies hw/9pfs/coth.h to disable this behavior when compiled with Emscripten. Signed-off-by: Kohei Tokunaga --- fsdev/file-op-9p.h | 3 +++ fsdev/meson.build | 2 +- hw/9pfs/9p-util-stub.c | 4

[PATCH 2/2] vfio/spapr: Fix L2 crash with PCI device passthrough with L2 guest 1memory > 128G

2025-04-07 Thread Amit Machhiwal
An L2 KVM guest fails to boot inside a pSeries LPAR when booted with a memory more than 128 GB and PCI device passthrough. The L2 guest also crashes when it is booted with a memory greater than 128 GB and a PCI device is hotplugged later. The issue arises from a conditional check for `levels > 1`

[PATCH v6] block/file-posix.c: Use pwritev2() with RWF_DSYNC for FUA

2025-04-07 Thread Pinku Deb Nath
Full Unit Access (FUA) is an optimization where a disk write with the flag set will be persisted to disk immediately instead of potentially remaining in the disk's write cache. This commit address the todo task for using pwritev2() with RWF_DSYNC in the thread pool section of raw_co_prw(), if pwri

Re: [PATCH 00/16] Add Multi-Core Debug (MCD) API support

2025-04-07 Thread Mario Fleischmann
Thanks a lot for the response, I really appreciate your time. On 07.04.2025 14:33, Markus Armbruster wrote: Mario Fleischmann writes: This patch series introduces support for the Multi-Core Debug (MCD) API, a commonly used debug interface by emulators. The MCD API, defined through a header f

Tape Drive Emulation

2025-04-07 Thread robo tika
Hello! I was messing around in Windows NT 4.0 and when i tried to back it up it asked for a tape drive. After that i tried all sorts of stuff from emulating a generic SCSI drive to modifying the registry of the OS but no luck! I would like an easier way of emulating a tape drive without physical d

Re: [PATCH v8 1/6] target/arm/tcg: increase cache level for cpu=max

2025-04-07 Thread Eric Auger
Hi Ali, On 3/10/25 5:23 PM, Alireza Sanaee via wrote: > 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 > Reviewed-by:

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-07 Thread Stefan Hajnoczi
On Mon, Apr 7, 2025 at 12:00 PM Kevin Wolf wrote: > > Originally, all failed SG_IO requests called scsi_handle_rw_error() to > apply the configured error policy. However, commit f3126d65, which was > supposed to be a mere refactoring for scsi-disk.c, broke this and > accidentally completed the SCS

Re: [PATCH for-10.1 v2 26/37] vfio: Move dirty tracking related services into container-base.c

2025-04-07 Thread Cédric Le Goater
On 4/2/25 14:35, Avihai Horon wrote: On 26/03/2025 9:51, Cédric Le Goater wrote: External email: Use caution opening links or attachments Routines of common.c :   vfio_devices_all_dirty_tracking_started   vfio_devices_all_device_dirty_tracking   vfio_devices_query_dirty_bitmap   vfio_get_dir

Re: [PATCH] vhost: Don't set vring call if guest notifier is unused

2025-04-07 Thread Huaitong Han
Stefano Garzarella 于2025年4月1日周二 18:49写道: > > On Wed, Mar 26, 2025 at 04:25:37PM +0800, oen...@gmail.com wrote: > >From: Huaitong Han > > > >The vring call fd is set even when the guest does not use msix (e.g., in the > >case of virtio pmd), leading to unnecessary CPU overhead for processing > >i

Re: [PATCH-for-10.1 v3 1/9] hw/arm/virt: Remove pointless VirtMachineState::tcg_its field

2025-04-07 Thread Eric Auger
Hi Philippe, On 4/3/25 10:40 PM, Philippe Mathieu-Daudé wrote: > VirtMachineState::tcg_its has the negated logic value of > VirtMachineClass::no_tcg_its. Directly use the latter, > removing the former. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Auger Eric > --- > include/hw/ar

Re: [PATCH v4 3/3] vhost-user: return failure if backend crash when live migration

2025-04-07 Thread Haoqian He
> 2025年4月4日 05:15,Michael S. Tsirkin 写道: > > On Tue, Apr 01, 2025 at 11:18:17AM -0400, Haoqian He wrote: >> Live migration should be terminated if the vhost-user backend crashes >> before the migration completes. >> >> Specifically, since the vhost device will be stopped when VM is stopped >>

Re: [PATCH 00/11] qapi: Documentation improvements

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 02:14:02PM +0200, Markus Armbruster wrote: > Markus Armbruster (11): > docs/devel/qapi-code-gen: Tidy up whitespace > qapi/rocker: Tidy up query-rocker-of-dpa-flows example > docs/interop: Delete "QEMU Guest Agent Protocol Reference" TOC > docs/interop: Sanitize QMP

Re: [PATCH v2 2/2] qapi/block-core: derpecate some block-job- APIs

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 10:31:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: In the subject line: s/derpecate/deprecate/ > For change, pause, resume, complete, dismiss and finalize actions > corresponding job- and block-job commands are almost equal. The > difference is in find_block_job_locked(

[PATCH 02/10] various: Define macros for dependencies on emscripten

2025-04-07 Thread Kohei Tokunaga
Signed-off-by: Kohei Tokunaga --- block/file-posix.c| 18 ++ include/qemu/cacheflush.h | 3 ++- os-posix.c| 5 + util/cacheflush.c | 3 ++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.

[PATCH 03/10] util/mmap-alloc: Add qemu_ram_mmap implementation for emscripten

2025-04-07 Thread Kohei Tokunaga
Signed-off-by: Kohei Tokunaga --- util/mmap-alloc.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c index ed14f9c64d..91f33682e8 100644 --- a/util/mmap-alloc.c +++ b/util/mmap-alloc.c @@ -145,6 +145,7 @@ static bool map_noreserve_effec

[PATCH 04/10] util: Add coroutine backend for emscripten

2025-04-07 Thread Kohei Tokunaga
Emscripten does not support couroutine methods currently used by QEMU but provides a coroutine implementation called "fiber". This commit introduces a coroutine backend using fiber. Note that fiber does not support submitting coroutines to other threads. Signed-off-by: Kohei Tokunaga --- util/co

[PATCH 06/10] include/exec: Allow using 64bit guest addresses on emscripten

2025-04-07 Thread Kohei Tokunaga
To enable 64-bit guest support in Wasm 32bit memory model today, it was necessary to partially revert recent changes that removed support for different pointer widths between the host and guest (e.g., commits a70af12addd9060fdf8f3dbd42b42e3072c3914f and bf455ec50b6fea15b4d2493059365bf94c706273) whe

[PATCH 10/10] MAINTAINERS: Update MAINTAINERS file for wasm-related files

2025-04-07 Thread Kohei Tokunaga
Signed-off-by: Kohei Tokunaga --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d54b5578f8..ea5fde475c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3903,6 +3903,17 @@ F: tcg/tci/ F: tcg/tci.c F: disas/tci.c +WebAssembly TCG targ

Re: [PATCH 06/11] docs/sphinx/qmp_lexer: Generalize elision syntax

2025-04-07 Thread Eric Blake
On Fri, Apr 04, 2025 at 02:14:08PM +0200, Markus Armbruster wrote: > Accept "... lorem ipsum ..." in addition to "...". > > Signed-off-by: Markus Armbruster > --- > @@ -1062,7 +1064,7 @@ For example:: ># "device": "ide0-hd0", ># ... ># } > - #

  1   2   >