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 <[email protected]> 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. thanks, greg k-h
