>-----Original Message----- >From: Cédric Le Goater <c...@redhat.com> >Sent: Wednesday, November 8, 2023 5:41 PM >Subject: Re: [PATCH v4 26/41] backends/iommufd: Introduce the iommufd object > >>>> + hwaddr iova, ram_addr_t size) >>>> +{ >>>> + int ret; >>>> + struct iommu_ioas_unmap unmap = { >>>> + .size = sizeof(unmap), >>>> + .ioas_id = ioas_id, >>>> + .iova = iova, >>>> + .length = size, >>>> + }; >>>> + >>>> + ret = ioctl(be->fd, IOMMU_IOAS_UNMAP, &unmap); >>>> + trace_iommufd_backend_unmap_dma(be->fd, ioas_id, iova, size, ret); >>>> + /* >>>> + * TODO: IOMMUFD doesn't support mapping PCI BARs for now. >>>> + * It's not a problem if there is no p2p dma, relax it here >>>> + * and avoid many noisy trigger from vIOMMU side. >>> >>> Should we add a warn_report() ? >> >> The purpose of checking "ret && errno == ENOENT" is to avoid many >> error_report() for PCI BARs, If we add warn_report(), there will still be >> many print for PCI BARs. > >a trace event then ?
Good idea, will do. Thanks Zhenzhong