<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/backends, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/backends?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/backends?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-07-24T02:58:46Z</updated>
<entry>
<title>Merge tag 'pull-vfio-20240723-1' of https://github.com/legoater/qemu into staging</title>
<updated>2024-07-24T02:58:46Z</updated>
<author>
<name>Richard Henderson</name>
<email>richard.henderson@linaro.org</email>
</author>
<published>2024-07-24T02:58:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=dd4bc5f1cfe92531d654c71e7703b3895afb05df'/>
<id>urn:sha1:dd4bc5f1cfe92531d654c71e7703b3895afb05df</id>
<content type='text'>
vfio queue:

* IOMMUFD Dirty Tracking support
* Fix for a possible SEGV in IOMMU type1 container
* Dropped initialization of host IOMMU device with mdev devices

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmafyVUACgkQUaNDx8/7
# 7KGebRAAzEYxvstDxSPNF+1xx937TKbRpiKYtspTfEgu4Ht50MwO2ZqnVWzTBSwa
# qcjhDf2avMBpBvkp4O9fR7nXR0HRN2KvYrBSThZ3Qpqu4KjxCAGcHI5uYmgfizYh
# BBLrw3eWME5Ry220TinQF5KFl50vGq7Z/mku5N5Tgj2qfTfCXYK1Kc19SyAga49n
# LSokTIjZAGJa4vxrE7THawaEUjFRjfCJey64JUs/TPJaGr4R1snJcWgETww6juUE
# 9OSw/xl0AoQhaN/ZTRC1qCsBLUI2MVPsC+x+vqVK62HlTjCx+uDRVQ8KzfDzjCeH
# gaLkMjxJSuJZMpm4UU7DBzDGEGcEBCGeNyFt37BSqqPPpX55CcFhj++d8vqTiwpF
# YzmTNd/znxcZTw6OJN9sQZohh+NeS86CVZ3x31HD3dXifhRf17jbh7NoIyi+0ZCb
# N+mytOH5BXsD+ddwbk+yMaxXV43Fgz7ThG5tB1tjhhNtLZHDA5ezFvGZ5F/FJrqE
# xAbjOhz5MC+RcOVNSzQJCULNqFpfE6Gqeys6btEDm/ltf4LpAe6W1HYuv8BJc19T
# UsqGK2yKAuQX8GErYxJ1zqZCttVrgpsmXFYTC5iGbxC84mvsF0Iti96IdXz9gfzN
# Vlb2OxoefcOwVqIhbkvTZW0ZwYGGDDPAYhLMfr5lSuRqj123OOo=
# =cViP
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 24 Jul 2024 01:16:37 AM AEST
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater &lt;clg@kaod.org&gt;" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1

* tag 'pull-vfio-20240723-1' of https://github.com/legoater/qemu:
  vfio/common: Allow disabling device dirty page tracking
  vfio/migration: Don't block migration device dirty tracking is unsupported
  vfio/iommufd: Implement VFIOIOMMUClass::query_dirty_bitmap support
  vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support
  vfio/iommufd: Probe and request hwpt dirty tracking capability
  vfio/{iommufd, container}: Invoke HostIOMMUDevice::realize() during attach_device()
  vfio/iommufd: Add hw_caps field to HostIOMMUDeviceCaps
  vfio/{iommufd,container}: Remove caps::aw_bits
  vfio/iommufd: Introduce auto domain creation
  vfio/ccw: Don't initialize HOST_IOMMU_DEVICE with mdev
  vfio/ap: Don't initialize HOST_IOMMU_DEVICE with mdev
  vfio/iommufd: Return errno in iommufd_cdev_attach_ioas_hwpt()
  backends/iommufd: Extend iommufd_backend_get_device_info() to fetch HW capabilities
  vfio/iommufd: Don't initialize nor set a HOST_IOMMU_DEVICE with mdev
  vfio/pci: Extract mdev check into an helper
  hw/vfio/container: Fix SIGSEV on vfio_container_instance_finalize()

Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>vfio/iommufd: Implement VFIOIOMMUClass::query_dirty_bitmap support</title>
<updated>2024-07-23T15:14:52Z</updated>
<author>
<name>Joao Martins</name>
<email>joao.m.martins@oracle.com</email>
</author>
<published>2024-07-22T21:13:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=7c30710bd99510b1ce91a1b287118c759c55a495'/>
<id>urn:sha1:7c30710bd99510b1ce91a1b287118c759c55a495</id>
<content type='text'>
ioctl(iommufd, IOMMU_HWPT_GET_DIRTY_BITMAP, arg) is the UAPI
that fetches the bitmap that tells what was dirty in an IOVA
range.

A single bitmap is allocated and used across all the hwpts
sharing an IOAS which is then used in log_sync() to set Qemu
global bitmaps.

Signed-off-by: Joao Martins &lt;joao.m.martins@oracle.com&gt;
Reviewed-by: Cédric Le Goater &lt;clg@redhat.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Reviewed-by: Zhenzhong Duan &lt;zhenzhong.duan@intel.com&gt;
</content>
</entry>
<entry>
<title>vfio/iommufd: Implement VFIOIOMMUClass::set_dirty_tracking support</title>
<updated>2024-07-23T15:14:52Z</updated>
<author>
<name>Joao Martins</name>
<email>joao.m.martins@oracle.com</email>
</author>
<published>2024-07-22T21:13:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=52ce88229c2d63a223f4c822240e84c3daeb7f6e'/>
<id>urn:sha1:52ce88229c2d63a223f4c822240e84c3daeb7f6e</id>
<content type='text'>
ioctl(iommufd, IOMMU_HWPT_SET_DIRTY_TRACKING, arg) is the UAPI that
enables or disables dirty page tracking. The ioctl is used if the hwpt
has been created with dirty tracking supported domain (stored in
hwpt::flags) and it is called on the whole list of iommu domains.

Signed-off-by: Joao Martins &lt;joao.m.martins@oracle.com&gt;
Reviewed-by: Zhenzhong Duan &lt;zhenzhong.duan@intel.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/{iommufd,container}: Remove caps::aw_bits</title>
<updated>2024-07-23T15:14:52Z</updated>
<author>
<name>Joao Martins</name>
<email>joao.m.martins@oracle.com</email>
</author>
<published>2024-07-22T21:13:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=6c635326425091e164b563a7ce96408ef74ff2ec'/>
<id>urn:sha1:6c635326425091e164b563a7ce96408ef74ff2ec</id>
<content type='text'>
Remove caps::aw_bits which requires the bcontainer::iova_ranges being
initialized after device is actually attached. Instead defer that to
.get_cap() and call vfio_device_get_aw_bits() directly.

This is in preparation for HostIOMMUDevice::realize() being called early
during attach_device().

Suggested-by: Zhenzhong Duan &lt;zhenzhong.duan@intel.com&gt;
Signed-off-by: Joao Martins &lt;joao.m.martins@oracle.com&gt;
Reviewed-by: Cédric Le Goater &lt;clg@redhat.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
</content>
</entry>
<entry>
<title>vfio/iommufd: Introduce auto domain creation</title>
<updated>2024-07-23T15:14:52Z</updated>
<author>
<name>Joao Martins</name>
<email>joao.m.martins@oracle.com</email>
</author>
<published>2024-07-22T21:13:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=5b1e96e654036a65d3edb2671281e1a30c6f5ce7'/>
<id>urn:sha1:5b1e96e654036a65d3edb2671281e1a30c6f5ce7</id>
<content type='text'>
There's generally two modes of operation for IOMMUFD:

1) The simple user API which intends to perform relatively simple things
with IOMMUs e.g. DPDK. The process generally creates an IOAS and attaches
to VFIO and mainly performs IOAS_MAP and UNMAP.

2) The native IOMMUFD API where you have fine grained control of the
IOMMU domain and model it accordingly. This is where most new feature
are being steered to.

For dirty tracking 2) is required, as it needs to ensure that
the stage-2/parent IOMMU domain will only attach devices
that support dirty tracking (so far it is all homogeneous in x86, likely
not the case for smmuv3). Such invariant on dirty tracking provides a
useful guarantee to VMMs that will refuse incompatible device
attachments for IOMMU domains.

Dirty tracking insurance is enforced via HWPT_ALLOC, which is
responsible for creating an IOMMU domain. This is contrast to the
'simple API' where the IOMMU domain is created by IOMMUFD automatically
when it attaches to VFIO (usually referred as autodomains) but it has
the needed handling for mdevs.

To support dirty tracking with the advanced IOMMUFD API, it needs
similar logic, where IOMMU domains are created and devices attached to
compatible domains. Essentially mimicking kernel
iommufd_device_auto_get_domain(). With mdevs given there's no IOMMU domain
it falls back to IOAS attach.

The auto domain logic allows different IOMMU domains to be created when
DMA dirty tracking is not desired (and VF can provide it), and others where
it is. Here it is not used in this way given how VFIODevice migration
state is initialized after the device attachment. But such mixed mode of
IOMMU dirty tracking + device dirty tracking is an improvement that can
be added on. Keep the 'all of nothing' of type1 approach that we have
been using so far between container vs device dirty tracking.

Signed-off-by: Joao Martins &lt;joao.m.martins@oracle.com&gt;
Reviewed-by: Zhenzhong Duan &lt;zhenzhong.duan@intel.com&gt;
[ clg: Added ERRP_GUARD() in iommufd_cdev_autodomains_get() ]
Signed-off-by: Cédric Le Goater &lt;clg@redhat.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
</content>
</entry>
<entry>
<title>backends/iommufd: Extend iommufd_backend_get_device_info() to fetch HW capabilities</title>
<updated>2024-07-23T15:14:52Z</updated>
<author>
<name>Joao Martins</name>
<email>joao.m.martins@oracle.com</email>
</author>
<published>2024-07-19T12:04:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=2d1bf2589736b3714f3940d360404732ac13019c'/>
<id>urn:sha1:2d1bf2589736b3714f3940d360404732ac13019c</id>
<content type='text'>
The helper will be able to fetch vendor agnostic IOMMU capabilities
supported both by hardware and software. Right now it is only iommu dirty
tracking.

Signed-off-by: Joao Martins &lt;joao.m.martins@oracle.com&gt;
Reviewed-by: Zhenzhong Duan &lt;zhenzhong.duan@intel.com&gt;
Reviewed-by: Cédric Le Goater &lt;clg@redhat.com&gt;
Reviewed-by: Eric Auger &lt;eric.auger@redhat.com&gt;
</content>
</entry>
<entry>
<title>backends: Initial support for SPDM socket support</title>
<updated>2024-07-23T00:15:42Z</updated>
<author>
<name>Huai-Cheng Kuo</name>
<email>hchkuo@avery-design.com.tw</email>
</author>
<published>2024-07-03T09:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=bc419a1cc5b15deec9cf7cb7a382392c112810e2'/>
<id>urn:sha1:bc419a1cc5b15deec9cf7cb7a382392c112810e2</id>
<content type='text'>
SPDM enables authentication, attestation and key exchange to assist in
providing infrastructure security enablement. It's a standard published
by the DMTF [1].

SPDM supports multiple transports, including PCIe DOE and MCTP.
This patch adds support to QEMU to connect to an external SPDM
instance.

SPDM support can be added to any QEMU device by exposing a
TCP socket to a SPDM server. The server can then implement the SPDM
decoding/encoding support, generally using libspdm [2].

This is similar to how the current TPM implementation works and means
that the heavy lifting of setting up certificate chains, capabilities,
measurements and complex crypto can be done outside QEMU by a well
supported and tested library.

1: https://www.dmtf.org/standards/SPDM
2: https://github.com/DMTF/libspdm

Signed-off-by: Huai-Cheng Kuo &lt;hchkuo@avery-design.com.tw&gt;
Signed-off-by: Chris Browy &lt;cbrowy@avery-design.com&gt;
Co-developed-by: Jonathan Cameron &lt;Jonathan.cameron@huawei.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
[ Changes by WM
 - Bug fixes from testing
]
Signed-off-by: Wilfred Mallawa &lt;wilfred.mallawa@wdc.com&gt;
[ Changes by AF:
 - Convert to be more QEMU-ified
 - Move to backends as it isn't PCIe specific
]
Signed-off-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Message-Id: &lt;20240703092027.644758-3-alistair.francis@wdc.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>backends/rng-random: Get rid of qemu_open_old()</title>
<updated>2024-07-17T11:04:15Z</updated>
<author>
<name>Zhao Liu</name>
<email>zhao1.liu@intel.com</email>
</author>
<published>2024-07-15T08:21:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=18f3a07b206b228b041c260d48df393111c8299b'/>
<id>urn:sha1:18f3a07b206b228b041c260d48df393111c8299b</id>
<content type='text'>
For qemu_open_old(), osdep.h said:

&gt; Don't introduce new usage of this function, prefer the following
&gt; qemu_open/qemu_create that take an "Error **errp".

So replace qemu_open_old() with qemu_open(). And considering
rng_random_opened() will lose its obvious error handling case after
removing error_setg_file_open(), add comment to remind here.

Cc: Laurent Vivier &lt;lvivier@redhat.com&gt;
Cc: Amit Shah &lt;amit@kernel.org&gt;
Signed-off-by: Zhao Liu &lt;zhao1.liu@intel.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
(mjt: drop superfluous commit as suggested by philmd)
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
</content>
</entry>
<entry>
<title>backends/iommufd: Get rid of qemu_open_old()</title>
<updated>2024-07-17T11:04:15Z</updated>
<author>
<name>Zhao Liu</name>
<email>zhao1.liu@intel.com</email>
</author>
<published>2024-07-15T08:21:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=47cd2f1a360196beb9769a2636ccdd3ae9d0370f'/>
<id>urn:sha1:47cd2f1a360196beb9769a2636ccdd3ae9d0370f</id>
<content type='text'>
For qemu_open_old(), osdep.h said:

&gt; Don't introduce new usage of this function, prefer the following
&gt; qemu_open/qemu_create that take an "Error **errp".

So replace qemu_open_old() with qemu_open().

Cc: Yi Liu &lt;yi.l.liu@intel.com&gt;
Cc: Eric Auger &lt;eric.auger@redhat.com&gt;
Cc: Zhenzhong Duan &lt;zhenzhong.duan@intel.com&gt;
Signed-off-by: Zhao Liu &lt;zhao1.liu@intel.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Yi Liu &lt;yi.l.liu@intel.com&gt;
Reviewed-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
</content>
</entry>
<entry>
<title>backends/hostmem-epc: Get rid of qemu_open_old()</title>
<updated>2024-07-17T11:04:15Z</updated>
<author>
<name>Zhao Liu</name>
<email>zhao1.liu@intel.com</email>
</author>
<published>2024-07-15T08:21:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=514d3035b97b686ed9af321605e9eba2a82b20c9'/>
<id>urn:sha1:514d3035b97b686ed9af321605e9eba2a82b20c9</id>
<content type='text'>
For qemu_open_old(), osdep.h said:

&gt; Don't introduce new usage of this function, prefer the following
&gt; qemu_open/qemu_create that take an "Error **errp".

So replace qemu_open_old() with qemu_open().

Cc: David Hildenbrand &lt;david@redhat.com&gt;
Cc: Igor Mammedov &lt;imammedo@redhat.com&gt;
Signed-off-by: Zhao Liu &lt;zhao1.liu@intel.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Igor Mammedov &lt;imammedo@redhat.com&gt;
Reviewed-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
</content>
</entry>
</feed>
