On Sun, Jun 1, 2025 at 12:45 AM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
On Sat, May 31, 2025 at 10:09:34PM +0300, Andy Shevchenko wrote:
On Fri, May 30, 2025 at 02:12:36PM -0700, David Matlack wrote:
On Fri, May 23, 2025 at 4:30 PM David Matlack dmatlack@google.com wrote:
...
if (access("/sys/kernel/debug/iommu/intel", F_OK))
return intel_iommu_mapping_get(bdf, iova, mapping);
Oops, this should be !access(...).
Hmm... Generally speaking that code is a hack. Is there any guarantee that debugfs mount point is fixed to /sys/kernel/debug ?
No, userspace can mount it anywhere :)
But the kernel does create the mount point at /sys/kernel/debug/ by default, so hopefully it does end up there if it is present in the system, so you should be able to rely on it for testing.
I'll leave the hard-coded path in there for now then. If/when someone wants to run these tests on a system where debugfs is mounted somewhere else, we can change the code to find the debugfs mount point instead. In the meantime, the test will still work on such a system, it will just skip the mapping level assertions.