[PATCH V1 2/2] vfio/pci: preserve pending interrupts

2025-07-14 Thread Steve Sistare
cpr-transfer may lose a VFIO interrupt because the KVM instance is destroyed and recreated. If an interrupt arrives in the middle, it is dropped. To fix, disable pended interrupts during cpr save, and pick up the pieces. In more detail: Stop the VCPUs. Call kvm_irqchip_remove_irqfd_notifier_gsi

[PATCH V1 0/2] preserve pending interrupts during cpr on arm

2025-07-14 Thread Steve Sistare
Close a race condition that causes cpr-transfer to lose VFIO interrupts on ARM. See commit messages for details. Steve Sistare (2): hw/intc/arm_gicv3_kvm: subroutine for save pending hw/intc/arm_gicv3_kvm: preserve pending interrupts during cpr hw/intc/arm_gicv3_kvm.c| 40 ++

[PATCH V1 0/2] preserve pending interrupts during cpr

2025-07-14 Thread Steve Sistare
Close a race condition that causes cpr-transfer to lose VFIO interrupts. See commit messages for details. Steve Sistare (2): vfio/pci: augment set_handler vfio/pci: preserve pending interrupts hw/vfio/cpr.c | 92 +- hw/vfio/pci.c

Re: [PATCH v5 2/3] net/af-xdp: Fix up cleanup path upon failure in queue creation

2025-07-14 Thread Ilya Maximets
On 7/11/25 11:44 AM, Daniel Borkmann wrote: > While testing, it turned out that upon error in the queue creation loop, > we never trigger the af_xdp_cleanup() handler. This is because we pass > errp instead of a local err pointer into the various AF_XDP setup functions > instead of a scheme like: >

[PATCH V1 1/2] vfio/pci: augment set_handler

2025-07-14 Thread Steve Sistare
Extend vfio_pci_msi_set_handler() so it can set or clear the handler. Add a similar accessor for INTx. No functional change. Signed-off-by: Steve Sistare --- hw/vfio/cpr.c | 2 +- hw/vfio/pci.c | 13 +++-- hw/vfio/pci.h | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) diff

Re: [RFC PATCH v3 00/15] hw/arm/virt: Add support for user-creatable accelerated SMMUv3

2025-07-14 Thread Nicolin Chen via
Hi Shameer, Thank you for sending the v3. On Mon, Jul 14, 2025 at 04:59:26PM +0100, Shameer Kolothum wrote: > Branch for testing: [...] > Tested on a HiSilicon platform with multiple SMMUv3s. > > ./qemu-system-aarch64 \ >   -machine virt,accel=kvm,gic-version=3 \ >   -object iommufd,id=iommufd0

Re: [PATCH v6 3/4] hw/acpi/aml-build: Build a root node in the PPTT table

2025-07-14 Thread Jonathan Cameron via
On Mon, 14 Jul 2025 11:57:19 -0400 "Michael S. Tsirkin" wrote: > On Mon, Jul 14, 2025 at 03:10:41PM +0100, Alireza Sanaee wrote: > > On Mon, 14 Jul 2025 09:09:10 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Jun 04, 2025 at 12:52:32PM +0100, Alireza Sanaee wrote: > > > > From: Yic

[RFC PATCH v3 14/15] Read and validate host SMMUv3 feature bits

2025-07-14 Thread Shameer Kolothum via
From: Nicolin Chen Not all fields in the SMMU IDR registers are meaningful for userspace. Only the following fields can be used:   - IDR0: ST_LEVEL, TERM_MODEL, STALL_MODEL, TTENDIAN, CD2L, ASID16, TTF     - IDR1: SIDSIZE, SSIDSIZE     - IDR3: BBML, RIL     - IDR5: VAX, GRAN64K, GRAN16K, GRAN4K

[RFC PATCH v3 11/15] hw/pci/pci: Introduce optional get_msi_address_space() callback.

2025-07-14 Thread Shameer Kolothum via
On ARM, when a device is behind an IOMMU, its MSI doorbell address is subject to translation by the IOMMU. This behavior affects vfio-pci passthrough devices assigned to guests using an accelerated SMMUv3. In this setup, we configure the host SMMUv3 in nested mode, where VFIO sets up the Stage-2 (

Re: [PATCH] host-utils: Drop workaround for buggy Apple Clang __builtin_subcll()

2025-07-14 Thread Richard Henderson
On 7/14/25 08:50, Peter Maydell wrote: In commit b0438861efe ("host-utils: Avoid using __builtin_subcll on buggy versions of Apple Clang") we added a workaround for a bug in Apple Clang 14 where its __builtin_subcll() implementation was wrong. This bug was only present in Apple Clang 14, not in u

Re: [PATCH] iotests: add test for changing the 'drive' property via 'qom-set'

2025-07-14 Thread Kevin Wolf
Am 05.06.2025 um 12:09 hat Fiona Ebner geschrieben: > Signed-off-by: Fiona Ebner Thanks, applied to the block branch. Kevin

Re: [RFC PATCH v3 01/15] backends/iommufd: Introduce iommufd_backend_alloc_viommu

2025-07-14 Thread Nicolin Chen
On Mon, Jul 14, 2025 at 04:59:27PM +0100, Shameer Kolothum wrote: > +bool iommufd_backend_alloc_viommu(IOMMUFDBackend *be, uint32_t dev_id, > + uint32_t viommu_type, uint32_t hwpt_id, > + uint32_t *out_viommu_id, Error **errp) > +{ >

Re: [PATCH v6 3/4] hw/acpi/aml-build: Build a root node in the PPTT table

2025-07-14 Thread Michael S. Tsirkin
On Mon, Jul 14, 2025 at 05:06:05PM +0100, Alireza Sanaee wrote: > On Mon, 14 Jul 2025 11:57:19 -0400 > "Michael S. Tsirkin" wrote: > > > On Mon, Jul 14, 2025 at 03:10:41PM +0100, Alireza Sanaee wrote: > > > On Mon, 14 Jul 2025 09:09:10 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > > > On

Re: [PATCH v6 3/4] hw/acpi/aml-build: Build a root node in the PPTT table

2025-07-14 Thread Michael S. Tsirkin
On Mon, Jul 14, 2025 at 05:09:45PM +0100, Jonathan Cameron wrote: > On Mon, 14 Jul 2025 11:57:19 -0400 > "Michael S. Tsirkin" wrote: > > > On Mon, Jul 14, 2025 at 03:10:41PM +0100, Alireza Sanaee wrote: > > > On Mon, 14 Jul 2025 09:09:10 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > > > O

[PULL 08/32] docs/qapi-domain: add return-nodesc

2025-07-14 Thread Markus Armbruster
From: John Snow This form is used to annotate a return type without an accompanying description, for when there is no "Returns:" information in the source doc, but we have a return type we want to generate a cross-reference to. The syntax is: :return-nodesc: TypeName It's primarily necessary b

[PULL 19/32] qapi: add cross-references to migration.json

2025-07-14 Thread Markus Armbruster
From: John Snow Note that a reference to MIGRATION needs to be disambiguated with a :qapi:event: prefix. Without this, Sphinx complains more than one target found for 'any' cross-reference 'MIGRATION': could be :std:ref:`Migration framework` or :qapi:event:`QMP:migration.MIGRATION` Signed

[PULL 25/32] qapi: add cross-references to sockets.json

2025-07-14 Thread Markus Armbruster
From: John Snow Signed-off-by: John Snow Reviewed-by: Eric Blake Message-ID: <20250711054005.60969-15-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/sockets.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi/sockets

[PULL 29/32] qapi: add cross-references to misc modules

2025-07-14 Thread Markus Armbruster
From: John Snow These modules don't have specific maintainers, so they're lumped in together here as miscellaneous. Signed-off-by: John Snow Message-ID: <20250711054005.60969-19-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/control.json| 2 +-

[PULL 28/32] qapi: add cross-references to yank.json

2025-07-14 Thread Markus Armbruster
From: John Snow Signed-off-by: John Snow Acked-by: Lukas Straub Message-ID: <20250711054005.60969-18-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/yank.json | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qapi/

[PULL 32/32] tests/qtest/qom-test: unit test for qom-list-get

2025-07-14 Thread Markus Armbruster
From: Steve Sistare Add a unit test for qom-list-get. Signed-off-by: Steve Sistare Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Message-ID: <1752248703-217318-4-git-send-email-steven.sist...@oracle.com> Signed-off-by: Markus Armbruster --- tests/qtest/qom-test.c | 116

[PULL 26/32] qapi: add cross-references to ui.json

2025-07-14 Thread Markus Armbruster
From: John Snow Signed-off-by: John Snow Message-ID: <20250711054005.60969-16-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/ui.json | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/qapi/ui.jso

[PULL 00/32] QAPI patches patches for 2025-07-14

2025-07-14 Thread Markus Armbruster
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2025-07-14 for yo

[PULL 18/32] qapi: add cross-references to Machine core

2025-07-14 Thread Markus Armbruster
From: John Snow Signed-off-by: John Snow Message-ID: <20250711054005.60969-8-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/machine-common.json | 20 +- qapi/machine.json| 80 2 files changed,

[PULL 01/32] docs/sphinx: adjust qapidoc to cope with same-line error sections

2025-07-14 Thread Markus Armbruster
From: John Snow Without this, the line the new QAPI doc generator chokes on # Errors: some in doc-good.json. We still use the old doc generator for the tests, but we're about to correct that. Signed-off-by: John Snow Message-ID: <20250618165353.1980365-2-js...@redhat.com> Acked-by: Marku

Re: [PATCH] target/riscv: do not call GETPC() in check_ret_from_m_mode()

2025-07-14 Thread Richard Henderson
On 7/14/25 07:40, Richard Henderson wrote: On 7/14/25 07:37, Daniel Henrique Barboza wrote: GETPC() should always be called from the top level helper, e.g. the first helper that is called by the translation code. We stopped doing that in commit 3157a553ec, and then we introduced problems when un

[PULL 27/32] qapi: add cross-references to virtio.json

2025-07-14 Thread Markus Armbruster
From: John Snow Signed-off-by: John Snow Message-ID: <20250711054005.60969-17-js...@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/virtio.json | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qapi/virtio.json b/qapi/virtio.json

[PULL 05/32] qapi: lift restriction on using '=' in doc blocks

2025-07-14 Thread Markus Armbruster
From: John Snow We reject lines starting with '=' in definition documentation. This made sense when such lines were headings in free-form documentation, but not in definition documentation. Before the previous commit, lines starting with '=' were headings in free-form documentation, and rejecte

[PULL 02/32] docs/sphinx: parse @references in freeform text

2025-07-14 Thread Markus Armbruster
From: John Snow Oversight in the new qapidoc transmogrifier: @references in freeform documentation blocks were not being transformed to literals. This fixes that, and the next patch ensures that we're testing for this O:-) Signed-off-by: John Snow Message-ID: <20250618165353.1980365-3-js...@red

[PATCH v2 1/2] hw/cxl: Refactored Identify Switch Device & Get Physical Port State

2025-07-14 Thread Arpit Kumar
-Storing physical ports info during enumeration. -Refactored changes using physical ports info for Identify Switch Device (Opcode 5100h) & Get Physical Port State (Opcode 5101h) physical switch FM-API command set. Signed-off-by: Arpit Kumar --- hw/cxl/cxl-mailbox-utils.c| 229 +

Re: [PATCH v2 3/3] Assign the GDB register XML files of Sparc64 to Sparc32plus.

2025-07-14 Thread Richard Henderson
On 7/11/25 09:51, unis...@quyllur.org wrote: From: Rot127 Commit 3/3 Signed-off-by: Rot127 --- configs/targets/sparc32plus-linux-user.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/targets/sparc32plus-linux-user.mak b/configs/targets/sparc32plus-linux-user.mak index 7a169

[PATCH v2 0/2] FM-API Physical switch command set support

2025-07-14 Thread Arpit Kumar
This patch series refactor existing support for Identify Switch Device and Get Physical Port State by utilizing physical ports (USP & DSP) information stored during enumeration. Additionally, it introduces new support for Physical Port Control of FM-API based physical switch command set as per CXL

Re: [PATCH v6 3/4] hw/acpi/aml-build: Build a root node in the PPTT table

2025-07-14 Thread Michael S. Tsirkin
On Wed, Jun 04, 2025 at 12:52:32PM +0100, Alireza Sanaee wrote: > From: Yicong Yang > > Currently we build the PPTT starting from the socket node and each > socket will be a separate tree. For a multi-socket system it'll > be hard for the OS to know the whole system is homogeneous or not > (actua

[PULL 03/32] docs/sphinx: remove legacy QAPI manual generator

2025-07-14 Thread Markus Armbruster
From: John Snow Thanks for your service! Remove the old qapidoc and the option to enable the transmogrifier, leaving the "transmogrifier" as the ONLY qapi doc generator. This in effect also converts the QAPI test to use the new documentation generator, too. Update doc-good.txt output to match t

[PULL 04/32] docs/sphinx: remove special parsing for freeform sections

2025-07-14 Thread Markus Armbruster
From: John Snow Remove the QAPI doc section heading syntax, use plain rST section headings instead. Tests and documentation are updated to match. Interestingly, Plain rST headings work fine before this patch, except for over- and underlining with '=', which the doc parser rejected as invalid QA

[PATCH] target/arm: Provide always-false kvm_arm_*_supported() stubs for usermode

2025-07-14 Thread Peter Maydell
If you try to build aarch64-linux-user with clang and --enable-debug then it fails to compile: ld: libqemu-aarch64-linux-user.a.p/target_arm_cpu64.c.o: in function `cpu_arm_set_sve': ../../target/arm/cpu64.c:321:(.text+0x1254): undefined reference to `kvm_arm_sve_supported' This is a regressi

Re: [PATCH] target/arm: Provide always-false kvm_arm_*_supported() stubs for usermode

2025-07-14 Thread Richard Henderson
On 7/14/25 09:41, Pierrick Bouvier wrote: Indeed, clang does not fold the condition "value && kvm_enabled() && ! kvm_arm_sve_supported()". Looks like a missing case. This code compiles with gcc -O0, but not clang -O0. extern int f(void); int main(int argc) {     if (argc && 0)     f(); }

Re: [PATCH REPOST v4 4/4] acpi/virt: suppress UART device & SPCR when guest has no serial hardware

2025-07-14 Thread Michael S. Tsirkin
On Wed, May 28, 2025 at 06:53:38PM +0800, Li Chen wrote: > From: Li Chen > > The virt machines always instantiate a PL011/16550 at UART0 and > describe it in ACPI (DSDT device node plus optional SPCR table). When > the command line contains “-serial none” there is no backend attached to > that U

Re: [PATCH v2 0/3] DTB build housekeeping

2025-07-14 Thread Bernhard Beschow
Am 8. Juli 2025 20:48:03 UTC schrieb Bernhard Beschow : >This series removes the bundled device tree blobs from the repository which are >redundant to the bundled device tree sources. To make this work, the device >tree >compiler 'dtc' is now required whenever libfdt is used. Furthermore, dtc c

Re: [RFC PATCH v3 07/15] hw/arm/smmuv3: Implement get_viommu_cap() callback

2025-07-14 Thread Nicolin Chen
On Mon, Jul 14, 2025 at 04:59:33PM +0100, Shameer Kolothum wrote: > For accelerated SMMUv3, we need nested parent domain creation. Add the > callback support so that VFIO can create a nested parent. > > Since 'accel=on' for SMMUv3 requires the guest SMMUv3 to be configured > in Stage 1 mode, ensur

[PULL 69/97] hw/arm/virt-acpi-build: Modify the DSDT ACPI table to enable ACPI PCI hotplug

2025-07-14 Thread Michael S. Tsirkin
From: Eric Auger Modify the DSDT ACPI table to enable ACPI PCI hotplug. Signed-off-by: Eric Auger Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov Message-Id: <20250714080639.2525563-24-eric.au...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- inc

[PULL 21/97] amd_iommu: Fix mask to retrieve Interrupt Table Root Pointer from DTE

2025-07-14 Thread Michael S. Tsirkin
From: Alejandro Jimenez Fix an off-by-one error in the definition of AMDVI_IR_PHYS_ADDR_MASK. The current definition masks off the most significant bit of the Interrupt Table Root ptr i.e. it only generates a mask with bits [50:6] set. See the AMD I/O Virtualization Technology (IOMMU) Specificati

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

2025-07-14 Thread Michael S. Tsirkin
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstre

[PULL 60/97] hw/i386/acpi-build: Move build_append_pci_bus_devices/pcihp_slots to pcihp

2025-07-14 Thread Michael S. Tsirkin
From: Eric Auger We intend to reuse build_append_pci_bus_devices and build_append_pcihp_slots on ARM. So let's move them to hw/acpi/pcihp.c as well as all static helpers they use. No functional change intended. Signed-off-by: Eric Auger Reviewed-by: Gustavo Romero Reviewed-by: Igor Mammedov

[PULL 78/97] hw/arm/virt: Let virt support pci hotplug/unplug GED event

2025-07-14 Thread Michael S. Tsirkin
From: Eric Auger Set up the IO registers used to communicate between QEMU and ACPI. Signed-off-by: Eric Auger Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov Message-Id: <20250714080639.2525563-33-eric.au...@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirk

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

2025-07-14 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: <20250612090321.3416594-3-maob...@loongson.cn> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tes

Re: [PATCH v8 0/4] target/arm: Add FEAT_MEC to max cpu

2025-07-14 Thread Gustavo Romero
Hi folks, Richard, thanks for v8. Pierrick, thanks for testing it. :) On 7/14/25 14:09, Pierrick Bouvier wrote: On 7/14/25 8:58 AM, Richard Henderson wrote: Changes for v8:    - Re-order SCTLR2 and TCR2 so that they are independent of MEC.    - Enable the SCTLR2 and TCR2 enable bits.    - Squa

[PULL 83/97] tests: virt: Allow changes to PPTT test table

2025-07-14 Thread Michael S. Tsirkin
From: Yicong Yang Allow changes to PPTT test table, preparing for adding identical implementation flags support and for adding a root node for all the system. This is related to both loongarch64 and aarch64. Signed-off-by: Yicong Yang Reviewed-by: Jonathan Cameron Reviewed-by: Zhao Liu Signe

[PULL 93/97] hw/cxl: mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-07-14 Thread Michael S. Tsirkin
From: Anisa Su FM DCD Management command 0x5602 implemented per CXL r3.2 Spec Section 7.6.7.6.3 Reviewed-by: Fan Ni Signed-off-by: Anisa Su Signed-off-by: Jonathan Cameron Message-Id: <20250714174509.1984430-8-jonathan.came...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michae

[PULL 58/97] hw/acpi/pcihp: Add an AmlRegionSpace arg to build_acpi_pci_hotplug

2025-07-14 Thread Michael S. Tsirkin
From: Eric Auger On ARM we will put the operation regions in AML_SYSTEM_MEMORY. So let's allow this configuration. Signed-off-by: Eric Auger Reviewed-by: Gustavo Romero Reviewed-by: Igor Mammedov Reviewed-by: Jonathan Cameron Message-Id: <20250714080639.2525563-13-eric.au...@redhat.com> Revi

[PULL 38/97] intel_iommu: Add support for ATS

2025-07-14 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF Signed-off-by: Clement Mathieu--Drif Message-Id: <20250628180226.133285-11-clement.mathieu--d...@eviden.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/intel_iommu.c | 63 +++ 1 file changed

[PULL 49/97] hw/pci-host/gpex-acpi: Add native_pci_hotplug arg to acpi_dsdt_add_pci_osc

2025-07-14 Thread Michael S. Tsirkin
From: Eric Auger Add a new argument to acpi_dsdt_add_pci_osc to be able to disable native pci hotplug. Signed-off-by: Eric Auger Reviewed-by: Gustavo Romero Reviewed-by: Igor Mammedov Reviewed-by: Jonathan Cameron Message-Id: <20250714080639.2525563-4-eric.au...@redhat.com> Reviewed-by: Mich

[PULL 30/97] memory: Add permissions in IOMMUAccessFlags

2025-07-14 Thread Michael S. Tsirkin
From: CLEMENT MATHIEU--DRIF This will be necessary for devices implementing ATS. We also define a new macro IOMMU_ACCESS_FLAG_FULL in addition to IOMMU_ACCESS_FLAG to support more access flags. IOMMU_ACCESS_FLAG is kept for convenience and backward compatibility. Here are the flags added (define

[PULL 62/97] hw/i386/acpi-build: Move aml_pci_edsm to a generic place

2025-07-14 Thread Michael S. Tsirkin
From: Eric Auger Move aml_pci_edsm to pci-bridge.c since we want to reuse that for ARM and acpi-index support. Also rename it into build_pci_bridge_edsm. Signed-off-by: Eric Auger Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov Message-Id: <20250714080639.2525563-17-eric.au...@redhat

[POC PATCH 1/5] update-linux-headers: Add guestmem.h

2025-07-14 Thread Xiaoyao Li
Signed-off-by: Xiaoyao Li --- scripts/update-linux-headers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index b43b8ef75a63..3f6169a121a8 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-li

[POC PATCH 4/5] memory/guest_memfd: Enable hugetlb support

2025-07-14 Thread Xiaoyao Li
(This is just the POC code to use gmem with hugetlb.) Try with hugetlb first when hugetlb is supported by gmem. If hugetlb cannot afford the requested memory size and returns -ENOMEM, fallback to create gmem withtout hugetlb. The hugetlb size is hardcoded as GUESTMEM_HUGETLB_FLAG_2MB. I'm not sur

[POC PATCH 3/5] memory/guest_memfd: Enable in-place conversion when available

2025-07-14 Thread Xiaoyao Li
From: Yan Zhao (This is just the POC code to use in-place conversion gmem.) Try to use in-place conversion gmem when it is supported. When in-place conversion is enabled, there is no need to discard memory since it still needs to be used as the memory of opposite attribute after conversion. Fo

[POC PATCH 2/5] headers: Fetch gmem updates

2025-07-14 Thread Xiaoyao Li
Signed-off-by: Xiaoyao Li --- linux-headers/linux/guestmem.h | 29 + linux-headers/linux/kvm.h | 18 ++ 2 files changed, 47 insertions(+) create mode 100644 linux-headers/linux/guestmem.h diff --git a/linux-headers/linux/guestmem.h b/linux-header

[POC PATCH 0/5] QEMU: Enable in-place conversion and hugetlb gmem

2025-07-14 Thread Xiaoyao Li
Hi all, This is the POC to enable in-place conversion and hugetlb support of gmem (guest memfd) in QEMU. It can work with 1G gmem support series[1] and TDX hugepage support series[2] to run TDX guest with hugepage. I don't have SNP environment and don't know how it goes with SNP. It is just the P

[POC PATCH 5/5] [HACK] memory: Don't enable in-place conversion for internal MemoryRegion with gmem

2025-07-14 Thread Xiaoyao Li
Currently, the TDVF cannot work with gmem in-place conversion because current implementation of KVM_TDX_INIT_MEM_REGION in KVM requires gmem of TDVF to be valid for both shared and private at the same time. To workaround it, explicitly not enable in-place conversion for internal MemoryRegion with

[PULL 16/17] esp.c: add asc_mode property to indicate the current ESP mode

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Add a new asc_mode property to ESPState which indicates the current mode of the ESP and update the ESP state machine accordingly. Bump the vmstate version and include migration logic to ensure that asc_mode is set to initiator mode such that any commands in progress will a

[PULL 05/17] target/mips: Have gen_[d]lsa() callers add 1 to shift amount argument

2025-07-14 Thread Philippe Mathieu-Daudé
Having the callee add 1 to shift amount is misleading (see the NM_LSA case in decode_nanomips_32_48_opc() where we have to manually substract 1). Rather have the callers pass a modified $sa. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Mes

[PULL 03/17] target/mips: Extract generic gen_lx() helper

2025-07-14 Thread Philippe Mathieu-Daudé
Extract gen_lx() from gen_mips_lx(); inline the Octeon check in decode_opc_special3_legacy(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <2024222936.59869-3-phi...@linaro.org> --- target/mips/tcg/translate.h | 1 + target/mips/tcg/translate.c | 55

[PULL 04/17] target/mips: Convert Octeon LX instructions to decodetree

2025-07-14 Thread Philippe Mathieu-Daudé
Use Octeon decodetree to call gen_lx() for the LX instructions. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pavel Dovgalyuk Reviewed-by: Richard Henderson Message-Id: <2024222936.59869-4-phi...@linaro.org> --- target/mips/tcg/octeon.decode | 8 target/mips/tcg/octeon_

[PATCH] docs: Fix Aspeed title

2025-07-14 Thread Cédric Le Goater
commit ad8e0e8a0088 removed the "==" underlining the file title which broke documentation rendering. Add it back. Fixes: ad8e0e8a0088 ("docs: add support for gb200-bmc") Cc: Ed Tanous Reported-by: Peter Maydell Signed-off-by: Cédric Le Goater --- docs/system/arm/aspeed.rst | 1 + 1 file ch

[PULL 08/17] hw/mips: Restrict ITU to TCG

2025-07-14 Thread Philippe Mathieu-Daudé
MIPS Inter-Thread Communication Unit is implemented using TCG. Check for TCG both in Kconfig and CPS source. Fixes: 2321d971b6f ("hw/mips: Add dependency MIPS_CPS -> MIPS_ITU") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250702164953.18579-1-phi...@linaro.

[PULL 00/17] MIPS & Co. patches for 2025-07-15

2025-07-14 Thread Philippe Mathieu-Daudé
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://github.com/philmd/qemu.git tags/mips-20250715 for you to fe

Re: [PULL 28/97] rust: bindings: allow any number of params

2025-07-14 Thread Michael S. Tsirkin
On Tue, Jul 15, 2025 at 02:30:40AM +0300, Manos Pitsidianakis wrote: > On Tue, Jul 15, 2025 at 2:07 AM Michael S. Tsirkin wrote: > > > > We are going to be adding more parameters, and this makes > > rust unhappy: > > Functions with lots of parameters are considered bad style and reduce > >

[PULL 12/17] esp.c: improve comment in esp_transfer_data()

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Whilst working on the previous patch, the existing comment was not enough to document when the TI command codepath was being used. Update and improve the comment accordingly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-

[PATCH v2] rust: bindings: allow any number of params

2025-07-14 Thread Michael S. Tsirkin
We are going to be adding more parameters, and this makes rust unhappy: Functions with lots of parameters are considered bad style and reduce readability (“what does the 5th parameter mean?”). Consider grouping some parameters into a new type. Specifically: error: this function has to

Re: [PULL 00/32] QAPI patches patches for 2025-07-14

2025-07-14 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Mon, Jul 14, 2025 at 11:14 AM Markus Armbruster wrote: >> >> The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: >> >> Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into >> staging (2025-07-13 01:46:04 -0400) >> >> are a

[PULL v2 00/13] Ui patches

2025-07-14 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://gitlab.com/marcandre.lureau/qemu.g

RE: [PATCH V1] vfio: fix sub-page bar after cpr

2025-07-14 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V1] vfio: fix sub-page bar after cpr > >Regions for sub-page BARs are normally mapped here, in response to the >guest writing to PCI config space: > > vfio_pci_write_config() >pci_default_write_config() > pci_update_map

[PULL v2 02/13] ui/vnc: Introduce the VncWorker type

2025-07-14 Thread marcandre . lureau
From: Akihiko Odaki The worker thread copies data in VncState to avoid race, but some data are too big to copy. Such data are held with pointers to avoid the overhead to copy, but it requires tedious memory management and makes them vulnerable to race. Introduce the VncWorker type to contain all

[PULL v2 01/13] ui/vnc: Do not copy z_stream

2025-07-14 Thread marcandre . lureau
From: Akihiko Odaki vnc_worker_thread_loop() copies z_stream stored in its local VncState to the persistent VncState, and the copied one is freed with deflateEnd() later. However, deflateEnd() refuses to operate with a copied z_stream and returns Z_STREAM_ERROR, leaking the allocated memory. Avo

[PULL v2 03/13] ui/egl-helpers: Error check the fds in egl_dmabuf_export_texture()

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy While trying to export and obtain fds associated with a texture, it is possible that the fds returned after eglExportDMABUFImageMESA() call have error values. Therefore, we need to evaluate the value of all fds and return false if any of them are negative. Cc: Gerd Hoffmann

[PULL 17/17] esp.c: only allow ESP commands permitted in the current asc_mode

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland If an ESP command is issued in an incorrect mode then an illegal command interrupt should be generated. Add a new esp_cmd_is_valid() function to indicate whether the ESP command is valid for the current mode, and if not then raise the illegal command interrupt. This fixes

[PULL 14/17] esp.c: only call dma_memory_read function if transfer length is non-zero

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible for the calculated transfer length to be zero. Only call the dma_memory_read function where the transfer length is non-zero to avoid invoking the DMA engine for a zero length tra

[PULL 11/17] esp.c: only raise IRQ in esp_transfer_data() for CMD_SEL, CMD_SELATN and CMD_TI commands

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Clarify the logic in esp_transfer_data() to ensure that the deferred interrupt code can only be triggered for CMD_SEL, CMD_SELATN and CMD_TI commands. This should already be the case, but make it explicit to ensure the logic isn't triggered unexpectedly. Signed-off-by:

[PULL 09/17] hw/intc/loongarch_extioi: Remove unnecessary 'qemu/typedefs.h' include

2025-07-14 Thread Philippe Mathieu-Daudé
"qemu/typedefs.h" is already included by "qemu/osdep.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Song Gao Message-Id: <20250708085859.7885-2-phi...@linaro.org> --- hw/intc/loongarch_extioi_kvm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/intc/loongarch_extioi_kvm.c b/hw/in

[PULL 15/17] esp.c: only call dma_memory_write function if transfer length is non-zero

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland In the cases where mixed DMA/non-DMA transfers are used or no data is available, it is possible for the calculated transfer length to be zero. Only call the dma_memory_write function where the transfer length is non-zero to avoid invoking the DMA engine for a zero length tr

[PULL 02/17] target/mips: Extract gen_base_index_addr() helper

2025-07-14 Thread Philippe Mathieu-Daudé
Factor out gen_base_index_addr() which is used twice but we'll use it more. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <2024222936.59869-2-phi...@linaro.org> --- target/mips/tcg/translate.h | 1 + target/mips/tcg/translate.c | 27 +-

[PULL 07/17] roms: re-remove execute bit from hppa-firmware*

2025-07-14 Thread Philippe Mathieu-Daudé
From: Cole Robinson This was fixed in c9d77526bddba0803a1fa982fb59ec98057150f9 for 9.2.0 but regressed in db34be329162cf6b06192703065e6c1010dbe3c5 in 10.0.0 When the bit is present, rpmbuild complains about missing ELF build-id Signed-off-by: Cole Robinson Reviewed-by: Daniel P. Berrangé Acke

[PULL 06/17] tests/tcg/mips: Add tests for MIPS CRC32[c] instructions

2025-07-14 Thread Philippe Mathieu-Daudé
From: Aleksandar Rakic Signed-off-by: Yongbok Kim Signed-off-by: Aleksandar Markovic Signed-off-by: Aleksandar Rakic Reviewed-by: Aleksandar Rikalo Message-ID: <20250214173702.2308488-3-aleksandar.ra...@htecgroup.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/tcg/mips/include/wrappers

Re: [PATCH v2] rust: bindings: allow any number of params

2025-07-14 Thread Philippe Mathieu-Daudé
On 15/7/25 08:15, Michael S. Tsirkin wrote: We are going to be adding more parameters, and this makes rust unhappy: Functions with lots of parameters are considered bad style and reduce readability (“what does the 5th parameter mean?”). Consider grouping some parameters into a new

Re: [PATCH] vfio, migration: save device parent pci config

2025-07-14 Thread Cédric Le Goater
On 7/14/25 04:37, Huaitong Han wrote: Hi, mst, clg Any comments? Since this seems to be a GIC issue on the aarch64 virt platform, you should cc: the virt-arm people for more insights. Also, the vfio-user devices have been merged very recently, ~1w ago, and, AFAICT, migration is not supported

[PULL 13/17] esp.h: remove separate ESPState typedef

2025-07-14 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland This is not needed as it is now handled by the OBJECT_DECLARE_SIMPLE_TYPE() macro. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-ID: <20250711204636.542964-4-mark.cave-ayl...@ilande.co.uk> Signed-off-by: P

[PULL 10/17] hw/microblaze: Add missing FDT dependency

2025-07-14 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow These boards ship with a bundled DTB, and dtc will be required for generating these from device tree sources. Prepare for that by adding an FDT dependency. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20250708204806.1898-2-shen...@gmai

[PULL v2 06/13] ui/spice: Add an option to submit gl_draw requests at fixed rate

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy In the specific case where the display layer (virtio-gpu) is using dmabuf, and if remote clients are enabled (-spice gl=on,port=), it makes sense to limit the maximum (streaming) rate (refresh rate) to a fixed value using the GUI refresh timer. Otherwise, the updates or

Re: [PATCH] gtk: Skip drawing if console surface is NULL

2025-07-14 Thread Akihiko Odaki
On 2025/07/14 23:17, Weifeng Liu wrote: In gtk draw/render callbacks, add an early NULL check for the console surface and skip drawing if it's NULL. Otherwise, attempting to fetch its width and height crash. This change fixes Coverity CID 1610328. In practice, this case wouldn't happen at all be

[PULL v2 04/13] ui/spice: Enable gl=on option for non-local or remote clients

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy Newer versions of Spice server should be able to accept dmabuf fds from Qemu for clients that are connected via the network. In other words, when this option is enabled, Qemu would share a dmabuf fd with Spice which would encode and send the data associated with the fd to a

[PULL v2 08/13] ui/spice: Create a new texture with linear layout when gl=on is specified

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy Since most encoders/decoders (invoked by Spice) may not work properly with tiled memory associated with a texture, we need to create another texture that has linear memory layout and use that instead. Note that, there does not seem to be a direct way to indicate to the GL i

[PULL v2 09/13] ui/spice: Blit the scanout texture if its memory layout is not linear

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy In cases where the scanout buffer is provided as a texture (e.g. Virgl) we need to check to see if it has a linear memory layout or not. If it doesn't have a linear layout, then blitting it onto the texture associated with the display surface (which already has a linear layo

[PULL v2 05/13] ui/spice: Add an option for users to provide a preferred video codec

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy Giving users an option to choose a particular codec will enable them to make an appropriate decision based on their hardware and use-case. Note that, the Spice server would use this codec with Gstreamer encoder and only when gl=on is specified. If no codec is provided, then

[PULL v2 12/13] ui/gtk: Add scale option

2025-07-14 Thread marcandre . lureau
From: Weifeng Liu Allow user to set a preferred scale (defaulting to 1) of the virtual display. Along with zoom-to-fix=false, this would be helpful for users running QEMU on hi-dpi host desktop to achieve pixel to pixel display -- e.g., if the scale factor of a user's host desktop is set to 200%,

[PULL v2 11/13] ui/gtk: Add keep-aspect-ratio option

2025-07-14 Thread marcandre . lureau
From: Weifeng Liu When aspect ratio of host window and that of guest display are not aligned, we can either zoom the guest content to fill the whole host window or add padding to respect aspect ratio of the guest. Add an option keep-aspect-ratio to allow users to select their preferred behavior i

[PULL v2 10/13] hw/display: Allow injection of virtio-gpu EDID name

2025-07-14 Thread marcandre . lureau
From: Andrew Keesler Thanks to 72d277a7, 1ed2cb32, and others, EDID (Extended Display Identification Data) is propagated by QEMU such that a virtual display presents legitimate metadata (e.g., name, serial number, preferred resolutions, etc.) to its connected guest. This change adds the ability

[PULL v2 00/29] QAPI patches patches for 2025-07-14

2025-07-14 Thread Markus Armbruster
The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into staging (2025-07-13 01:46:04 -0400) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2025-07-14-v2 for

[PULL v2 07/13] ui/console-gl: Add a helper to create a texture with linear memory layout

2025-07-14 Thread marcandre . lureau
From: Vivek Kasireddy There are cases where we do not want the memory layout of a texture to be tiled as the component processing the texture would not know how to de-tile either via software or hardware. Therefore, ensuring that the memory backing the texture has a linear layout is absolutely ne

[PULL v2 13/13] tpm: "qemu -tpmdev help" should return success

2025-07-14 Thread marcandre . lureau
From: Marc-André Lureau Like other "-foo help" CLI, the qemu process should return 0 for "-tpmdev help". While touching this, switch to is_help_option() utility function as suggested by Peter Maydell. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Da

Re: [PULL v2 00/13] Ui patches

2025-07-14 Thread Marc-André Lureau
Hi On Tue, Jul 15, 2025 at 10:36 AM wrote: > > From: Marc-André Lureau > > The following changes since commit 9a4e273ddec3927920c5958d2226c6b38b543336: > > Merge tag 'pull-tcg-20250711' of https://gitlab.com/rth7680/qemu into > staging (2025-07-13 01:46:04 -0400) > > are available in the Git

  1   2   3   4   5   6   7   >