Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 78e630fcc497ee473821cb91b1dd87908d70fd82
      
https://github.com/qemu/qemu/commit/78e630fcc497ee473821cb91b1dd87908d70fd82
  Author: Philippe Mathieu-Daudé <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/helpers.c
    M hw/vfio/migration-multifd.c
    M hw/vfio/vfio-helpers.h

  Log Message:
  -----------
  hw/vfio/migration: Check base architecture at runtime

Inline vfio_arch_wants_loading_config_after_iter() and
replace the compile time check of the TARGET_ARM definition
by a runtime call to target_base_arm().

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Acked-by: Maciej S. Szmigiero <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 8e49988ce0ec520342411db4b513fb27b2d56c92
      
https://github.com/qemu/qemu/commit/8e49988ce0ec520342411db4b513fb27b2d56c92
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M docs/devel/vfio-iommufd.rst

  Log Message:
  -----------
  docs/devel: Remove stale comments related to iommufd dirty tracking

IOMMUFD dirty tracking support had be merged in merge commit dd4bc5f1cfe9,
the stale comments could be dropped.

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: ecd0ff2d2e7897f172d7f5678eb84446ec43f4ae
      
https://github.com/qemu/qemu/commit/ecd0ff2d2e7897f172d7f5678eb84446ec43f4ae
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  intel_iommu: Rename vtd_ce_get_rid2pasid_entry to vtd_ce_get_pasid_entry

In early days vtd_ce_get_rid2pasid_entry() was used to get pasid entry
of rid2pasid, then it was extended to get any pasid entry. So a new name
vtd_ce_get_pasid_entry is better to match what it actually does.

No functional change intended.

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Clément Mathieu--Drif <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: c629b030a22b9645073b5e8567e811904cd1ea6d
      
https://github.com/qemu/qemu/commit/c629b030a22b9645073b5e8567e811904cd1ea6d
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_internal.h

  Log Message:
  -----------
  intel_iommu: Delete RPS capability related supporting code

RID-PASID Support(RPS) is not set in vIOMMU ECAP register, the supporting
code is there but never takes effect.

Meanwhile, according to VTD spec section 3.4.3:
"Implementations not supporting RID_PASID capability (ECAP_REG.RPS is 0b),
use a PASID value of 0 to perform address translation for requests without
PASID."

We should delete the supporting code which fetches RID_PASID field from
scalable context entry and use 0 as RID_PASID directly, because RID_PASID
field is ignored if no RPS support according to spec.

This simplifies the code and doesn't bring any penalty.

Suggested-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 4fda086f76c05ffa432581de0042656ddff802fc
      
https://github.com/qemu/qemu/commit/4fda086f76c05ffa432581de0042656ddff802fc
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_internal.h
    M include/hw/i386/intel_iommu.h
    M tests/qtest/intel-iommu-test.c

  Log Message:
  -----------
  intel_iommu: Update terminology to match VTD spec

VTD spec revision 3.4 released in December 2021 renamed "First-level" to
"First-stage" and "Second-level" to "Second-stage".

Do the same in intel_iommu code to match spec, change all existing
"fl/sl/FL/SL/first level/second level/stage-1/stage-2" terminology to
"fs/ss/FS/SS/first stage/second stage".

Opportunistically fix a error print of "flts=on" with "x-flts=on".

No functional changes intended.

Suggested-by: Yi Liu <[email protected]>
Suggested-by: Eric Auger <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: d58230d8754fedf6fc7313e0faa25bb5edc5ba2e
      
https://github.com/qemu/qemu/commit/d58230d8754fedf6fc7313e0faa25bb5edc5ba2e
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/pci/pci.c
    M include/hw/pci/pci.h

  Log Message:
  -----------
  hw/pci: Export pci_device_get_iommu_bus_devfn() and return bool

Returns true if PCI device is aliased or false otherwise. This will be
used in following patch to determine if a PCI device is under a PCI
bridge.

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 844302bd5961d8e7a35b601495b9af8f3d26a4c8
      
https://github.com/qemu/qemu/commit/844302bd5961d8e7a35b601495b9af8f3d26a4c8
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M MAINTAINERS
    M hw/pci/pci.c
    A include/hw/core/iommu.h
    M include/hw/pci/pci.h

  Log Message:
  -----------
  hw/pci: Introduce pci_device_get_viommu_flags()

Introduce a new PCIIOMMUOps optional callback, get_viommu_flags() which
allows to retrieve flags exposed by a vIOMMU. The first planned vIOMMU
device flag is VIOMMU_FLAG_WANT_NESTING_PARENT that advertises the
support of HW nested stage translation scheme and wants other sub-system
like VFIO's cooperation to create nesting parent HWPT.

pci_device_get_viommu_flags() is a wrapper that can be called on a PCI
device potentially protected by a vIOMMU.

get_viommu_flags() is designed to return 64bit bitmap of purely vIOMMU
flags which are only determined by user's configuration, no host
capabilities involved. Reasons are:

1. host may has heterogeneous IOMMUs, each with different capabilities
2. this is migration friendly, return value is consistent between source
   and target.

Note that this op will be invoked at the attach_device() stage, at which
point host IOMMU capabilities are not yet forwarded to the vIOMMU through
the set_iommu_device() callback that will be after the attach_device().

See below sequence:

  vfio_device_attach():
      iommufd_cdev_attach():
          pci_device_get_viommu_flags() for HW nesting cap
          create a nesting parent HWPT
          attach device to the HWPT
          vfio_device_hiod_create_and_realize() creating hiod
  ...
  pci_device_set_iommu_device(hiod)

Suggested-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
[ clg: include/hw/core/iommu.h: Changed Copyright date 2025 -> 2026 ]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: ecacfc145fa26c18173175a0fadfea564f2b9852
      
https://github.com/qemu/qemu/commit/ecacfc145fa26c18173175a0fadfea564f2b9852
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  intel_iommu: Implement get_viommu_flags() callback

Implement get_viommu_flags() callback and expose a request for nesting
parent HWPT for now.

VFIO uses it to create nesting parent HWPT which is further used to create
nested HWPT in vIOMMU. All these will be implemented in following patches.

Suggested-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: a3379c14c2774cd0d7ed3eeb5866256e53861efe
      
https://github.com/qemu/qemu/commit/a3379c14c2774cd0d7ed3eeb5866256e53861efe
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_internal.h
    M include/hw/i386/intel_iommu.h

  Log Message:
  -----------
  intel_iommu: Introduce a new structure VTDHostIOMMUDevice

Introduce a new structure VTDHostIOMMUDevice which replaces
HostIOMMUDevice to be stored in hash table.

It includes a reference to HostIOMMUDevice and IntelIOMMUState,
also includes BDF information which will be used in future
patches.

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: c3459c6bfaad6a3d0bef4d3ebc6753bb3e66c1ef
      
https://github.com/qemu/qemu/commit/c3459c6bfaad6a3d0bef4d3ebc6753bb3e66c1ef
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/device.c
    M hw/vfio/iommufd.c
    M include/hw/vfio/vfio-device.h

  Log Message:
  -----------
  vfio/iommufd: Force creating nesting parent HWPT

Call pci_device_get_viommu_flags() to get if vIOMMU supports
VIOMMU_FLAG_WANT_NESTING_PARENT.

If yes, create a nesting parent HWPT and add it to the container's hwpt_list,
letting this parent HWPT cover the entire second stage mappings (GPA=>HPA).

This allows a VFIO passthrough device to directly attach to this default HWPT
and then to use the system address space and its listener.

Introduce a vfio_device_get_viommu_flags_want_nesting() helper to facilitate
this implementation.

It is safe to do so because a vIOMMU will be able to fail in set_iommu_device()
call, if something else related to the VFIO device or vIOMMU isn't compatible.

Suggested-by: Nicolin Chen <[email protected]>
Suggested-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Nicolin Chen <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: cca621c782d26901e9ca431eef135c2877135b47
      
https://github.com/qemu/qemu/commit/cca621c782d26901e9ca431eef135c2877135b47
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M MAINTAINERS
    M hw/i386/Kconfig
    M hw/i386/intel_iommu.c
    A hw/i386/intel_iommu_accel.c
    A hw/i386/intel_iommu_accel.h
    M hw/i386/meson.build

  Log Message:
  -----------
  intel_iommu_accel: Check for compatibility with IOMMUFD backed device when 
x-flts=on

When vIOMMU is configured x-flts=on in scalable mode, first stage page table
is passed to host to construct nested page table for passthrough devices.

We need to check compatibility of some critical IOMMU capabilities between
vIOMMU and host IOMMU to ensure guest first stage page table could be used by
host.

For instance, vIOMMU supports first stage 1GB large page mapping, but host does
not, then this IOMMUFD backed device should fail.

Even of the checks pass, for now we willingly reject the association because
all the bits are not there yet, it will be relaxed in the end of this series.

Note vIOMMU has exposed VIOMMU_FLAG_WANT_NESTING_PARENT flag to force
VFIO core to create nesting parent HWPT, if host doesn't support nested
translation, the creation will fail. So no need to check nested
capability here.

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
[ clg: - hw/i386/intel_iommu_accel.[hc]: Changed Copyright date 2025 -> 2026
       - in commit log :
         IOMMU_HWPT_ALLOC_NEST_PARENT -> VIOMMU_FLAG_WANT_NESTING_PARENT  ]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 42fa8991b5e3501f07f43b8f40cd8eab306164a8
      
https://github.com/qemu/qemu/commit/42fa8991b5e3501f07f43b8f40cd8eab306164a8
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_accel.c
    M hw/i386/intel_iommu_accel.h

  Log Message:
  -----------
  intel_iommu_accel: Fail passthrough device under PCI bridge if x-flts=on

Currently we don't support nested translation for passthrough device with
emulated device under same PCI bridge, because they require different address
space when x-flts=on.

In theory, we do support if devices under same PCI bridge are all passthrough
devices. But emulated device can be hotplugged under same bridge. To simplify,
just forbid passthrough device under PCI bridge no matter if there is, or will
be emulated devices under same bridge. This is acceptable because PCIE bridge
is more popular than PCI bridge now.

Suggested-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: f910f1f9b0a3dafbc10a84f2b322f7bfc8d4d6a3
      
https://github.com/qemu/qemu/commit/f910f1f9b0a3dafbc10a84f2b322f7bfc8d4d6a3
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_accel.c
    M hw/i386/intel_iommu_accel.h
    M hw/i386/intel_iommu_internal.h

  Log Message:
  -----------
  intel_iommu_accel: Stick to system MR for IOMMUFD backed host device when 
x-flts=on

When guest enables scalable mode and setup first stage page table, we don't
want to use IOMMU MR but rather continue using the system MR for IOMMUFD
backed host device.

Then default HWPT in VFIO contains GPA->HPA mappings which could be reused
as nesting parent HWPT to construct nested HWPT in vIOMMU.

Move vtd_as_key into intel_iommu_internal.h as it's also used by accel code.

Suggested-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: df644b6981ec8dbe8ee3fd75e02d0ab8452fad95
      
https://github.com/qemu/qemu/commit/df644b6981ec8dbe8ee3fd75e02d0ab8452fad95
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_internal.h

  Log Message:
  -----------
  intel_iommu: Add some macros and inline functions

Add some macros and inline functions that will be used by following patch.

This patch also make a cleanup to change below macros to use extract64()
just like what smmu does, because they are either used in following patches
or used indirectly by new introduced inline functions.

  VTD_INV_DESC_PIOTLB_IH
  VTD_SM_PASID_ENTRY_PGTT
  VTD_SM_PASID_ENTRY_DID
  VTD_SM_PASID_ENTRY_FSPM
  VTD_SM_PASID_ENTRY_FSPTPTR

But we doesn't aim to change the huge amount of bit mask style macro
definitions in this patch, that should be in a separate patch.

Suggested-by: Eric Auger <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 0686ac68e1ddab26914e51a4e7b58c79dcabe161
      
https://github.com/qemu/qemu/commit/0686ac68e1ddab26914e51a4e7b58c79dcabe161
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_accel.c
    M hw/i386/intel_iommu_accel.h
    M hw/i386/trace-events
    M include/hw/i386/intel_iommu.h

  Log Message:
  -----------
  intel_iommu_accel: Bind/unbind guest page table to host

This captures the guest PASID table entry modifications and propagates
the changes to host to attach a hwpt with type determined per guest IOMMU
PGTT configuration.

When PGTT=PT, attach PASID_0 to a second stage HWPT(GPA->HPA).
When PGTT=FST, attach PASID_0 to nested HWPT with nesting parent HWPT
coming from VFIO.

Co-Authored-by: Yi Liu <[email protected]>
Signed-off-by: Yi Liu <[email protected]>
Signed-off-by: Yi Sun <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: f9e7fbbc0e67e3e3e8eaea187f09720c338e25ea
      
https://github.com/qemu/qemu/commit/f9e7fbbc0e67e3e3e8eaea187f09720c338e25ea
  Author: Yi Liu <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_accel.c
    M hw/i386/intel_iommu_accel.h
    M hw/i386/intel_iommu_internal.h

  Log Message:
  -----------
  intel_iommu_accel: Propagate PASID-based iotlb invalidation to host

This traps the guest PASID-based iotlb invalidation request and propagate it
to host.

Intel VT-d 3.0 supports nested translation in PASID granularity. Guest SVA
support could be implemented by configuring nested translation on specific
pasid. This is also known as dual stage DMA translation.

Under such configuration, guest owns the GVA->GPA translation which is
configured as first stage page table on host side for a specific pasid, and
host owns GPA->HPA translation. As guest owns first stage translation table,
piotlb invalidation should be propagated to host since host IOMMU will cache
first level page table related mappings during DMA address translation.

Signed-off-by: Yi Liu <[email protected]>
Signed-off-by: Yi Sun <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 851d6b2c8ce7a7f07c4160bfae5c9cb91e3ac792
      
https://github.com/qemu/qemu/commit/851d6b2c8ce7a7f07c4160bfae5c9cb91e3ac792
  Author: Yi Liu <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  intel_iommu: Replay all pasid bindings when either SRTP or TE bit is changed

When either 'Set Root Table Pointer' or 'Translation Enable' bit is changed,
all pasid bindings on host side become stale and need to be updated.

Introduce a helper function vtd_replay_pasid_bindings_all() to go through all
pasid entries in all passthrough devices to update host side bindings.

Signed-off-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: cfb5139b1dff07e183c81483758a16c639ff0e54
      
https://github.com/qemu/qemu/commit/cfb5139b1dff07e183c81483758a16c639ff0e54
  Author: Yi Liu <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/trace-events

  Log Message:
  -----------
  intel_iommu: Replay pasid bindings after context cache invalidation

This replays guest pasid bindings after context cache invalidation.
Actually, programmer should issue pasid cache invalidation with proper
granularity after issuing context cache invalidation.

We see old linux such as 6.7.0-rc2 not following the spec, it sends
pasid cache invalidation before context cache invalidation, then QEMU
depends on context cache invalidation to get pasid entry and setup
binding.

Signed-off-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: cba6f4a9b54e4152a7c14197f7a966fd33c232e9
      
https://github.com/qemu/qemu/commit/cba6f4a9b54e4152a7c14197f7a966fd33c232e9
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  intel_iommu: Add migration support with x-flts=on

When x-flts=on, we set up bindings to nested HWPT in host, after
migration, VFIO device binds to nesting parent HWPT by default.
We need to re-establish the bindings to nested HWPT, or else device
DMA will break.

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: b0163f43195a8ae6c0f9b5d795548477425de23d
      
https://github.com/qemu/qemu/commit/b0163f43195a8ae6c0f9b5d795548477425de23d
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu_accel.c

  Log Message:
  -----------
  intel_iommu: Enable host device when x-flts=on in scalable mode

Now that all infrastructures of supporting passthrough device running
with first stage translation are there, enable it now.

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: ce1e8716801f4f1b5f31fb59e0b221bf0851121b
      
https://github.com/qemu/qemu/commit/ce1e8716801f4f1b5f31fb59e0b221bf0851121b
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M docs/devel/vfio-iommufd.rst

  Log Message:
  -----------
  docs/devel: Add IOMMUFD nesting documentation

Add documentation about using IOMMUFD backed VFIO device with intel_iommu with
x-flts=on.

Suggested-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 31ec4aadd066852e2cf823f47d7fbbe9ebeca955
      
https://github.com/qemu/qemu/commit/31ec4aadd066852e2cf823f47d7fbbe9ebeca955
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/iommufd.c

  Log Message:
  -----------
  vfio/iommufd: Add framework code to support getting dirty bitmap before unmap

Currently we support device and iommu dirty tracking, device dirty tracking
is preferred.

Add the framework code in iommufd_cdev_unmap() to choose either device or
iommu dirty tracking, just like vfio_legacy_dma_unmap_one().

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Tested-by: Xudong Hao <[email protected]>
Tested-by: Giovannio Cabiddu <[email protected]>
Tested-by: Rohith S R <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: f051dbeb91a2970b2c119afcfae8e63028332ef8
      
https://github.com/qemu/qemu/commit/f051dbeb91a2970b2c119afcfae8e63028332ef8
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/iommufd.c

  Log Message:
  -----------
  vfio/iommufd: Query dirty bitmap before DMA unmap

When an existing mapping is unmapped, there could already be dirty bits
which need to be recorded before unmap.

If query dirty bitmap fails, we still need to do unmapping or else there
is stale mapping and it's risky to guest.

Co-developed-by: Joao Martins <[email protected]>
Signed-off-by: Joao Martins <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Tested-by: Xudong Hao <[email protected]>
Tested-by: Giovannio Cabiddu <[email protected]>
Tested-by: Rohith S R <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: e79bc265ef547d5121c95ed4bc2e9c9130980274
      
https://github.com/qemu/qemu/commit/e79bc265ef547d5121c95ed4bc2e9c9130980274
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/container-legacy.c

  Log Message:
  -----------
  vfio/container-legacy: rename vfio_dma_unmap_bitmap() to 
vfio_legacy_dma_unmap_get_dirty_bitmap()

This is to follow naming style in container-legacy.c to have low level functions
with vfio_legacy_ prefix.

No functional changes.

Suggested-by: Cédric Le Goater <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 374e28d876e410773d40c6d98ec58f19747b3dd7
      
https://github.com/qemu/qemu/commit/374e28d876e410773d40c6d98ec58f19747b3dd7
  Author: Joao Martins <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio-user/container.c
    M hw/vfio/container-legacy.c
    M hw/vfio/container.c
    M hw/vfio/iommufd.c
    M hw/vfio/listener.c
    M hw/vfio/trace-events
    M include/hw/vfio/vfio-container.h

  Log Message:
  -----------
  vfio: Add a backend_flag parameter to vfio_container_query_dirty_bitmap()

This new parameter will be used in following patch, currently 0 is passed.

Signed-off-by: Joao Martins <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Tested-by: Giovannio Cabiddu <[email protected]>
Tested-by: Rohith S R <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
[ clg: Fixed subject typo ]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: e98a1c70493d58397662af318e9c4869012a4c97
      
https://github.com/qemu/qemu/commit/e98a1c70493d58397662af318e9c4869012a4c97
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M backends/iommufd.c
    M backends/trace-events
    M hw/vfio/iommufd.c
    M include/system/iommufd.h

  Log Message:
  -----------
  vfio/iommufd: Add IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag support

Pass IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR when doing the last dirty
bitmap query right before unmap, no PTEs flushes. This accelerates the
query without issue because unmap will tear down the mapping anyway.

Co-developed-by: Joao Martins <[email protected]>
Signed-off-by: Joao Martins <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Tested-by: Xudong Hao <[email protected]>
Tested-by: Giovannio Cabiddu <[email protected]>
Tested-by: Rohith S R <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: cac33cb5533ad38fd16b02468c1adbbed53ea536
      
https://github.com/qemu/qemu/commit/cac33cb5533ad38fd16b02468c1adbbed53ea536
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  intel_iommu: Fix unmap_bitmap failure with legacy VFIO backend

If a VFIO device in guest switches from IOMMU domain to block domain,
vtd_address_space_unmap() is called to unmap whole address space.

If that happens during migration, migration fails with legacy VFIO
backend as below:

Status: failed (vfio_container_dma_unmap(0x561bbbd92d90, 0x100000000000, 
0x100000000000) = -7 (Argument list too long))

Because legacy VFIO limits maximum bitmap size to 256MB which maps to 8TB on
4K page system, when 16TB sized UNMAP notification is sent, unmap_bitmap
ioctl fails. Normally such large UNMAP notification come from IOVA range
rather than system memory.

Apart from that, vtd_address_space_unmap() sends UNMAP notification with
translated_addr = 0, because there is no valid translated_addr for unmapping
a whole iommu memory region. This breaks dirty tracking no matter which VFIO
backend is used.

Fix them all by iterating over DMAMap list to unmap each range with active
mapping when global_dirty_tracking is active. global_dirty_tracking is
protected by BQL, so it's safe to reference it directly. If it's not active,
unmapping the whole address space in one go is optimal.

Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Tested-by: Giovannio Cabiddu <[email protected]>
Tested-by: Rohith S R <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 6e360c06176c7fcd8cd4e5da3f46d3b45c0c0607
      
https://github.com/qemu/qemu/commit/6e360c06176c7fcd8cd4e5da3f46d3b45c0c0607
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/listener.c

  Log Message:
  -----------
  vfio/listener: Add missing dirty tracking in region_del

If a VFIO device in guest switches from passthrough(PT) domain to block
domain, the whole memory address space is unmapped, but we passed a NULL
iotlb entry to unmap_bitmap, then bitmap query didn't happen and we lost
dirty pages.

By constructing an iotlb entry with iova = gpa for unmap_bitmap, it can
set dirty bits correctly.

For IOMMU address space, we still send NULL iotlb because VFIO don't know
the actual mappings in guest. It's vIOMMU's responsibility to send actual
unmapping notifications, e.g., vtd_address_space_unmap_in_dirty_tracking().

Signed-off-by: Zhenzhong Duan <[email protected]>
Tested-by: Giovannio Cabiddu <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 46c763311419fcaac2fcd78a85f0a8c8499477fb
      
https://github.com/qemu/qemu/commit/46c763311419fcaac2fcd78a85f0a8c8499477fb
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/migration.c

  Log Message:
  -----------
  vfio/migration: Add migration blocker if VM memory is too large to cause 
unmap_bitmap failure

With default config, kernel VFIO IOMMU type1 driver limits dirty bitmap to
256MB for unmap_bitmap ioctl so the maximum guest memory region is no more
than 8TB size for the ioctl to succeed.

Be conservative here to limit total guest memory to max value supported
by unmap_bitmap ioctl or else add a migration blocker. IOMMUFD backend
doesn't have such limit, one can use it if there is a need to migrate such
large VM.

Suggested-by: Yi Liu <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 0e3c1e2b2b249184d0aed65a022c3f8031afc33f
      
https://github.com/qemu/qemu/commit/0e3c1e2b2b249184d0aed65a022c3f8031afc33f
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/container.c
    M hw/vfio/device.c
    M hw/vfio/migration.c
    M include/hw/vfio/vfio-device.h

  Log Message:
  -----------
  vfio/migration: Allow live migration with vIOMMU without VFs using device 
dirty tracking

Commit e46883204c38 ("vfio/migration: Block migration with vIOMMU")
introduces a migration blocker when vIOMMU is enabled, because we need
to calculate the IOVA ranges for device dirty tracking. But this is
unnecessary for iommu dirty tracking.

Limit the vfio_viommu_preset() check to those devices which use device
dirty tracking. This allows live migration with VFIO devices which use
iommu dirty tracking.

Suggested-by: Jason Zeng <[email protected]>
Co-developed-by: Joao Martins <[email protected]>
Signed-off-by: Joao Martins <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Reviewed-by: Yi Liu <[email protected]>
Tested-by: Xudong Hao <[email protected]>
Tested-by: Giovannio Cabiddu <[email protected]>
Tested-by: Rohith S R <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: cd4d7fb72109043d60b5cf6191a1678e96775b98
      
https://github.com/qemu/qemu/commit/cd4d7fb72109043d60b5cf6191a1678e96775b98
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/pci/pci.c
    M include/hw/core/iommu.h
    M include/hw/pci/pci.h

  Log Message:
  -----------
  hw/pci: Introduce pci_device_get_host_iommu_quirks()

In VFIO core, we call iommufd_backend_get_device_info() to return vendor
specific hardware information data, but it's not good to retrieve this raw
data in VFIO core.

Introduce a new PCIIOMMUOps optional callback, get_host_iommu_quirk() which
allows to retrieve the vendor specific hardware information data and convert
it into bitmaps defined with enum host_iommu_quirks.

pci_device_get_host_iommu_quirks() is a wrapper that can be called on a PCI
device potentially protected by a vIOMMU.

Suggested-by: Eric Auger <[email protected]>
Suggested-by: Nicolin Chen <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 554a719e057b21d4de817859d8ce7a73b91243ed
      
https://github.com/qemu/qemu/commit/554a719e057b21d4de817859d8ce7a73b91243ed
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/i386/intel_iommu.c
    M hw/i386/intel_iommu_accel.c
    M hw/i386/intel_iommu_accel.h

  Log Message:
  -----------
  intel_iommu_accel: Implement get_host_iommu_quirks() callback

Implement get_host_iommu_quirks() callback to retrieve the vendor specific
hardware information data and convert it into bitmaps defined with enum
host_iommu_quirks. It will be used by VFIO in subsequent patch.

Suggested-by: Eric Auger <[email protected]>
Suggested-by: Nicolin Chen <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 5c9da3d65dfbd7f8de94c60233397688ada35776
      
https://github.com/qemu/qemu/commit/5c9da3d65dfbd7f8de94c60233397688ada35776
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/vfio/listener.c
    M hw/vfio/trace-events

  Log Message:
  -----------
  vfio/listener: Bypass readonly region for dirty tracking

When doing dirty tracking or calculating dirty tracking range, readonly
regions can be bypassed, because corresponding DMA mappings are readonly
and never become dirty.

This can optimize dirty tracking a bit for passthrough device.

Signed-off-by: Zhenzhong Duan <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 68d3a2a24d7c8d2a02cbaa99b8207961c0cd7e91
      
https://github.com/qemu/qemu/commit/68d3a2a24d7c8d2a02cbaa99b8207961c0cd7e91
  Author: Zhenzhong Duan <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M docs/devel/vfio-iommufd.rst
    M hw/vfio/device.c
    M hw/vfio/iommufd.c
    M hw/vfio/listener.c
    M include/hw/vfio/vfio-container.h
    M include/hw/vfio/vfio-device.h

  Log Message:
  -----------
  Workaround for ERRATA_772415_SPR17

On a system influenced by ERRATA_772415, IOMMU_HW_INFO_VTD_ERRATA_772415_SPR17
is repored by IOMMU_DEVICE_GET_HW_INFO. Due to this errata, even the readonly
range mapped on second stage page table could still be written.

Reference from 4th Gen Intel Xeon Processor Scalable Family Specification
Update, Errata Details, SPR17.
Link 
https://edc.intel.com/content/www/us/en/design/products-and-solutions/processors-and-chipsets/eagle-stream/sapphire-rapids-specification-update/
Backup https://cdrdv2.intel.com/v1/dl/getContent/772415

Also copied the SPR17 details from above link:
"Problem: When remapping hardware is configured by system software in
scalable mode as Nested (PGTT=011b) and with PWSNP field Set in the
PASID-table-entry, it may Set Accessed bit and Dirty bit (and Extended
Access bit if enabled) in first-stage page-table entries even when
second-stage mappings indicate that corresponding first-stage page-table
is Read-Only.

Implication: Due to this erratum, pages mapped as Read-only in second-stage
page-tables may be modified by remapping hardware Access/Dirty bit updates.

Workaround: None identified. System software enabling nested translations
for a VM should ensure that there are no read-only pages in the
corresponding second-stage mappings."

Introduce a helper vfio_device_get_host_iommu_quirk_bypass_ro to check if
readonly mappings should be bypassed.

Signed-off-by: Zhenzhong Duan <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 0ffc8f3625c7bf2d437f2badf53939a3641910e7
      
https://github.com/qemu/qemu/commit/0ffc8f3625c7bf2d437f2badf53939a3641910e7
  Author: Farhan Ali <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M util/vfio-helpers.c

  Log Message:
  -----------
  util/vfio-helper: Fix endianness in PCI config read/write functions

The VFIO pread/pwrite functions use little-endian data format. Currently, the
qemu_vfio_pci_read_config() and qemu_vfio_pci_write_config() don't correctly
convert from CPU native endian format to little-endian (and vice versa) when
using the pread/pwrite functions. Fix this by limiting read/write to 32 bits
and handling endian conversion in qemu_vfio_pci_read_config() and
qemu_vfio_pci_write_config().

Signed-off-by: Farhan Ali <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Link: 
https://lore.kernel.org/qemu-devel/[email protected]
[ clg: Fixed typo in subject ]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: ec7109999af691d84e8d2b518d7a4f30d8fa6d62
      
https://github.com/qemu/qemu/commit/ec7109999af691d84e8d2b518d7a4f30d8fa6d62
  Author: Cédric Le Goater <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M include/hw/hyperv/hvgdk_mini.h

  Log Message:
  -----------
  include/hw/hyperv: Remove unused 'struct mshv_vp_registers' definition

The 'struct mshv_vp_registers' definition in hvgdk_mini.h is unused in
QEMU and conflicts with the canonical definition in
linux-headers/linux/mshv.h.

Remove the duplicate definition to avoid build conflicts when the Linux
headers are updated.

Cc: Magnus Kulke <[email protected]>
Reviewed-by: Magnus Kulke <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 9cac3393458f618ae8634774362977638f00a91e
      
https://github.com/qemu/qemu/commit/9cac3393458f618ae8634774362977638f00a91e
  Author: Cédric Le Goater <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M scripts/update-linux-headers.sh

  Log Message:
  -----------
  update-linux-headers: Remove "asm-s390/unistd_32.h"

The "asm/unistd_32.h" file was generated for the 31-bit compatibility
mode on the s390 architecture and support was removed in v6.19-rc1,
commit 4ac286c4a8d9 ("s390/syscalls: Switch to generic system call
table generation")

unistd_32.h is no longer generated when running make header_install.
Remove it.

Reported-by: Shameer Kolothum <[email protected]>
Cc: Thomas Huth <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 4f543cc8c755e5c3caa04e00e87b84d293b0c2fa
      
https://github.com/qemu/qemu/commit/4f543cc8c755e5c3caa04e00e87b84d293b0c2fa
  Author: Cédric Le Goater <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M hw/ppc/vof.c

  Log Message:
  -----------
  ppc/vof: Fix build error

Newer gcc compiler (version 16.0.0 20260103 (Red Hat 16.0.0-0) (GCC))
detects an unused variable error:

../hw/ppc/vof.c: In function ‘vof_dt_memory_available’:
../hw/ppc/vof.c:642:12: error: variable ‘n’ set but not used 
[-Werror=unused-but-set-variable=]

Remove 'n'.

Cc: Alexey Kardashevskiy <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 228f72b90f94ae910cf3e587ad9fd26a065a093a
      
https://github.com/qemu/qemu/commit/228f72b90f94ae910cf3e587ad9fd26a065a093a
  Author: Cédric Le Goater <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M target/riscv/cpu.c

  Log Message:
  -----------
  target/riscv: Fix build errors

Newer gcc compiler (version 16.0.0 20260103 (Red Hat 16.0.0-0) (GCC))
detects a truncation error:

  ../target/riscv/cpu.c: In function ‘riscv_isa_write_fdt’:
  ../target/riscv/cpu.c:2916:35: error: ‘%d’ directive output may be truncated 
writing between 1 and 11 bytes into a region of size 5 
[-Werror=format-truncation=]
   2916 |     snprintf(isa_base, maxlen, "rv%di", xlen);
        |                                   ^~
  ../target/riscv/cpu.c:2916:32: note: directive argument in the range 
[-2147483648, 2147483632]
   2916 |     snprintf(isa_base, maxlen, "rv%di", xlen);
        |                                ^~~~~~~

Since the xlen variable represents the register width (32, 64, 128) in
the RISC-V base ISA name, mask its value with a 8-bit bitmask to
satisfy the size constraints on the snprintf output.

Cc: Palmer Dabbelt <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Weiwei Li <[email protected]>
Cc: Daniel Henrique Barboza <[email protected]>
Cc: Liu Zhiwei <[email protected]>
Reviewed-by: Daniel Henrique Barboza <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: aef386e0b14a535e0977ad9b48d6b2eb672837a7
      
https://github.com/qemu/qemu/commit/aef386e0b14a535e0977ad9b48d6b2eb672837a7
  Author: Cédric Le Goater <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M tests/qtest/libqtest.c

  Log Message:
  -----------
  tests/qtest: Fix build error

Newer gcc compiler (version 16.0.0 20260103 (Red Hat 16.0.0-0) (GCC))
detects an unused variable error:

  ../tests/qtest/libqtest.c: In function ‘qtest_qom_has_concrete_type’:
  ../tests/qtest/libqtest.c:1044:9: error: variable ‘idx’ set but not used 
[-Werror=unused-but-set-variable=]

Remove idx.

Cc: Fabiano Rosas <[email protected]>
Cc: Laurent Vivier <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: 7a05be8c70bb789c23076b1ca2563ed7d87c6fb8
      
https://github.com/qemu/qemu/commit/7a05be8c70bb789c23076b1ca2563ed7d87c6fb8
  Author: Cédric Le Goater <[email protected]>
  Date:   2026-01-13 (Tue, 13 Jan 2026)

  Changed paths:
    M tests/unit/rcutorture.c

  Log Message:
  -----------
  tests/rcutorture: Fix build error

Newer gcc compiler (version 16.0.0 20260103 (Red Hat 16.0.0-0) (GCC))
detects an unused variable error:

  ../tests/unit/rcutorture.c: In function ‘rcu_read_stress_test’:
  ../tests/unit/rcutorture.c:251:18: error: variable ‘garbage’ set but not used 
[-Werror=unused-but-set-variable=]
    251 |     volatile int garbage = 0;
        |                  ^~~~~~~

Since the 'garbage' variable is used to generate memory reads from the
CPU while holding the RCU lock, it can not be removed. Tag it as
((unused)) instead to silence the compiler warnings/errors.

Reviewed-by: Richard Henderson <[email protected]>
Link: https://lore.kernel.org/qemu-devel/[email protected]
Signed-off-by: Cédric Le Goater <[email protected]>


  Commit: d03c3e522eb0696dcfc9c2cf643431eaaf51ca0f
      
https://github.com/qemu/qemu/commit/d03c3e522eb0696dcfc9c2cf643431eaaf51ca0f
  Author: Richard Henderson <[email protected]>
  Date:   2026-01-14 (Wed, 14 Jan 2026)

  Changed paths:
    M MAINTAINERS
    M backends/iommufd.c
    M backends/trace-events
    M docs/devel/vfio-iommufd.rst
    M hw/i386/Kconfig
    M hw/i386/intel_iommu.c
    A hw/i386/intel_iommu_accel.c
    A hw/i386/intel_iommu_accel.h
    M hw/i386/intel_iommu_internal.h
    M hw/i386/meson.build
    M hw/i386/trace-events
    M hw/pci/pci.c
    M hw/ppc/vof.c
    M hw/vfio-user/container.c
    M hw/vfio/container-legacy.c
    M hw/vfio/container.c
    M hw/vfio/device.c
    M hw/vfio/helpers.c
    M hw/vfio/iommufd.c
    M hw/vfio/listener.c
    M hw/vfio/migration-multifd.c
    M hw/vfio/migration.c
    M hw/vfio/trace-events
    M hw/vfio/vfio-helpers.h
    A include/hw/core/iommu.h
    M include/hw/hyperv/hvgdk_mini.h
    M include/hw/i386/intel_iommu.h
    M include/hw/pci/pci.h
    M include/hw/vfio/vfio-container.h
    M include/hw/vfio/vfio-device.h
    M include/system/iommufd.h
    M scripts/update-linux-headers.sh
    M target/riscv/cpu.c
    M tests/qtest/intel-iommu-test.c
    M tests/qtest/libqtest.c
    M tests/unit/rcutorture.c
    M util/vfio-helpers.c

  Log Message:
  -----------
  Merge tag 'pull-vfio-20260113' of https://github.com/legoater/qemu into 
staging

vfio queue:

* Resolves build errors with gcc 16
* Adjusts the Linux headers for s390x and mshv
* Fixes endianness issue in the VFIO helper functions
* Adds support for live migration with vIOMMU when using IOMMU
  dirty tracking
* Implements a migration blocker to prevent failures when VM
  memory is too large
* Corrects an unmap_bitmap failure in the legacy VFIO backend
* Addresses a workaround for an Intel IOMMU errata.
* Implements Intel IOMMU first stage translation for passthrough
  device. Also a prerequisite work for vSVA.
* Updates documentation

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmlmEgQACgkQUaNDx8/7
# 7KFm2w/+JwlyiY5jWjzvCBCEEgBdBrb8XzMoSFr2xWNQrNHvE23veeQJcT+5LwQI
# DV74Y3wmWYeAVGGKHVoALVEIJYtjVDOPU5TIyhr4nTMO8/A2j1ylBhsP6ZnWYYkO
# uFe92O3wTHViFY5h9dgm1JsA3Bok52mteAHAE5gsxCNYk6h+ps1a5UZM8wxjtNA2
# yVIvAZvaubnA/0yN02pz5bCOhPpaGpkV69l7nJSHwk2RPuspUR6dWo11P2yjxVDQ
# 7pv7DbLl9qm+xdmOp0ANVPKp9fqBJnBa/ta1Dn1VrQ2iJXnwezy+IdNC1In/HKKy
# ZHe+V/p2JA09xjjmB2fu53DQQIjh/qeCWi0b2vkDZZVvl0hJ+0y9P1GRxhwBhtgK
# /vwvgKGwC3OwXcdrxXNvD4Yy4NJLUtCoN8vmyI41ohLeMfr7/XrmTrf0J4ciPc4T
# 1bAHY2SWkFL59ylN+gt1khlV8zqPYP9S1i08A2wJjvLOwqRJ/LN2tNEh9pWvGmFg
# p5WGTNeZLsfD+ZT10bm083EMAc1va7RTQNjAzb55pxq0ASPl7ZIVAKqazaG9QsaK
# apPxGGYevuWzJVaNYWAqj7y37WDP/w6rKmyRmIBMV+x9+Dv+DGPbGb8oAOjZ0Av5
# 489mHYIONxp//2SvaUSfGpQHACCgEKTHlstdlyw79C84xPzHujE=
# =o9aW
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 13 Jan 2026 08:36:04 PM AEDT
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <[email protected]>" [full]
# gpg:                 aka "Cédric Le Goater <[email protected]>" [full]

* tag 'pull-vfio-20260113' of https://github.com/legoater/qemu: (41 commits)
  tests/rcutorture: Fix build error
  tests/qtest: Fix build error
  target/riscv: Fix build errors
  ppc/vof: Fix build error
  update-linux-headers: Remove "asm-s390/unistd_32.h"
  include/hw/hyperv: Remove unused 'struct mshv_vp_registers' definition
  util/vfio-helper: Fix endianness in PCI config read/write functions
  Workaround for ERRATA_772415_SPR17
  vfio/listener: Bypass readonly region for dirty tracking
  intel_iommu_accel: Implement get_host_iommu_quirks() callback
  hw/pci: Introduce pci_device_get_host_iommu_quirks()
  vfio/migration: Allow live migration with vIOMMU without VFs using device 
dirty tracking
  vfio/migration: Add migration blocker if VM memory is too large to cause 
unmap_bitmap failure
  vfio/listener: Add missing dirty tracking in region_del
  intel_iommu: Fix unmap_bitmap failure with legacy VFIO backend
  vfio/iommufd: Add IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag support
  vfio: Add a backend_flag parameter to vfio_container_query_dirty_bitmap()
  vfio/container-legacy: rename vfio_dma_unmap_bitmap() to 
vfio_legacy_dma_unmap_get_dirty_bitmap()
  vfio/iommufd: Query dirty bitmap before DMA unmap
  vfio/iommufd: Add framework code to support getting dirty bitmap before unmap
  ...

Signed-off-by: Richard Henderson <[email protected]>


Compare: https://github.com/qemu/qemu/compare/cf3e71d8fc8b...d03c3e522eb0

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications

Reply via email to