Re: [PATCH qemu 7/8] hw/cxl/cxl-mailbox-utils: Added support for Get Log Capabilities (Opcode 0402h)

2025-06-01 Thread Arpit Kumar
On 28/05/25 01:38PM, Jonathan Cameron wrote: On Wed, 28 May 2025 13:31:06 +0100 Jonathan Cameron wrote: On Fri, 16 May 2025 19:12:45 +0530 Arpit Kumar wrote: > On 12/05/25 05:40PM, Jonathan Cameron wrote: > >On Mon, 12 May 2025 09:37:07 -0400 > >"Michael S. Tsirkin" wrote: > > > >> On Mon,

Re: [PATCH v2 24/25] tests/qtest/bios-tables-test: Keep ACPI PCI hotplug off

2025-06-01 Thread Gustavo Romero
Hi Eric, On 5/28/25 06:48, Eric Auger wrote: Hi Igor, On 5/28/25 11:38 AM, Igor Mammedov wrote: On Tue, 27 May 2025 09:40:26 +0200 Eric Auger wrote: From: Gustavo Romero ACPI PCI hotplug is now turned on by default so we need to change the existing tests to keep it off. However, even sett

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

2025-06-01 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 v5 1/9] gdbstub: Expose gdb_write_register function to consumers of gdbstub

2025-06-01 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 --- gdbstub/gdbstub.c | 2 +- include/exec/gdbstub.h |

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

2025-06-01 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 v6 1/9] gdbstub: Expose gdb_write_register function to consumers of gdbstub

2025-06-01 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 --- gdbstub/gdbstub.c | 2 +- include/exec/gdbstub.h |

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

2025-06-01 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/

Re: [PATCH v4 01/27] hw/i386/pc: Remove deprecated pc-q35-2.6 and pc-i440fx-2.6 machines

2025-06-01 Thread Thomas Huth
On 09/05/2025 17.23, Igor Mammedov wrote: On Thu, 8 May 2025 15:35:24 +0200 Philippe Mathieu-Daudé wrote: These machines has been supported for a period of more than 6 years. According to our versioned machine support policy (see commit ce80c4fa6ff "docs: document special exception for machin

Re: [PATCH v2 24/25] tests/qtest/bios-tables-test: Keep ACPI PCI hotplug off

2025-06-01 Thread Gustavo Romero
Hi Igor and Eric, I'm sending again this to the mailing list since it seems the first one got lost... I can't find it either in qemu-devel@ or in qemu-arm@ :( On 5/30/25 08:51, Igor Mammedov wrote: On Wed, 28 May 2025 12:04:26 -0300 Gustavo Romero wrote: Hi Igor, On 5/28/25 10:02, Igor Mamm

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

2025-06-01 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 v6 2/9] plugins: Add register write API

2025-06-01 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 --- incl

Re: [PATCH v2 24/25] tests/qtest/bios-tables-test: Keep ACPI PCI hotplug off

2025-06-01 Thread Gustavo Romero
Hi Igor and Eric, On 5/30/25 08:51, Igor Mammedov wrote: On Wed, 28 May 2025 12:04:26 -0300 Gustavo Romero wrote: Hi Igor, On 5/28/25 10:02, Igor Mammedov wrote: On Wed, 28 May 2025 09:41:15 -0300 Gustavo Romero wrote: Hi Igor, On 5/28/25 06:38, Igor Mammedov wrote: On Tue, 27 May 2

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

2025-06-01 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 v6 3/9] plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W callbacks

2025-06-01 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

Re: [PATCH 1/1] Add RISCV ZALASR extension

2025-06-01 Thread Alistair Francis
On Wed, May 21, 2025 at 7:21 PM Roan Richmond wrote: > Can you include in the commit message which exact version (please include a link) of the spec this targets. We need exact versions as RISC-V will often release multiple conflicting "final" versions, so it's good to have a record of what this

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

2025-06-01 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

Re: [PATCH v2 00/20] AMD vIOMMU: DMA remapping support for VFIO devices

2025-06-01 Thread Sairaj Kodilkar
Sairaj: Are you passing a full NVME device to the guest (i.e. a PF)? I ask because the BDF in '-device vfio-pci,host=:44:00.0' doesn't look like a typical VF... Hey Alejandro, I am passing full NVME device to the guest (not just VF). Thanks Sairaj

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

2025-06-01 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 v5 5/9] plugins: Add memory hardware address read/write API

2025-06-01 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 v5 7/9] plugins: Add hypercalls plugin and test

2025-06-01 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

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

2025-06-01 Thread Alistair Francis
On Fri, Apr 25, 2025 at 10:22 PM Ran Wang wrote: > > From: Huang Borong <3543977...@qq.com> > > 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 extensi

Re: [qemu PATCH 3/3] target/riscv/cpu.c: do better with 'named features' doc

2025-06-01 Thread Alistair Francis
On Fri, May 30, 2025 at 6:24 AM Daniel Henrique Barboza wrote: > > Most of the named features are added directly in isa_edata_arr[], some > of them are also added in riscv_cpu_named_features(). There is a reason > for that, and the existing docs can do better explaining it. > > Signed-off-by: Dani

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

2025-06-01 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

Re: [qemu PATCH 2/3] target/riscv/cpu.c: add 'ssstrict' to riscv,isa

2025-06-01 Thread Alistair Francis
On Fri, May 30, 2025 at 6:24 AM Daniel Henrique Barboza wrote: > > 'ssstrict' is a RVA23 profile-defined extension defined as follows: > > "No non-conforming extensions are present. Attempts to execute > unimplemented opcodes or access unimplemented CSRs in the standard or > reserved encoding spac

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

2025-06-01 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 v5 0/9] Add additional plugin API functions to read and write memory and registers

2025-06-01 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 v5 6/9] plugins: Add patcher plugin and test

2025-06-01 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 v5 3/9] plugins: Add enforcement of QEMU_PLUGIN_CB flags in register R/W callbacks

2025-06-01 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

Re: [PATCH v4 1/1] hw/riscv: fix PLIC hart topology configuration string when not getting CPUState correctly

2025-06-01 Thread Alistair Francis
On Thu, May 22, 2025 at 12:29 PM Chao Liu wrote: > > riscv_plic_hart_config_string() when getting CPUState via qemu_get_cpu() > should be consistent with keeping sifive_plic_realize() > by hartid_base + cpu_index. > > A better approach is to use cpu_by_arch_id() instead of qemu_get_cpu(), > in ris

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

2025-06-01 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 v5 2/9] plugins: Add register write API

2025-06-01 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 --- incl

Re: [qemu PATCH 1/3] target/riscv/cpu.c: add 'sdtrig' in riscv,isa

2025-06-01 Thread Alistair Francis
On Fri, May 30, 2025 at 6:24 AM Daniel Henrique Barboza wrote: > > We have support for sdtrig for awhile but we are not advertising it. It > is enabled by default via the 'debug' flag. Use the same flag to also > advertise sdtrig. > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair

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

2025-06-01 Thread Alistair Francis
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 Translation-reponse register. > > The PPN of iova should be set entirely in the PPN field o

Re: [PATCH v2 08/25] tests/qtest/bios-tables-test: Prepare for changes in the DSDT table

2025-06-01 Thread Gustavo Romero
Hi Igor and Eric, On 5/27/25 10:03, Igor Mammedov wrote: On Tue, 27 May 2025 14:38:16 +0200 Igor Mammedov wrote: On Tue, 27 May 2025 09:40:10 +0200 Eric Auger wrote: From: Gustavo Romero This commit adds DSDT blobs to the whilelist in the prospect to allow changes in the GPEX _OSC method

Re: [qemu PATCH 0/3] target/riscv: add missing named features

2025-06-01 Thread Alistair Francis
On Fri, May 30, 2025 at 6:24 AM Daniel Henrique Barboza wrote: > > Hi, > > These simple patches add two missing named features in riscv,isa. Third > patch is a doc change I figured was worth doing. > > Drew, as far as Server SoC Reference platform goes, we don't have > 'sdext'. I guess we'll have

Re: [PATCH v5] target/riscv/kvm: add satp mode for host cpu

2025-06-01 Thread Alistair Francis
On Fri, May 30, 2025 at 12:01 AM Meng Zhuo wrote: > > This patch adds host satp mode while kvm/host cpu satp mode is not > set. > > Reviewed-by: Andrew Jones > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2931 > Signed-off-by: Meng Zhuo > --- > This patch don't change the output of er

Re: [PATCH] target/riscv: remove capital 'Z' CPU properties

2025-06-01 Thread Alistair Francis
On Fri, May 30, 2025 at 11:47 PM Daniel Henrique Barboza wrote: > > These properties were deprecated in QEMU 8.2, commit 8043effd9b. > > Signed-off-by: Daniel Henrique Barboza Thanks! Applied to riscv-to-apply.next Alistair > --- > target/riscv/cpu.c | 17 - > target/

Re: [PATCH] target/riscv: remove capital 'Z' CPU properties

2025-06-01 Thread Alistair Francis
On Fri, May 30, 2025 at 11:47 PM Daniel Henrique Barboza wrote: > > These properties were deprecated in QEMU 8.2, commit 8043effd9b. > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 17 - > target/riscv/cpu

Re: [PATCH V4 16/43] pci: skip reset during cpr

2025-06-01 Thread Michael S. Tsirkin
On Sun, Jun 01, 2025 at 06:38:43PM +0200, Cédric Le Goater wrote: > On 5/29/25 21:24, Steve Sistare wrote: > > Do not reset a vfio-pci device during CPR. > > > > Signed-off-by: Steve Sistare > > --- > > include/hw/pci/pci_device.h | 3 +++ > > hw/pci/pci.c| 5 + > > hw/vfi

Re: [PATCH v6 3/5] memory: Unify the definiton of ReplayRamPopulate() and ReplayRamDiscard()

2025-06-01 Thread Xiaoyao Li
On 5/30/2025 4:32 PM, Chenyi Qiang wrote: Update ReplayRamDiscard() function to return the result and unify the ReplayRamPopulate() and ReplayRamDiscard() to ReplayRamDiscardState() at the same time due to their identical definitions. This unification simplifies related structures, such as VirtIO

Re: [PATCH V4 12/43] vfio/container: restore DMA vaddr

2025-06-01 Thread Cédric Le Goater
On 5/29/25 21:24, Steve Sistare wrote: In new QEMU, do not register the memory listener at device creation time. Register it later, in the container post_load handler, after all vmstate that may affect regions and mapping boundaries has been loaded. The post_load registration will cause the list

[PATCH 3/3] trace/log: seperate cold path of tracing functions

2025-06-01 Thread Tanish Desai
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, where performance-critical code was inlined based on profiling results. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/log

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

2025-06-01 Thread Tanish Desai
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, where performance-critical code was inlined based on profiling results. Sig

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

2025-06-01 Thread Tanish Desai
Moved rarely used (cold) code from the header file to the C file to avoid unnecessary inlining and reduce binary size. This improves code organization and follows good practices for managing cold paths. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/ftrace.py | 44

[PATCH 0/3] trace: seperate cold path of trace

2025-06-01 Thread Tanish Desai
This patch continues the optimize fast trace paths started in previous patch (trace/simple: seperate hot paths of tracing fucntions), which optimized the simple backend by moving its hot path to the header. Here, we apply the same pattern to the log, ftrace, and syslog backends. The fast path re

Re: [PATCH v2 0/4] VFIO and IOMMU prerequisite stuff for IOMMU nesting support

2025-06-01 Thread Cédric Le Goater
On 5/30/25 11:35, Zhenzhong Duan wrote: Hi, The first 6 patches of [1] are all VFIO or IOMMUFD related additions. Split them out per Cédric and seek for quick acceptance. I didn't copy changelog from [1] as it's a mix of the whole nesting series. For who want a quick view of the whole nesting

Re: [PATCH V3 22/42] vfio-pci: preserve MSI

2025-06-01 Thread Cédric Le Goater
On 5/28/25 19:44, Steven Sistare wrote: Hi Cedric,   Do you have any comments on this before I send V4? Ditto for patch "vfio-pci: preserve INTx". In both, I made the changes you requested in V2. And I will change all "reused" tests to cpr_is_incoming as we discussed elsewhere. I saw. Thanks f

Re: [PATCH V4 00/43] Live update: vfio and iommufd

2025-06-01 Thread Cédric Le Goater
On 5/29/25 21:23, Steve Sistare wrote: Support vfio and iommufd devices with the cpr-transfer live migration mode. Devices that do not support live migration can still support cpr-transfer, allowing live update to a new version of QEMU on the same host, with no loss of guest connectivity. No use

Re: [PATCH V4 10/43] vfio/container: preserve descriptors

2025-06-01 Thread Cédric Le Goater
On 5/29/25 21:24, Steve Sistare wrote: At vfio creation time, save the value of vfio container, group, and device descriptors in CPR state. On qemu restart, vfio_realize() finds and uses the saved descriptors. During reuse, device and iommu state is already configured, so operations in vfio_rea

Re: [PATCH V4 16/43] pci: skip reset during cpr

2025-06-01 Thread Cédric Le Goater
On 5/29/25 21:24, Steve Sistare wrote: Do not reset a vfio-pci device during CPR. Signed-off-by: Steve Sistare --- include/hw/pci/pci_device.h | 3 +++ hw/pci/pci.c| 5 + hw/vfio/pci.c | 7 +++ 3 files changed, 15 insertions(+) diff --git a/include/hw

Re: [PATCH V4 17/43] vfio-pci: skip reset during cpr

2025-06-01 Thread Cédric Le Goater
On 5/29/25 21:24, Steve Sistare wrote: Do not reset a vfio-pci device during CPR, and do not complain if the kernel's PCI config space changes for non-emulated bits between the vmstate save and load, which can happen due to ongoing interrupt activity. Signed-off-by: Steve Sistare Reviewed-by

[PULL 15/31] uefi-test-tools:: Add LoongArch64 support

2025-06-01 Thread Michael S. Tsirkin
From: Bibo Mao Add support to build bios-tables-test iso image for LoongArch system. Signed-off-by: Bibo Mao Acked-by: Gerd Hoffmann Message-Id: <20250520130158.767083-2-maob...@loongson.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/uefi-test-tools/Makefil

Re: [PATCH v6 2/5] memory: Change memory_region_set_ram_discard_manager() to return the result

2025-06-01 Thread Xiaoyao Li
On 5/30/2025 4:32 PM, Chenyi Qiang wrote: Modify memory_region_set_ram_discard_manager() to return -EBUSY 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 mo

[PULL 20/31] rebuild-expected-aml.sh: Add support for LoongArch

2025-06-01 Thread Michael S. Tsirkin
From: Bibo Mao Update the list of supported architectures to include LoongArch. Signed-off-by: Bibo Mao Message-Id: <20250520130158.767083-7-maob...@loongson.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/data/acpi/rebuild-expected-aml.sh | 4 ++-- 1 file cha

Re: [PATCH v6 1/5] memory: Export a helper to get intersection of a MemoryRegionSection with a given range

2025-06-01 Thread Xiaoyao Li
On 5/30/2025 4:32 PM, Chenyi Qiang wrote: 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 Kardashev

[PULL 14/31] pci: Add a PCI-level API for PRI

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF A device can send a PRI request to the IOMMU using pci_pri_request_page. The PRI response is sent back using the notifier managed with pci_pri_register_notifier and pci_pri_unregister_notifier. Signed-off-by: Clement Mathieu--Drif Co-authored-by: Ethan Milon Message

[PULL 13/31] pci: Add a pci-level API for ATS

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF Devices implementing ATS can send translation requests using pci_ats_request_translation. The invalidation events are sent back to the device using the iommu notifier managed with pci_iommu_register_iotlb_notifier / pci_iommu_unregister_iotlb_notifier. Signed-off-by:

[PULL 08/31] pcie: Helper functions to check to check if PRI is enabled

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF pri_enabled can be used to check whether the capability is present and enabled on a PCIe device Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-6-clement.mathieu--d...@eviden.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsir

[PULL 01/31] virtio: check for validity of indirect descriptors

2025-06-01 Thread Michael S. Tsirkin
From: Yuri Benditovich virtio processes indirect descriptors even if the respected feature VIRTIO_RING_F_INDIRECT_DESC was not negotiated. If qemu is used with reduced set of features to emulate the hardware device that does not support indirect descriptors, the will probably trigger problematic

Re: [PATCH V4 18/43] vfio/pci: vfio_pci_vector_init

2025-06-01 Thread Cédric Le Goater
On 5/29/25 21:24, Steve Sistare wrote: Extract a subroutine vfio_pci_vector_init. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --gi

[PULL 06/31] pcie: Helper function to check if ATS is enabled

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF ats_enabled checks whether the capability is present or not. If so, we read the configuration space to get the status of the feature (enabled or not). Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-4-clement.mathieu--d...@eviden.com> Reviewed

[PULL 04/31] pcie: Add helper to declare PASID capability for a pcie device

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-2-clement.mathieu--d...@eviden.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pcie.h | 6 +- include/hw/pci/pcie_regs.h | 5 + hw/pci/p

[PULL 05/31] pcie: Helper functions to check if PASID is enabled

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF pasid_enabled checks whether the capability is present or not. If so, we read the configuration space to get the status of the feature (enabled or not). Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-3-clement.mathieu--d...@eviden.com> Review

[PULL 07/31] pcie: Add a helper to declare the PRI capability for a pcie device

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-5-clement.mathieu--d...@eviden.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pcie.h | 5 - include/hw/pci/pcie_regs.h | 3 +++ hw/pci/pcie

[PULL 21/31] tests/acpi: Fill acpi table data for LoongArch

2025-06-01 Thread Michael S. Tsirkin
From: Bibo Mao The acpi table data is filled for LoongArch virt machine with the following command: tests/data/acpi/rebuild-expected-aml.sh Signed-off-by: Bibo Mao Message-Id: <20250520130806.767181-1-maob...@loongson.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin ---

[PULL 03/31] hw/i386/amd_iommu: Fix xtsup when vcpus < 255

2025-06-01 Thread Michael S. Tsirkin
From: Vasant Hegde If vCPUs > 255 then x86 common code (x86_cpus_init()) call kvm_enable_x2apic(). But if vCPUs <= 255 then the common code won't calls kvm_enable_x2apic(). This is because commit 8c6619f3e692 ("hw/i386/amd_iommu: Simplify non-KVM checks on XTSup feature") removed the call to kvm

[PULL 09/31] pci: Cache the bus mastering status in the device

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF The cached is_master value is necessary to know if a device is allowed to issue ATS/PRI requests or not as these operations do not go through the master_enable memory region. Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-7-clement.mathieu--d

[PULL 24/31] vdpa: check for iova tree initialized at net_client_start

2025-06-01 Thread Michael S. Tsirkin
From: Eugenio Pérez To map the guest memory while it is migrating we need to create the iova_tree, as long as the destination uses x-svq=on. Checking to not override it. The function vhost_vdpa_net_client_stop clear it if the device is stopped. If the guest starts the device again, the iova tree

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

2025-06-01 Thread Michael S. Tsirkin
The following changes since commit d2e9b78162e31b1eaf20f3a4f563da82da56908d: Merge tag 'pull-qapi-2025-05-28' of https://repo.or.cz/qemu/armbru into staging (2025-05-29 08:36:01 -0400) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upst

[PULL 30/31] vdpa: move memory listener register to vhost_vdpa_init

2025-06-01 Thread Michael S. Tsirkin
From: Eugenio Pérez Current memory operations like pinning may take a lot of time at the destination. Currently they are done after the source of the migration is stopped, and before the workload is resumed at the destination. This is a period where neigher traffic can flow, nor the VM workload

[PULL 31/31] hw/i386/pc_piix: Fix RTC ISA IRQ wiring of isapc machine

2025-06-01 Thread Michael S. Tsirkin
From: Bernhard Beschow Commit 56b1f50e3c10 ("hw/i386/pc: Wire RTC ISA IRQs in south bridges") attempted to refactor RTC IRQ wiring which was previously done in pc_basic_device_init() but forgot about the isapc machine. Fix this by wiring in the code section dedicated exclusively to the isapc mach

Re: [PATCH V4 23/43] vfio/pci: export MSI functions

2025-06-01 Thread Cédric Le Goater
On 5/29/25 21:24, Steve Sistare wrote: Export various MSI functions, renamed with a vfio_pci prefix, for use by CPR in subsequent patches. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.h | 8 hw/vfio/pci.c | 29

[PULL 28/31] vdpa: reorder listener assignment

2025-06-01 Thread Michael S. Tsirkin
From: Eugenio Pérez Since commit f6fe3e333f ("vdpa: move memory listener to vhost_vdpa_shared") this piece of code repeatedly assign shared->listener members. This was not a problem as it was not used until device start. However next patches move the listener registration to this vhost_vdpa_ini

[PULL 12/31] pci: Add a pci-level initialization function for IOMMU notifiers

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF This is meant to be used by ATS-capable devices. Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-10-clement.mathieu--d...@eviden.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 33 ++

[PULL 26/31] vdpa: set backend capabilities at vhost_vdpa_init

2025-06-01 Thread Michael S. Tsirkin
From: Eugenio Pérez The backend does not reset them until the vdpa file descriptor is closed so there is no harm in doing it only once. This allows the destination of a live migration to premap memory in batches, using VHOST_BACKEND_F_IOTLB_BATCH. Tested-by: Lei Yang Reviewed-by: Si-Wei Liu A

[PULL 18/31] tests/acpi: Add empty ACPI data files for LoongArch

2025-06-01 Thread Michael S. Tsirkin
From: Bibo Mao Add empty acpi table for LoongArch virt machine, it is only empty file and there is no data in these files. Signed-off-by: Bibo Mao Message-Id: <20250520130158.767083-5-maob...@loongson.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-

[PULL 29/31] vdpa: move iova_tree allocation to net_vhost_vdpa_init

2025-06-01 Thread Michael S. Tsirkin
From: Eugenio Pérez As we are moving to keep the mapping through all the vdpa device life instead of resetting it at VirtIO reset, we need to move all its dependencies to the initialization too. In particular devices with x-svq=on need a valid iova_tree from the beginning. Simplify the code als

[PULL 17/31] tests/qtest/bios-tables-test: Use MiB macro rather hardcode value

2025-06-01 Thread Michael S. Tsirkin
From: Bibo Mao Replace 1024 * 1024 with MiB macro. Signed-off-by: Bibo Mao Message-Id: <20250520130158.767083-4-maob...@loongson.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 20 ++-- 1 file changed, 10 insertions(+

[PULL 10/31] pci: Add an API to get IOMMU's min page size and virtual address width

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF This kind of information is needed by devices implementing ATS in order to initialize their translation cache. Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-8-clement.mathieu--d...@eviden.com> Reviewed-by: Michael S. Tsirkin Signed-off-by:

[PULL 27/31] vdpa: add listener_registered

2025-06-01 Thread Michael S. Tsirkin
From: Eugenio Pérez Check if the listener has been registered or not, so it needs to be registered again at start. Tested-by: Lei Yang Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eugenio Pérez Signed-off-by: Jonah Palmer Message-Id: <20250522145839.59974-5-jonah.pal...@oracl

[PULL 23/31] vhost: Don't set vring call if guest notifier is unused

2025-06-01 Thread Michael S. Tsirkin
From: Huaitong Han The vring call fd is set even when the guest does not use MSI-X (e.g., in the case of virtio PMD), leading to unnecessary CPU overhead for processing interrupts. The commit 96a3d98d2c("vhost: don't set vring call if no vector") optimized the case where MSI-X is enabled but the

[PULL 22/31] tests/acpi: Remove stale allowed tables

2025-06-01 Thread Michael S. Tsirkin
From: Bibo Mao Remove stale allowed tables for LoongArch virt machine. Signed-off-by: Bibo Mao Message-Id: <20250520130806.767181-2-maob...@loongson.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 8 1 file chan

[PULL 25/31] vdpa: reorder vhost_vdpa_set_backend_cap

2025-06-01 Thread Michael S. Tsirkin
From: Eugenio Pérez It will be used directly by vhost_vdpa_init. Tested-by: Lei Yang Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Signed-off-by: Eugenio Pérez Signed-off-by: Jonah Palmer Message-Id: <20250522145839.59974-3-jonah.pal...@oracle.com> Reviewed-by: Michael S. Tsirkin Signed-off

[PULL 19/31] tests/qtest/bios-tables-test: Add basic testing for LoongArch

2025-06-01 Thread Michael S. Tsirkin
From: Bibo Mao Add basic ACPI table test case for LoongArch, including cpu topology, numa memory, memory hotplug and oem-id test cases. Signed-off-by: Bibo Mao Message-Id: <20250520130158.767083-6-maob...@loongson.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- test

[PULL 11/31] memory: Store user data pointer in the IOMMU notifiers

2025-06-01 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF This will help developers of ATS-capable devices to track a state. Signed-off-by: Clement Mathieu--Drif Message-Id: <20250520071823.764266-9-clement.mathieu--d...@eviden.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/system/memo

[PULL 16/31] tests/data/uefi-boot-images: Add ISO image for LoongArch system

2025-06-01 Thread Michael S. Tsirkin
From: Bibo Mao To test ACPI tables, edk2 needs to be booted with a disk image having EFI partition. This image is created using UefiTestToolsPkg. The image is generated with the following command: make -f tests/uefi-test-tools/Makefile Signed-off-by: Bibo Mao Acked-by: Gerd Hoffmann Message

[PULL 02/31] hw/i386/amd_iommu: Fix device setup failure when PT is on.

2025-06-01 Thread Michael S. Tsirkin
From: Sairaj Kodilkar Commit c1f46999ef506 ("amd_iommu: Add support for pass though mode") introduces the support for "pt" flag by enabling nodma memory when "pt=off". This allowed VFIO devices to successfully register notifiers by using nodma region. But, This also broke things when guest is bo

Re: [PATCH V4 09/43] vfio/container: register container for cpr

2025-06-01 Thread Cédric Le Goater
On 5/29/25 21:24, Steve Sistare wrote: Register a legacy container for cpr-transfer, replacing the generic CPR register call with a more specific legacy container register call. Add a blocker if the kernel does not support VFIO_UPDATE_VADDR or VFIO_UNMAP_ALL. This is mostly boiler plate. The f

[PATCH v13 09/10] docs/system: virtio-gpu: Update Venus link

2025-06-01 Thread Dmitry Osipenko
Change virtio-gpu Venus link, pointing it at the Mesa Venus documentation instead of the protocol. The Mesa doc provides more information and also has a link to the protocol. Suggested-by: Akihiko Odaki Reviewed-by: Akihiko Odaki Signed-off-by: Dmitry Osipenko --- docs/system/devices/virtio-gp

Re: [PATCH v2 1/4] backends/iommufd: Add a helper to invalidate user-managed HWPT

2025-06-01 Thread Cédric Le Goater
On 5/30/25 11:35, Zhenzhong Duan wrote: This helper passes cache invalidation request from guest to invalidate stage-1 page table cache in host hardware. Signed-off-by: Nicolin Chen Signed-off-by: Zhenzhong Duan Reviewed-by: Cédric Le Goater Thanks, C. --- include/system/iommufd.h

[PATCH v13 05/10] virtio-gpu: Support DRM native context

2025-06-01 Thread Dmitry Osipenko
Add support for DRM native contexts to VirtIO-GPU. DRM context is enabled using a new virtio-gpu-gl device option "drm_native_context=on". Unlike Virgl and Venus contexts that operate on application API level, DRM native contexts work on a kernel UAPI level. This lower level results in a lightweig

[PATCH v13 04/10] virtio-gpu: Support asynchronous fencing

2025-06-01 Thread Dmitry Osipenko
Support asynchronous fencing feature of virglrenderer. It allows Qemu to handle fence as soon as it's signalled instead of periodically polling the fence status. This feature is required for enabling DRM context support in Qemu because legacy fencing mode isn't supported for DRM contexts in virglre

[PATCH v13 07/10] ui/gtk: Don't disable scanout when display is refreshed

2025-06-01 Thread Dmitry Osipenko
Display refreshment is invoked by a timer and it erroneously disables the active scanout if it happens to be invoked after scanout has been enabled. This offending scanout-disable race condition with a timer can be easily hit when Qemu runs with a disabled vsync by using SDL or GTK displays (with v

[PATCH v13 08/10] docs/system: virtio-gpu: Add link to Mesa VirGL doc

2025-06-01 Thread Dmitry Osipenko
Extend virtio-gpu documentation with a link to the Mesa VirGL documentation. Suggested-by: Akihiko Odaki Reviewed-by: Akihiko Odaki Signed-off-by: Dmitry Osipenko --- docs/system/devices/virtio-gpu.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/system/devices/vi

[PATCH v13 06/10] ui/sdl2: Don't disable scanout when display is refreshed

2025-06-01 Thread Dmitry Osipenko
Display refreshment is invoked by a timer and it erroneously disables the active scanout if it happens to be invoked after scanout has been enabled. This offending scanout-disable race condition with a timer can be easily hit when Qemu runs with a disabled vsync by using SDL or GTK displays (with v

[PATCH v13 10/10] docs/system: virtio-gpu: Document host/guest requirements

2025-06-01 Thread Dmitry Osipenko
From: Alex Bennée This attempts to tidy up the VirtIO GPU documentation to make the list of requirements clearer. There are still a lot of moving parts and the distros have some catching up to do before this is all handled automatically. Signed-off-by: Alex Bennée Cc: Sergio Lopez Pascual Revi

[PATCH v13 01/10] ui/sdl2: Restore original context after new context creation

2025-06-01 Thread Dmitry Osipenko
SDL API changes GL context to a newly created GL context, which differs from other GL providers that don't switch context. Change SDL backend to restore the original GL context. This allows Qemu's virtio-gpu to support new virglrenderer async-fencing feature for Virgl contexts, otherwise virglrende

[PATCH v13 00/10] Support virtio-gpu DRM native context

2025-06-01 Thread Dmitry Osipenko
This patchset adds DRM native context support to VirtIO-GPU on Qemu. Contarary to Virgl and Venus contexts that mediates high level GFX APIs, DRM native context [1] mediates lower level kernel driver UAPI, which reflects in a less CPU overhead and less/simpler code needed to support it. DRM contex

[PATCH v13 03/10] virtio-gpu: Handle virgl fence creation errors

2025-06-01 Thread Dmitry Osipenko
Print out error messages when virgl fence creation fails to aid debugging of the fence-related bugs. Reviewed-by: Akihiko Odaki Acked-by: Michael S. Tsirkin Tested-by: Alex Bennée Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 27 ++- 1 file changed

[PATCH v13 02/10] ui/sdl2: Implement dpy dmabuf functions

2025-06-01 Thread Dmitry Osipenko
From: Pierre-Eric Pelloux-Prayer If EGL is used, we can rely on dmabuf to import textures without doing copies. To get this working on X11, we use the existing SDL hint: SDL_HINT_VIDEO_X11_FORCE_EGL (because dmabuf can't be used with GLX). Reviewed-by: Akihiko Odaki Acked-by: Michael S. Tsirki

  1   2   >