Re: [RFC PATCH 08/33] vfio: selftests: Validate 2M/1G HugeTLB are mapped as 2M/1G in IOMMU

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

 



On Sun, Jun 1, 2025 at 12:45 AM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxx> 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.





[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