[lkml]   [2023]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 00/17] Add Nested Translation Support for SMMUv3
Hi Zhangfei,

On Mon, May 15, 2023 at 06:00:26PM +0800, Zhangfei Gao wrote:

> I rebased on these two branches and did some basic tests.
> The basic functions work after backport
> iommufd: Add device fault handler support

Thanks for testing!

> However when debugging hotplug PCI device, it still does not work,
> Segmentation fault same as 6.2.
> guest kernel
> boot guest (this info does not appear in 6.2)
> qemu-system-aarch64: -device
> vfio-pci,host=0000:76:00.1,bus=pci.1,addr=0x0,id=acc1,iommufd=iommufd0:
> Failed to set data -1
> qemu-system-aarch64: -device
> vfio-pci,host=0000:76:00.1,bus=pci.1,addr=0x0,id=acc1,iommufd=iommufd0:
> failed to set device data

Hmm.. I wonder what fails the set_dev_data ioctl...

> $ sudo nc -U /tmp/qmpm_1.socket
> (qemu) info pci
> (qemu) device_del acc1
> guest:
> qemu-system-aarch64: IOMMU_IOAS_UNMAP failed: No such file or directory
> qemu-system-aarch64: vfio_container_dma_unmap(0xaaaae1fc0380,
> 0x8000000000, 0x10000) = -2 (No such file or directory)

This is resulted from the following commit that we should
drop later:

commit c4fd2efd7c02dd30491adf676c1b0aed67656f36
Author: Yi Liu <>
Date: Thu Apr 27 05:47:03 2023 -0700

vfio/container: Skip readonly pages

This is a temparary solution for Intel platform due to an errata in
which readonly pages in second stage page table is exclusive with
nested support.

Signed-off-by: Yi Liu <>

> qemu-system-aarch64: Failed to unset data -1
> Segmentation fault (core dumped). // also happened in 6.2

Hmm, would it be possible for you to run the test again by
adding the following tracers to your QEMU command?
--trace "iommufd*" \
--trace "smmu*" \
--trace "vfio_*" \
--trace "pci_*"


 \ /
  Last update: 2023-05-15 18:00    [W:0.127 / U:4.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site