2014-05-27 14:29, Burakov, Anatoly: > > > I don't know if there is something defined in a Linux header which could > > > help to check if VFIO is supported. But in general, it's better to check > > > for a macro belonging to the feature instead of checking kernel version. > > > > Not sure VFIO defines any macros anywhere, but I'll look into it, thanks. > > There probably isn't. At least I don't see anything in commit log. So unless > there's a way to get config options from kernel at compile-time in > userspace code, I don't think we can do anything else than kernel version > check.
Isn't it sufficient to check VFIO_API_VERSION? -- Thomas