Re: [RFC v5 2/7] vhost: Data structure changes to support packed vqs

2025-03-27 Thread Sahil Siddiq
Hi, On 3/26/25 4:56 PM, Eugenio Perez Martin wrote: On Mon, Mar 24, 2025 at 3:00 PM Sahil Siddiq wrote: Introduce "struct vring_packed". Modify VhostShadowVirtqueue so it can support split and packed virtqueue formats. Signed-off-by: Sahil Siddiq --- Changes from v4 -> v5: - This was commi

Re: [RFC PATCH v2 17/20] hw/arm/smmuv3: Check idr registers for STE_S1CDMAX and STE_S1STALLD

2025-03-27 Thread Eric Auger
Hi, On 3/27/25 8:54 AM, Shameerali Kolothum Thodi wrote: > >> -Original Message- >> From: Nicolin Chen >> Sent: Wednesday, March 26, 2025 7:47 PM >> To: Eric Auger >> Cc: Shameerali Kolothum Thodi >> ; qemu-...@nongnu.org; >> qemu-devel@nongnu.org; peter.mayd...@linaro.org; j...@nvidia.c

Re: [PATCH v2 2/4] docs, qapi: generate undocumented return sections

2025-03-27 Thread Markus Armbruster
John Snow writes: > This patch changes the qapidoc transmogrifier to generate Return value > documentation for any command that has a return value but hasn't > explicitly documented that return value. > > Signed-off-by: John Snow Might want to briefly explain placement of the auto-generated ret

Re: [PATCH v2 1/2] qcow2: handle discard-no-unref in measure

2025-03-27 Thread Jean-Louis Dupond
Any chance this can get reviewed and perhaps merged? We would like to enable discard-no-unref by default on oVirt, as this makes qcow2 inside LVM LV's way more reliable (because we can calculate the size). But we are still missing this measure patch to be able to properly calculate the destina

Re: [PATCH] qtest/migration/rdma: Add test for rdma migration with ipv6

2025-03-27 Thread Jinpu Wang
On Thu, Mar 27, 2025 at 3:13 AM Li Zhijian wrote: > > Recently, we removed ipv6 restriction[0] from RDMA migration, add a > test for it. > > [0] > https://lore.kernel.org/qemu-devel/20250326095224.9918-1-jinpu.w...@ionos.com/ > > Cc: Jack Wang > Cc: Michael R. Galaxy > Cc: Peter Xu > Cc: Yu Zh

Re: [PATCH for-10.1 v2 06/37] vfio: Introduce a new header file for internal migration services

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:50:51AM +0100, Cédric Le Goater wrote: > Gather all VFIO migration related declarations into > "vfio-migration-internal.h" to reduce exposure of VFIO internals in > "hw/vfio/vfio-common.h". > > Cc: Kirti Wankhede > Cc: Avihai Horon > Signed-off-by: Cédric Le Goater

Re: [PATCH for-10.1 v2 14/37] vfio: Move VFIOAddressSpace helpers into container-base.c

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:50:59AM +0100, Cédric Le Goater wrote: > VFIOAddressSpace is a common object used by VFIOContainerBase which is > declared in "hw/vfio/vfio-container-base.h". Move the VFIOAddressSpace > related services into "container-base.c". > > While at it, rename : > > vfio_get

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

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:51:17AM +0100, Cédric Le Goater wrote: > 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 handlers. Rename it to "listener.c" and introduce its > associated "vfio-

Re: [PATCH for-10.1 v2 29/37] vfio: Rename vfio_devices_all_dirty_tracking_started()

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:51:14AM +0100, Cédric Le Goater wrote: > Also rename vfio_devices_all_device_dirty_tracking_started() while at > it and use the prefix 'vfio_container_devices_' for routines simply > looping over the container's device list. > > Signed-off-by: Cédric Le Goater Reviewe

[PATCH] hw/net/virtio-net: fix memory leak in timer_del()

2025-03-27 Thread Zheng Huang
Hi, This patch addresses a memory leak bug in the usages of `timer_del()`. The issue arisesfrom the incorrect use of the ambiguous timer API `timer_del()`, which does not free the timer object. The leak sanitizer report this issue during fuzzing. The correct API `timer_free()` freed the timer obje

RE: [PATCH for-10.1 v2 16/37] vfio: Introduce a new header file for helper services

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 16/37] vfio: Introduce a new header file for helper >services > >Gather all helper routine declarations into "vfio-helpers.h" to reduce >exposure of VFIO internals in "hw/vfio/vfio-common.h". > >Reviewed-by: John L

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

2025-03-27 Thread John Levon
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 > --- a/hw/vfio/ap.c > +++ b/hw/v

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

2025-03-27 Thread Ani Sinha
On Wed, Mar 26, 2025 at 8:52 PM Alexander Graf wrote: > > > On 26.03.25 13:27, Gerd Hoffman wrote: > >Hi, > > > >> The problem is that add-ons are > >> > >>1) Separate binaries. So you need to match multiple files. > >>2) In this case, get generated out of the vendor (RH)'s control in

Re: [PATCH for-10.1 v2 07/37] vfio: Move vfio_device_state_is_running/precopy() into migration.c

2025-03-27 Thread Prasad Pandit
On Wed, 26 Mar 2025 at 13:22, Cédric Le Goater wrote: > These routines are migration related. Move their declaration and > implementation under the migration files. > > Signed-off-by: Cédric Le Goater > --- > hw/vfio/vfio-migration-internal.h | 2 ++ > include/hw/vfio/vfio-common.h | 3 ---

Re: [PATCH for-10.1 v2 03/37] vfio: Introduce a new header file for external migration services

2025-03-27 Thread Prasad Pandit
On Wed, 26 Mar 2025 at 13:24, Cédric Le Goater wrote: > The migration core subsystem makes use of the VFIO migration API to > collect statistics on the number of bytes transferred. These services > are declared in "hw/vfio/vfio-common.h" which also contains VFIO > internal declarations. Move the m

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

2025-03-27 Thread Markus Armbruster via
Hanna Czenczek writes: > On 26.03.25 12:41, Markus Armbruster wrote: >> Hanna Czenczek writes: >> >>> On 26.03.25 06:38, Markus Armbruster wrote: Hanna Czenczek writes: > FUSE allows creating multiple request queues by "cloning" /dev/fuse FDs > (via open("/dev/fuse") + ioctl(F

[PATCH] hw/timer/hpet: fix memory leak in hpet_del_timer()

2025-03-27 Thread Zheng Huang
Hi, This patch addresses a memory leak bug in the function `hpet_del_timer()`. The issue arisesfrom the incorrect use of the ambiguous timer API `timer_del()`, which does not free the timer object. The leak sanitizer report this issue during fuzzing. The correct API, `timer_free()`, was introduce

Re: [PATCH-for-10.0 1/1] goldfish_rtc: keep time offset when resetting

2025-03-27 Thread Philippe Mathieu-Daudé
Hi Heinrich, On 21/3/25 09:12, Heinrich Schuchardt wrote: Currently resetting leads to resynchronizing the Goldfish RTC with the system clock of the host. In real hardware an RTC reset would not change the wall time. Other RTCs like pl031 do not show this behavior. Move the synchronization of t

[PATCH] hw/net/virtio-net: fix memory leak in timer_del()

2025-03-27 Thread Zheng Huang
Hi, This patch addresses a memory leak bug in the usages of `timer_del()`. The issue arisesfrom the incorrect use of the ambiguous timer API `timer_del()`, which does not free the timer object. The leak sanitizer report this issue during fuzzing. The correct API `timer_free()` freed the timer obje

Re: [PULL 2/8] migration: ram block cpr blockers

2025-03-27 Thread Steven Sistare
On 3/26/2025 5:34 PM, Michael Roth wrote: On Wed, Mar 26, 2025 at 05:13:50PM -0300, Fabiano Rosas wrote: Michael Roth writes: Quoting Tom Lendacky (2025-03-26 14:21:31) On 3/26/25 13:46, Tom Lendacky wrote: On 3/7/25 12:15, Fabiano Rosas wrote: From: Steve Sistare Unlike cpr-reboot mode,

Re: [PATCH for-10.1 v2 06/37] vfio: Introduce a new header file for internal migration services

2025-03-27 Thread Prasad Pandit
On Wed, 26 Mar 2025 at 13:32, Cédric Le Goater wrote: > Gather all VFIO migration related declarations into > "vfio-migration-internal.h" to reduce exposure of VFIO internals in > "hw/vfio/vfio-common.h". > > Cc: Kirti Wankhede > Cc: Avihai Horon > Signed-off-by: Cédric Le Goater > --- > hw/vf

Re: [PATCH v2] 9pfs: fix 'total_open_fd' decrementation

2025-03-27 Thread Christian Schoenebeck
On Thursday, March 20, 2025 1:16:20 PM CET Christian Schoenebeck wrote: > According to 'man 2 close' errors returned by close() should only be used > for either diagnostic purposes or for catching data loss due to a previous > write error, as an error result of close() usually indicates a deferred

[PATCH V1] migration: cpr breaks SNP guest

2025-03-27 Thread Steve Sistare
With aux-ram-share=off, booting an SNP guest fails with: ../util/error.c:68: error_setv: Assertion `*errp == NULL' failed. This is because a CPR blocker for the guest_memfd ramblock is added twice, once in ram_block_add_cpr_blocker because aux-ram-share=off so rb->fd < 0, and once in ram_block_

[PATCH] hw/net/e1000: fix memory leak in timer_del()

2025-03-27 Thread Zheng Huang
Hi, This patch addresses a memory leak bug in the usages of `timer_del()`. The issue arisesfrom the incorrect use of the ambiguous timer API `timer_del()`, which does not free the timer object. The leak sanitizer report this issue during fuzzing. The correct API `timer_free()` freed the timer obje

RE: [PATCH for-10.1 v2 20/37] vfio: Introduce a new file for VFIODevice definitions

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 20/37] vfio: Introduce a new file for VFIODevice >definitions > >Move all VFIODevice related routines of "helpers.c" into a new "device.c" >file. > >Signed-off-by: Cédric Le Goater Reviewed-by: Zhenzhong Duan Th

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

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:51:15AM +0100, Cédric Le Goater wrote: > 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-by: John Levon regards john

Re: Questions about vfio-pci

2025-03-27 Thread yangjinqian via
> > Hello Jinqian > > On 3/25/25 09:00, yangjinqian via wrote: > > Hi, > > > > I'm observing intermittent failures when enabling the HNS3 network > > port in VM using > > > > QEMU with the mainline kernel. > > > Would you mind opening a gitlab issue with more details on the context, host, > gue

[PATCH for-10.1] hw/riscv: do not mark any machine as default

2025-03-27 Thread Daniel Henrique Barboza
Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and made it default for qemu-system-riscv32/64. It was the first RISC-V machine added in QEMU so setting it as default was sensible. Today we have 7 risc64 and 6 riscv32 machines and having 'spike' as default machine is not intuit

Re: [RFC PATCH v2 17/20] hw/arm/smmuv3: Check idr registers for STE_S1CDMAX and STE_S1STALLD

2025-03-27 Thread Jason Gunthorpe
On Wed, Mar 26, 2025 at 06:18:49PM +0100, Eric Auger wrote: > Again I think we need to understand the consequence of having a more > comprehensive support of SSID. This also holds with old the IDR fields > that may be inherited from the HW and we don't support yet in the > emulation code To be ver

Re: [PATCH qemu 1/1] Add IOURING_SETUP_SINGLE_ISSUER flag to improve iouring performance

2025-03-27 Thread Kevin Wolf
Am 26.03.2025 um 18:46 hat Stefan Hajnoczi geschrieben: > On Wed, Mar 26, 2025 at 06:13:44PM +0100, Kevin Wolf wrote: > > Am 25.03.2025 um 21:49 hat ~h0lyalg0rithm geschrieben: > > > From: Suraj Shirvankar > > > > > > Signed-off-by: Suraj Shirvankar > > > --- > > > util/fdmon-io_uring.c | 8 +++

Re: [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-03-27 Thread zoudongjie via
On Thu, 27 Mar 2025 09:04:51 +0100, Markus wrote: > zoudongjie writes: > > > On Wed, Mar 26, 2025 at 10:53:20 +0100, Markus wrote: > >> zoudongjie via writes: > >> > >> > From: Zhu Yangyang > >> > > >> > Calling qmp_block_set_io_throttle() will be blocked for a long time > >> > when a network

Re: [PATCH v1 1/1] hw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when I2CM_DMA_TX/RX_ADDR set first

2025-03-27 Thread Cédric Le Goater
Hello Jamin On 3/27/25 08:44, Jamin Lin wrote: In the previous design, the I2C model would update I2CC_DMA_LEN (0x54) based on the value of I2CM_DMA_LEN (0x1C) when the firmware set either I2CM_DMA_TX_ADDR (0x30) or I2CM_DMA_RX_ADDR (0x34). However, this only worked correctly if the firmware set

Re: [RFC PATCH] migration/rdma: Remove qemu_rdma_broken_ipv6_kernel

2025-03-27 Thread Jinpu Wang
Hi Zhijian, On Thu, Mar 27, 2025 at 2:18 AM Zhijian Li (Fujitsu) wrote: > > > Please fix this compiling error. > > > cc -m64 -mcx16 -Ilibcommon.a.p -Isubprojects/libvduse > -I../subprojects/libvduse -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 > -I/usr/include/libpng16 -I/usr/include/spice-

Re: [PATCH for-10.1 v2 07/37] vfio: Move vfio_device_state_is_running/precopy() into migration.c

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:50:52AM +0100, Cédric Le Goater wrote: > These routines are migration related. Move their declaration and > implementation under the migration files. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

RE: [PATCH for-10.1 v2 10/37] vfio: Introduce a new header file for VFIOIOMMUFD declarations

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 10/37] vfio: Introduce a new header file for >VFIOIOMMUFD declarations > >Gather all VFIOIOMMUFD related declarations introduced by commits >5ee3dc7af785 ("vfio/iommufd: Implement the iommufd backend") and >5b1e96e

Re: [PATCH for-10.1 v2 34/37] vfio: Introduce vfio_listener_un/register() routines

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:51:19AM +0100, Cédric Le Goater wrote: > This hides the MemoryListener implementation and makes the code common > to both IOMMU backends, legacy and IOMMUFD. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

Re: [PATCH] hw/net/e1000: fix memory leak in timer_del()

2025-03-27 Thread Prasad Pandit
Hello, On Thu, 27 Mar 2025 at 16:59, Zheng Huang wrote: > This patch addresses a memory leak bug in the usages of `timer_del()`. > The issue arisesfrom the incorrect use of the ambiguous timer API > `timer_del()`, which does not free the timer object. The leak sanitizer > report this issue during

Re: [PATCH] hw/net/virtio-net: fix memory leak in timer_del()

2025-03-27 Thread Prasad Pandit
On Thu, 27 Mar 2025 at 16:15, Zheng Huang wrote: > +++ b/hw/net/virtio-net.c > @@ -422,7 +422,7 @@ static void virtio_net_set_status(struct VirtIODevice > *vdev, uint8_t status) > } > } else { > if (q->tx_timer) { > -timer_del(q->tx_timer); > +

Re: [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-03-27 Thread Markus Armbruster
zoudongjie writes: > On Thu, 27 Mar 2025 09:04:51 +0100, Markus wrote: >> zoudongjie writes: >> >> > On Wed, Mar 26, 2025 at 10:53:20 +0100, Markus wrote: >> >> zoudongjie via writes: >> >> >> >> > From: Zhu Yangyang >> >> > >> >> > Calling qmp_block_set_io_throttle() will be blocked for a l

Re: [PULL 2/8] migration: ram block cpr blockers

2025-03-27 Thread Tom Lendacky
On 3/27/25 07:27, Steven Sistare wrote: > On 3/26/2025 5:34 PM, Michael Roth wrote: >> On Wed, Mar 26, 2025 at 05:13:50PM -0300, Fabiano Rosas wrote: >>> Michael Roth writes: Quoting Tom Lendacky (2025-03-26 14:21:31) > On 3/26/25 13:46, Tom Lendacky wrote: >> On 3/7/25 12:15, Fabiano

Re: [PATCH for-10.1] hw/riscv: do not mark any machine as default

2025-03-27 Thread Frank Chang
Reviewed-by: Frank Chang Daniel Henrique Barboza 於 2025年3月27日 週四 下午9:04寫道: > > Commit 5b4beba124 ("RISC-V Spike Machines") added the Spike machine and > made it default for qemu-system-riscv32/64. It was the first RISC-V > machine added in QEMU so setting it as default was sensible. > > Today we

Re: [PATCH V1] migration: cpr breaks SNP guest

2025-03-27 Thread Tom Lendacky
On 3/27/25 08:36, Steve Sistare wrote: > With aux-ram-share=off, booting an SNP guest fails with: > > ../util/error.c:68: error_setv: Assertion `*errp == NULL' failed. > > This is because a CPR blocker for the guest_memfd ramblock is added > twice, once in ram_block_add_cpr_blocker because aux-

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

2025-03-27 Thread Hanna Czenczek
On 27.03.25 13:18, Markus Armbruster wrote: Hanna Czenczek writes: On 26.03.25 12:41, Markus Armbruster wrote: Hanna Czenczek writes: On 26.03.25 06:38, Markus Armbruster wrote: Hanna Czenczek writes: FUSE allows creating multiple request queues by "cloning" /dev/fuse FDs (via open("/d

Re: [PATCH V1] migration: cpr breaks SNP guest

2025-03-27 Thread Fabiano Rosas
Steve Sistare writes: > With aux-ram-share=off, booting an SNP guest fails with: > > ../util/error.c:68: error_setv: Assertion `*errp == NULL' failed. > > This is because a CPR blocker for the guest_memfd ramblock is added > twice, once in ram_block_add_cpr_blocker because aux-ram-share=off so

[PATCH v7 0/7] Power11 support for QEMU [PowerNV]

2025-03-27 Thread Aditya Gupta
Overview Add support for Power11 powernv machine type. As Power11 core is same as Power10, hence much of the code has been reused from Power10. Split Powernv11 chip/machine code into commits introducing: chip,machine,xive,phb This is to try to keep the code smaller in each commit,

[PATCH v7 7/7] tests/powernv: Add PowerNV test for Power11

2025-03-27 Thread Aditya Gupta
With all Power11 support in place, add Power11 PowerNV test. Cc: Cédric Le Goater Cc: Frédéric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- tests/functional/test_ppc64_powernv.py | 4 1 file changed, 4 insertions(+) diff --

[PULL 3/3] mailmap: Update email address for Akihiko Odaki

2025-03-27 Thread Michael Tokarev
From: Akihiko Odaki It's too late but better than never. Signed-off-by: Akihiko Odaki Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- .mailmap | 1 + 1 file changed, 1 insertion(+) diff --git a/.mailmap b/.mailmap index 5f6df414e1..33fe75400f 100644 --- a/.mailmap +++ b/.mai

[PATCH v2 12/30] accel/tcg: fix missing includes for TCG_GUEST_DEFAULT_MO

2025-03-27 Thread Pierrick Bouvier
We prepare to remove cpu.h from cpu-all.h, which will transitively remove it from accel/tcg/tb-internal.h, and thus from most of tcg compilation units. Signed-off-by: Pierrick Bouvier --- accel/tcg/internal-target.h | 1 + include/exec/poison.h | 1 + accel/tcg/translate-all.c | 1 + 3 f

Re: [PATCH] tests/functional/test_ppc64_replay: Mark the e500 test as flaky

2025-03-27 Thread Daniel P . Berrangé
On Thu, Mar 20, 2025 at 07:50:12AM +0100, Thomas Huth wrote: > The test_ppc64_e500 occasionally fails (it just hangs and finally times > out). The same issue could also be reproduced with the former Avocado > test already (especially if the host system is under heavy load), so > it's not a new regr

[PATCH] hw/pci-host/gt64120.c: Fix PCI host bridge endianness handling

2025-03-27 Thread rakeshj
The GT-64120 PCI controller requires special handling where: 1. Host bridge (device 0) must use native endianness 2. Other devices follow MByteSwap bit in GT_PCI0_CMD Previous implementation accidentally swapped all accesses, breaking host bridge detection (lspci -d 11ab:4620). This fix: - Adds d

[PATCH] tests/functional: Remove semicolons at the end of lines

2025-03-27 Thread Thomas Huth
From: Thomas Huth Yes, we are all C coders who try to write Python code for testing... but still, let's better avoid semicolons at the end of the lines to keep "pylint" happy! Signed-off-by: Thomas Huth --- tests/functional/aspeed.py| 2 +- tests/functional/test_aarch64_as

Re: [PATCH 06/15] fuse: Fix mount options

2025-03-27 Thread Stefan Hajnoczi
On Tue, Mar 25, 2025 at 05:06:46PM +0100, Hanna Czenczek wrote: > Since I actually took a look into how mounting with libfuse works[1], I > now know that the FUSE mount options are not exactly standard mount > system call options. Specifically: > - We should add "nosuid,nodev,noatime" because that

Re: [PATCH 04/15] fuse: Explicitly set inode ID to 1

2025-03-27 Thread Stefan Hajnoczi
On Tue, Mar 25, 2025 at 05:06:44PM +0100, Hanna Czenczek wrote: > Setting .st_ino to the FUSE inode ID is kind of arbitrary. While in > practice it is going to be fixed (to FUSE_ROOT_ID, which is 1) because > we only have the root inode, that is not obvious in fuse_getattr(). > > Just explicitly

Re: [PATCH 10/15] fuse: Add halted flag

2025-03-27 Thread Stefan Hajnoczi
On Tue, Mar 25, 2025 at 05:06:50PM +0100, Hanna Czenczek wrote: > This is a flag that we will want when processing FUSE requests > ourselves: When the kernel sends us e.g. a truncated request (i.e. we > receive less data than the request's indicated length), we cannot rely > on subsequent data to b

Re: [PATCH V2] migration: cpr breaks SNP guest

2025-03-27 Thread Tom Lendacky
On 3/27/25 09:52, Steve Sistare wrote: > With aux-ram-share=off, booting an SNP guest fails with: > > ../util/error.c:68: error_setv: Assertion `*errp == NULL' failed. > > This is because a CPR blocker for the guest_memfd ramblock is added > twice, once in ram_block_add_cpr_blocker because aux-

[PATCH for-10.0] Revert "target/riscv/kvm: add missing KVM CSRs"

2025-03-27 Thread Daniel Henrique Barboza
This commit breaks KVM boot on older kernels, like reported in [1], due to senvcfg not being available in them. There's also another problem related to scounteren. Using a recent enough guest buildroot, 'ping' will be build with rdtime support. In this case, doing a ping in a KVM guest while expos

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

2025-03-27 Thread Stefan Hajnoczi
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_IOC_CLONE)). > > We can use this to implement multi-threading. > > Note that the interface presented here differs fro

Re: [PATCH 15/15] fuse: Increase MAX_WRITE_SIZE with a second buffer

2025-03-27 Thread Stefan Hajnoczi
On Tue, Mar 25, 2025 at 05:06:55PM +0100, Hanna Czenczek wrote: > We probably want to support larger write sizes than just 4k; 64k seems > nice. However, we cannot read partial requests from the FUSE FD, we > always have to read requests in full; so our read buffer must be large > enough to accomm

[RFC 3/3] vdagent: Drop blocker to support migration

2025-03-27 Thread yong . huang
From: Hyman Huang Signed-off-by: Hyman Huang --- ui/vdagent.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 4635e8fa56..36b0568135 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -6,7 +6,6 @@ #include "qemu/option.h" #include "qemu/units.h"

Re: [PATCH v1 2/2] block/nvme: Enable NVMe userspace driver for s390x

2025-03-27 Thread Stefan Hajnoczi
On Wed, Mar 26, 2025 at 11:10:07AM -0700, Farhan Ali wrote: > +static inline uint32_t nvme_mmio_read_32(const void *addr) > +{ > +uint32_t ret; > + > +#ifdef __s390x__ > +ret = s390x_pci_mmio_read_32(addr); > +#else > +/* Prevent the compiler from optimizing away the load */ > +ret

Re: [PATCH v1 1/2] util: Add functions for s390x mmio read/write

2025-03-27 Thread Stefan Hajnoczi
On Wed, Mar 26, 2025 at 11:10:06AM -0700, Farhan Ali wrote: > Starting with z15 (or newer) we can execute mmio > instructions from userspace. On older platforms > where we don't have these instructions available > we can fallback to using system calls to access > the PCI mapped resources. > > This

[PULL 1/1] target/loongarch: Fix the cpu unplug resource leak

2025-03-27 Thread Song Gao
From: Xianglai Li When the cpu is created, qemu_add_vm_change_state_handler is called in the kvm_arch_init_vcpu function to create the VMChangeStateEntry resource. However, the resource is not released when the cpu is destroyed. This results in a qemu process segment error when the virtual machi

[PULL 0/1] bug fix for 10.0

2025-03-27 Thread Song Gao
The following changes since commit b876e721f1c939f3e83ac85bd3c1c2821e12b3fa: Update version for v10.0.0-rc1 release (2025-03-25 13:58:14 -0400) are available in the Git repository at: https://github.com/gaosong715/qemu.git tags/pull-loongarch-20250327 for you to fetch changes up to

[PATCH 08/17] target/avr: Add offset-io cpu property

2025-03-27 Thread Richard Henderson
Communicate the offset of io within the first page between the board, the cpu, and the translator. So far this is always 0. This will be used to optimize memory layout. Signed-off-by: Richard Henderson --- target/avr/cpu.h | 2 ++ hw/avr/atmega.c| 2 ++ target/avr/cpu.c | 1

RE: [PATCH v1 1/1] hw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when I2CM_DMA_TX/RX_ADDR set first

2025-03-27 Thread Jamin Lin
Hi Cedric, > Cc: Troy Lee ; long...@lenovo.com > Subject: Re: [PATCH v1 1/1] hw/i2c/aspeed: Fix wrong I2CC_DMA_LEN when > I2CM_DMA_TX/RX_ADDR set first > > Hello Jamin > > On 3/27/25 08:44, Jamin Lin wrote: > > In the previous design, the I2C model would update I2CC_DMA_LEN (0x54) > > based on

[PATCH] hw/scsi/lsi53c895a: fix memory leak in lsi_scsi_realize()

2025-03-27 Thread Zheng Huang
Hi, This patch addresses a memory leak bug in the usages of `timer_del()`. The issue arisesfrom the incorrect use of the ambiguous timer API `timer_del()`, which does not free the timer object. The LeakSanitizer report this issue during fuzzing. The correct API `timer_free()` freed the timer objec

RE: [PATCH for-10.1 24/32] vfio: Introduce new files for dirty tracking definitions and declarations

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Joao Martins >Subject: Re: [PATCH for-10.1 24/32] vfio: Introduce new files for dirty >tracking >definitions and declarations > >On 20/03/2025 09:52, Duan, Zhenzhong wrote: >>> -Original Message- >>> From: Cédric Le Goater >>> Subject: [PATCH for-10.

Re: [PATCH-for-10.0 06/12] hw/i2c/pca954x: Categorize and add description

2025-03-27 Thread Thomas Huth
On 25/03/2025 23.43, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/i2c_mux_pca954x.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/i2c/i2c_mux_pca954x.c b/hw/i2c/i2c_mux_pca954x.c index 779cc4e66ed..100b8d86093 100644 --- a/hw/i

Re: [PATCH] 9pfs: fix 'total_open_fd' decrementation

2025-03-27 Thread Christian Schoenebeck
On Thursday, March 20, 2025 11:59:38 AM CET Greg Kurz wrote: > On Thu, 20 Mar 2025 10:48:11 +0100 > Christian Schoenebeck wrote: > > > On Wednesday, March 19, 2025 7:52:51 PM CET Greg Kurz wrote: > > > On Wed, 19 Mar 2025 13:14:27 +0100 > > > Christian Schoenebeck wrote: > > > > > > > On Wednes

Re: Re: [PATCH] hw/net/e1000: fix memory leak in timer_del()

2025-03-27 Thread Zheng Huang
Hello Prasad, 在 2025/3/27 20:40, Prasad Pandit wrote: >> @@ -360,13 +360,13 @@ e1000e_intrmgr_fire_all_timers(E1000ECore *core) >> int i; >> >> if (core->itr.running) { >> -timer_del(core->itr.timer); >> +timer_free(core->itr.timer); >> e1000e_intrmgr_on_throttli

[PATCH v2 13/30] accel/tcg: fix missing includes for TARGET_HAS_PRECISE_SMC

2025-03-27 Thread Pierrick Bouvier
We prepare to remove cpu.h from cpu-all.h, which will transitively remove it from accel/tcg/tb-internal.h, and thus from most of tcg compilation units. Note: this was caught by a test regression for s390x-softmmu. Signed-off-by: Pierrick Bouvier --- include/exec/poison.h | 1 + accel/tcg/tb-mai

[PATCH] target/ppc: Deprecate Power8E and Power8NVL

2025-03-27 Thread Aditya Gupta
Power8E and Power8NVL variants are not of much use in QEMU now, and not being maintained either. Deprecate the 8E and 8NVL variants. After deprecation, QEMU will print a warning like below when the CPU/Chips are used: $ ./build/qemu-system-ppc64 -M powernv8 --cpu power8nvl -nographic qem

RE: [PATCH for-10.1 v2 08/37] vfio: Introduce a new header file for VFIOdisplay declarations

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 08/37] vfio: Introduce a new header file for >VFIOdisplay declarations > >Gather all VFIOdisplay related declarations into "vfio-display.h" to >reduce exposure of VFIO internals in "hw/vfio/vfio-common.h". > >Revie

[PULL 4/6] target/s390x: Fix a typo in s390_cpu_class_init()

2025-03-27 Thread Thomas Huth
From: Philippe Mathieu-Daudé Replace the comma at the end of the line by a semicolon. Fixes: 41868f846d2 ("s390x/cpumodel: "host" and "qemu" as CPU subclasses") Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20250324165356.39540-1-ph

Re: [PATCH for-10.1 v2 25/37] vfio: Move vfio_reset_handler() into device.c

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:51:10AM +0100, Cédric Le Goater wrote: > Pass-through devices of a VM are not necessarily in the same group and > all groups/address_spaces need to be scanned when the machine is > reset. Commit f16f39c3fc97 ("Implement PCI hot reset") introduced a VM > reset handler for

Re: [PATCH for-10.1 v2 04/37] vfio: Make vfio_un/block_multiple_devices_migration() static

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:50:49AM +0100, Cédric Le Goater wrote: > Both of these routines are only used in file "migration.c". Move them > there. > > Reviewed-by: Joao Martins > Link: > https://lore.kernel.org/qemu-devel/20250318095415.670319-5-...@redhat.com > Signed-off-by: Cédric Le Goater

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

2025-03-27 Thread Duan, Zhenzhong
>-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 exposure of VFIO internals in "hw/vfio/vfio

RE: [RFC PATCH v2 19/20] hw/arm/virt-acpi-build: Update IORT with multiple smmuv3-accel nodes

2025-03-27 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Nicolin Chen > Sent: Wednesday, March 26, 2025 6:51 PM > To: Eric Auger > Cc: Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org; peter.mayd...@linaro.org; j...@nvidia.com; > ddut...@redhat.com; berra...@redhat.com; nath...@nvidia.com

Re: [PATCH for-10.1 v2 31/37] vfio: Rename vfio_get_dirty_bitmap()

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:51:16AM +0100, Cédric Le Goater wrote: > vfio_container_query_dirty_bitmap() is consistent the VFIO container > routine naming scheme and is now free to use. "consistent with" ? Otherwise Reviewed-by: John Levon regards john

Re: [PATCH for-10.1 v2 03/37] vfio: Introduce a new header file for external migration services

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:50:48AM +0100, Cédric Le Goater wrote: > The migration core subsystem makes use of the VFIO migration API to > collect statistics on the number of bytes transferred. These services > are declared in "hw/vfio/vfio-common.h" which also contains VFIO > internal declarations

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

2025-03-27 Thread John Levon
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(-) > > diff --git a/hw/vfio/

Re: [PATCH for-10.1 v2 20/37] vfio: Introduce a new file for VFIODevice definitions

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:51:05AM +0100, Cédric Le Goater wrote: > Move all VFIODevice related routines of "helpers.c" into a new "device.c" > file. > > Signed-off-by: Cédric Le Goater Reviewed-by: John Levon regards john

RE: [PATCH for-10.1 v2 22/37] vfio: Move vfio_kvm_device_fd() into helpers.c

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 22/37] vfio: Move vfio_kvm_device_fd() into >helpers.c > >The vfio_kvm_device_add/del_fd() routines opening the VFIO pseudo >device are defined in "helpers.c". Move 'vfio_kvm_device_fd' >definition there and its dec

RE: [PATCH for-10.1 v2 24/37] vfio: Move vfio_de/attach_device() into device.c

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 24/37] vfio: Move vfio_de/attach_device() into >device.c > >These routines are VFIODevice related. Move their definitions into >"device.c". > >Reviewed-by: John Levon >Link: https://lore.kernel.org/qemu-devel/20250

RE: [PATCH for-10.1 v2 17/37] vfio: Move vfio_get_info_dma_avail() into helpers.c

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 17/37] vfio: Move vfio_get_info_dma_avail() into >helpers.c > >vfio_get_info_dma_avail() is a low level routine similar to the other >routines extracting capabilities from 'struct vfio_iommu_type1_info'. >It belongs

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

2025-03-27 Thread John Levon
On Wed, Mar 26, 2025 at 08:51:13AM +0100, 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. > > Signed-

RE: [PATCH for-10.1 v2 25/37] vfio: Move vfio_reset_handler() into device.c

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 25/37] vfio: Move vfio_reset_handler() into >device.c > >Pass-through devices of a VM are not necessarily in the same group and >all groups/address_spaces need to be scanned when the machine is >reset. Commit f16f3

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

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 36/37] vfio: Rename VFIODevice related services > >Rename these routines : > > vfio_disable_irqindex -> vfio_device_irq_disable > vfio_unmask_single_irqindex -> vfio_device_irq_unmask > vfio_mask_single_irq

RE: [PATCH for-10.1 v2 37/37] vfio: Rename VFIOContainer related services

2025-03-27 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Subject: [PATCH for-10.1 v2 37/37] vfio: Rename VFIOContainer related services > >Rename these routines : > > vfio_put_group -> vfio_group_put > vfio_get_group -> vfio_group_get > vfio_kvm_device_del_group -> vfio_group_del_kvm_device > vf

RE: [RFC PATCH v2 17/20] hw/arm/smmuv3: Check idr registers for STE_S1CDMAX and STE_S1STALLD

2025-03-27 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Nicolin Chen > Sent: Wednesday, March 26, 2025 7:47 PM > To: Eric Auger > Cc: Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org; peter.mayd...@linaro.org; j...@nvidia.com; > ddut...@redhat.com; berra...@redhat.com; nath...@nvidia.com

Re: [PATCH v6 07/10] ppc/pnv: Introduce Power11 PowerNV machine

2025-03-27 Thread Cédric Le Goater
On 3/26/25 18:21, Aditya Gupta wrote: On 26/03/25 13:39, Cédric Le Goater wrote: On 3/25/25 18:38, Aditya Gupta wrote: <...snip...> On 25/03/25 22:45, Cédric Le Goater wrote: One nice about it IIRC was being able to tune the number of PHBs per chip, which reduced booting time (for 16s) and a

RE: [RFC PATCH v2 13/20] hw/arm/smmuv3-accel: Introduce helpers to batch and issue cache invalidations

2025-03-27 Thread Shameerali Kolothum Thodi via
> -Original Message- > From: Nicolin Chen > Sent: Wednesday, March 26, 2025 7:16 PM > To: Eric Auger > Cc: Shameerali Kolothum Thodi > ; qemu-...@nongnu.org; > qemu-devel@nongnu.org; peter.mayd...@linaro.org; j...@nvidia.com; > ddut...@redhat.com; berra...@redhat.com; nath...@nvidia.co

Re: [RFC PATCH v2 13/20] hw/arm/smmuv3-accel: Introduce helpers to batch and issue cache invalidations

2025-03-27 Thread Eric Auger
On 3/26/25 8:16 PM, Nicolin Chen wrote: > On Wed, Mar 26, 2025 at 02:38:04PM +0100, Eric Auger wrote: >>> +/* Update batch->ncmds to the number of execute cmds */ >>> +int smmuv3_accel_issue_cmd_batch(SMMUState *bs, SMMUCommandBatch *batch) >>> +{ >>> +SMMUv3AccelState *s_accel = ARM_SMMUV3_

Re: [PATCH 2/4] docs, qapi: generate undocumented return sections

2025-03-27 Thread Markus Armbruster
John Snow writes: > With the insertions fixed to not duplicate/triplicate things, I notice > these (unintentional) changes: > > - x-debug-block-dirty-bitmap-sha256 moves returns from above errors to below > - blockdev-snapshot-delete-internal-sync ditto > - query-xen-replication-status ditto > -

Re: [RFC PATCH v2 15/20] hw/arm/smmuv3: Forward invalidation commands to hw

2025-03-27 Thread Eric Auger
On 3/26/25 8:27 PM, Nicolin Chen wrote: > On Wed, Mar 26, 2025 at 03:16:18PM +0100, Eric Auger wrote: >>> @@ -1395,6 +1403,13 @@ static int smmuv3_cmdq_consume(SMMUv3State *s) >>> >>> trace_smmuv3_cmdq_cfgi_cd(sid); >>> smmuv3_flush_config(sdev); >>> + >>> +

Re: [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-03-27 Thread Markus Armbruster
zoudongjie writes: > On Wed, Mar 26, 2025 at 10:53:20 +0100, Markus wrote: >> zoudongjie via writes: >> >> > From: Zhu Yangyang >> > >> > Calling qmp_block_set_io_throttle() will be blocked for a long time >> > when a network disk is configured and the network failure is just about >> > to occ

Re: [PATCH v3 2/2] qapi/throttle: add timeout parameter for qmp_block_set_io_throttle()

2025-03-27 Thread zoudongjie via
On Wed, Mar 26, 2025 at 10:53:20 +0100, Markus wrote: > zoudongjie via writes: > > > From: Zhu Yangyang > > > > Calling qmp_block_set_io_throttle() will be blocked for a long time > > when a network disk is configured and the network failure is just about > > to occur. > > > > Therefore, we add

[PULL 1/6] tests/functional/test_ppc64_replay: Mark the e500 test as flaky

2025-03-27 Thread Thomas Huth
From: Thomas Huth The test_ppc64_e500 occasionally fails (it just hangs and finally times out). The same issue could also be reproduced with the former Avocado test already (especially if the host system is under heavy load), so it's not a new regression. It's very likely the issue that has been

[PULL 5/6] tests/functional/test_aarch64_virt_gpu: Skip if "dbus" display isn't available

2025-03-27 Thread Thomas Huth
From: Thomas Huth This test currently fails if the "dbus" display has not been compiled into the binary (which can happen when CFI has been enabled, for example). Check for the error message to skip the test in that case. While we're at it, also make sure that this test is covered in the right s

[PULL 3/6] tests/functional: Add missing require_netdev('user') statements

2025-03-27 Thread Thomas Huth
From: Thomas Huth A bunch of tests are using "-netdev user" but fail to check for the availability of SLIRP in the binary, so these tests fail if QEMU has been configured with "--disable-slirp" (most of the tests are disabled by default with a decorator, that's likely why nobody noticed this prob

  1   2   >