lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260109003621.GG545276@ziepe.ca>
Date: Thu, 8 Jan 2026 20:36:21 -0400
From: Jason Gunthorpe <jgg@...pe.ca>
To: David Matlack <dmatlack@...gle.com>
Cc: Alex Williamson <alex@...zbot.org>, Alex Mastro <amastro@...com>,
	Shuah Khan <shuah@...nel.org>, Peter Xu <peterx@...hat.com>,
	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH] vfio: selftests: Add vfio_dma_mapping_mmio_test

On Thu, Jan 08, 2026 at 09:29:29PM +0000, David Matlack wrote:
> On 2026-01-08 02:33 PM, Jason Gunthorpe wrote:
> > On Thu, Jan 08, 2026 at 10:24:19AM -0800, David Matlack wrote:
> > > > > Oh, I was thinking about a compatability only flow only in the type 1
> > > > > emulation that internally magically converts a VMA to a dmabuf, but I
> > > > > haven't written anything.. It is a bit tricky and the type 1 emulation
> > > > > has not been as popular as I expected??
> > > >
> > > > In part because of this gap, I'd guess.  Thanks,
> > > 
> > > Lack of huge mappings in the IOMMU when using VFIO_TYPE1_IOMMU is
> > > another gap I'm aware of.
> > > vfio_dma_mapping_test.vfio_type1_iommu_anonymous_hugetlb_1gb.dma_map_unmap
> > > fails when IOMMUFD_VFIO_CONTAINER is enabled.
> > 
> > What is this? I'm not aware of it..
> 
> It's one of the test cases within
> tools/testing/selftests/vfio/vfio_dma_mapping_test.c.
> 
> Here's the output when running with CONFIG_IOMMUFD_VFIO_CONTAINER=y:
> 
>   #  RUN           vfio_dma_mapping_test.vfio_type1_iommu_anonymous_hugetlb_1gb.dma_map_unmap ...
>   Mapped HVA 0x7f0480000000 (size 0x40000000) at IOVA 0x0
>   Searching for IOVA 0x0 in /sys/kernel/debug/iommu/intel/0000:6a:01.0/domain_translation_struct
>   Found IOMMU mappings for IOVA 0x0:
>   PGD: 0x0000000203475027
>   P4D: 0x0000000203476027
>   PUD: 0x0000000203477027
>   PMD: 0x00000001e7562027
>   PTE: 0x00000041c0000067
>   # tools/testing/selftests/vfio/vfio_dma_mapping_test.c:188:dma_map_unmap:Expected 0 (0) == mapping.pte (282394099815)
>   # dma_map_unmap: Test terminated by assertion
>   #          FAIL  vfio_dma_mapping_test.vfio_type1_iommu_anonymous_hugetlb_1gb.dma_map_unmap

I can't think of any reason this would fail, I think your tests have
found a real bug?? Can you check into it, what kernel call fails and
where does the kernel code come from?

I don't think I can run these tests with the HW I have??

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ