VIRTIO-IOMMU/HostIOMMUDevice: Fixes and page size mask rework
Status from this message: Applied to vfio-next.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 3 repliesApplied
- v17 patches 12 repliesSuperseded
Changes in v2 from the cover letter
- Don't update mask if the granule is frozen (Zhenzhong)
- Collected Zhenzhong's and Cédric's R-bs
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | virtio-iommu: Fix error handling in virtio_iommu_set_host_iova_ranges()hw/ | +6 | 0 replies | |
| 2/7 | vfio-container-base: Introduce vfio_container_get_iova_ranges() helperhw/ hw/ hw/ +1 more | +19 | 0 replies | |
| 3/7 | HostIOMMUDevice : remove Error handle from get_iova_ranges callbackhw/ hw/ hw/ +1 more | +4 | 0 replies | |
| 4/7 | HostIOMMUDevice: Introduce get_page_size_mask() callbackhw/ hw/ include/ +1 more | +36 | 0 replies | |
| 5/7 | virtio-iommu : Retrieve page size mask on virtio_iommu_set_iommu_device()hw/ hw/ | +56 | 1 reply | |
| 6/7 | memory: remove IOMMU MR iommu_set_page_size_mask() callbackhw/ hw/ hw/ +2 more | +0 | 0 replies | |
| 7/7 | virtio-iommu: Revert transient enablement of IOMMU MR in bypass modehw/ | +0 | 0 replies |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Cédric Le Goater | Zhenzhong Duan | Michael S. Tsirkin |
|---|---|---|---|
| Series | R-b | ||
| 1/7 | R-b | R-b | |
| 2/7 | R-b | R-b | |
| 3/7 | R-b | R-b | |
| 4/7 | R-b | R-b | |
| 5/7 | R-b | ||
| 6/7 | R-b | R-b | |
| 7/7 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/7] VIRTIO-IOMMU/HostIOMMUDevice: Fixes and page size mask rework
The 2 first patches are fixes ofcf2647a76e ("virtio-iommu: Compute host reserved regions") They can be taken separately of the rest.
Then the series uses the HostIOMMUDevice interface to fetch information about the page size mask supported along the assigned device and propagate it to the virtio-iommu. This is a similar work as what was done in
VIRTIO-IOMMU/VFIO: Fix host iommu geometry handling series
but this time for the page size mask. Using this new infrastructure allows to handle page size mask conflicts earlier on device hotplug as opposed to current QEMU abort:
qemu-system-aarch64: virtio-iommu virtio-iommu-memory-region-8-0 does not support frozen granule 0x10000
qemu: hardware error: vfio: DMA mapping failed, unable to continue
With this series the hotplug nicely fails.
Also this allows to remove hacks consisting in transiently enabling IOMMU MRs to collect coldplugged device page size mask before machine init. Those hacks were introduced by
94df5b2180d6 ("virtio-iommu: Fix 64kB host page size VFIO device assignment")
The series can be found at:
https://github.com/eauger/qemu/tree/virtio-iommu-psmask-rework-v2
---
v1 -> v2:
- Don't update mask if the granule is frozen (Zhenzhong)
- Collected Zhenzhong's and Cédric's R-bs
Eric Auger (7):
virtio-iommu: Fix error handling in
virtio_iommu_set_host_iova_ranges()
vfio-container-base: Introduce vfio_container_get_iova_ranges() helper HostIOMMUDevice : remove Error handle from get_iova_ranges callback
HostIOMMUDevice: Introduce get_page_size_mask() callback virtio-iommu : Retrieve page size mask on
virtio_iommu_set_iommu_device()
memory: remove IOMMU MR iommu_set_page_size_mask() callback
virtio-iommu: Revert transient enablement of IOMMU MR in bypass mode
include/exec/memory.h | 38 -------- include/hw/vfio/vfio-container-base.h | 9 ++ include/sysemu/host_iommu_device.h | 11 ++- hw/vfio/common.c | 8 -- hw/vfio/container-base.c | 15 ++++ hw/vfio/container.c | 16 ++-- hw/vfio/iommufd.c | 21 +++-- hw/virtio/virtio-iommu.c | 123 +++++++++++++------------- system/memory.c | 13 --- hw/virtio/trace-events | 2 +- 10 files changed, 119 insertions(+), 137 deletions(-)
Signature · 1 line
2.41.0