RE: [RFC 00/18] vfio: Adopt iommufd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Eric Auger [mailto:eric.auger@xxxxxxxxxx]
> Sent: 26 April 2022 12:45
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@xxxxxxxxxx>; Yi
> Liu <yi.l.liu@xxxxxxxxx>; alex.williamson@xxxxxxxxxx; cohuck@xxxxxxxxxx;
> qemu-devel@xxxxxxxxxx
> Cc: david@xxxxxxxxxxxxxxxxxxxxx; thuth@xxxxxxxxxx; farman@xxxxxxxxxxxxx;
> mjrosato@xxxxxxxxxxxxx; akrowiak@xxxxxxxxxxxxx; pasic@xxxxxxxxxxxxx;
> jjherne@xxxxxxxxxxxxx; jasowang@xxxxxxxxxx; kvm@xxxxxxxxxxxxxxx;
> jgg@xxxxxxxxxx; nicolinc@xxxxxxxxxx; eric.auger.pro@xxxxxxxxx;
> kevin.tian@xxxxxxxxx; chao.p.peng@xxxxxxxxx; yi.y.sun@xxxxxxxxx;
> peterx@xxxxxxxxxx; Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>
> Subject: Re: [RFC 00/18] vfio: Adopt iommufd

[...]
 
> >>
> https://lore.kernel.org/kvm/0-v1-e79cd8d168e8+6-iommufd_jgg@xxxxxxxxxx
> >> /
> >> [2] https://github.com/luxis1999/iommufd/tree/iommufd-v5.17-rc6
> >> [3] https://github.com/luxis1999/qemu/tree/qemu-for-5.17-rc6-vm-rfcv1
> > Hi,
> >
> > I had a go with the above branches on our ARM64 platform trying to
> pass-through
> > a VF dev, but Qemu reports an error as below,
> >
> > [    0.444728] hisi_sec2 0000:00:01.0: enabling device (0000 -> 0002)
> > qemu-system-aarch64-iommufd: IOMMU_IOAS_MAP failed: Bad address
> > qemu-system-aarch64-iommufd: vfio_container_dma_map(0xaaaafeb40ce0,
> 0x8000000000, 0x10000, 0xffffb40ef000) = -14 (Bad address)
> >
> > I think this happens for the dev BAR addr range. I haven't debugged the
> kernel
> > yet to see where it actually reports that.
> Does it prevent your assigned device from working? I have such errors
> too but this is a known issue. This is due to the fact P2P DMA is not
> supported yet.
> 

Yes, the basic tests all good so far. I am still not very clear how it works if
the map() fails though. It looks like it fails in,

iommufd_ioas_map()
  iopt_map_user_pages()
   iopt_map_pages()
   ..
     pfn_reader_pin_pages()

So does it mean it just works because the page is resident()?

Thanks,
Shameer







[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux