On Fri, Sep 25, 2020 at 07:16:31PM +0200, Borislav Petkov wrote: > On Wed, Sep 23, 2020 at 10:45:29AM +0800, Feng Tang wrote: > > > Rather than a tool, would additional file(s) in, say, > > > /sys/devices/system/cpu/cpu<n> be nicer? They could show the raw CPUID > > > features, one file per leaf or sub-leaf, maybe even along with whether > > > they were disabled at boot-time. > > > > My thought is we already have in-kernel powerful /proc/cpuinfo, while > > a user space tool could be more flexible for text parsing/layout, and > > show different info on user's demand/options. > > The important thing here is that a separate tool would be decoupled from > the kernel and thus will be independent from it, i.e., you can get the > tool and run it without having to install a new kernel. > > And with the CPUID leafs specified in a text file, you won't even need > to update the tool even - just cpuid.txt. It can't get any better than > that. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette
Ok. Another suggestion: while designing the format for the cpuid.txt file, would it be possible to include enough information for cpufeatures.h to be auto-generated from it?