1. Overview
In this tutorial, we’ll go through the features supported by the CPUs installed on our system’s motherboard. Before we do that, we’ll briefly take a glance at the concept of virtual files.
Afterwards, we’ll cover the flags retrieved from the /proc/cpuinfo virtual file for different CPU manufacturers such as Intel, AMD, and ARM.
2. Virtual Files
A virtual file is a special type of file available on Linux-based operating systems. By reading virtual files, we can see what the Linux kernel is doing at the moment. So, they’re kind of lenses through which we can peek at the running Linux kernel. Unlike a regular file, virtual files don’t take space on the disk and are only created when we read them.
On most Linux distributions, virtual files are located in the /proc directory. We might need root access to read some of the virtual files. Let’s see what’s inside the /proc directory:
# ls -halF /proc
total 4.0K
-r--r--r-- 1 root root 56K Jul 13 00:18 config.gz
-r--r--r-- 1 root root 0 Jul 13 00:18 consoles
-r--r--r-- 1 root root 0 Jul 13 00:14 cpuinfo
-r--r--r-- 1 root root 0 Jul 13 00:14 devices
-r--r--r-- 1 root root 0 Jul 13 00:18 diskstats
-r--r--r-- 1 root root 0 Jul 13 00:18 filesystems
dr-xr-xr-x 5 root root 0 Jul 13 00:18 fs/
-r--r--r-- 1 root root 0 Jul 13 00:18 vmstat
-r--r--r-- 1 root root 0 Jul 13 00:18 zoneinfo
The command will list many files, but we’re only interested in the cpuinfo file, which happens to be inside the base directory.
3. /proc/cpuinfo Virtual File
The /proc/cpuinfo virtual file contains information about the CPUs currently available in our system’s motherboard. We’ll use the cat command to read the file:
# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 94
model name : Intel(R) Celeron(R) CPU G3900 @ 2.80GHz
stepping : 3
microcode : 0xea
cpu MHz : 899.999
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust erms invpcid rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d
vmx flags : vnmi preemption_timer invvpid ept_x_only ept_ad ept_1gb flexpriority tsc_offset vtpr mtf vapic ept vpid unrestricted_guest ple pml
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips : 5599.85
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
As we can see, it prints our CPU’s specification containing the flags field. In the next section, we’ll look at some of the important flags that can help us understand what our CPU can do.
4. Common Intel-Defined Flags
4.1. lm
The lm flag stands for Long Mode. It indicates that our CPU supports 64-bit architecture. For that reason, any x86-64 CPU will have this flag, unlike the 32-bit CPU.
4.2. vmx and svm
The vmx (Virtual Machine Extension) flag indicates that our Intel CPU has hardware support for virtual machines. Virtual machine software like VirtualBox leverages this extension for increased performance and other enhancements.
On the other hand, the svm flag serves the same purpose, but it’s only available for AMD CPUs.
4.3. smx
The smx (Safer Mode Extensions) flag is available on 64-bit processors. It’s a programming interface available in an Intel TXT platform, a chipset that provides enforcement of protection mechanisms.
4.4. hypervisor
The hypervisor flag indicates that the CPU has hardware support to run virtual machines. A virtual machine is software that runs and manages virtual operating systems. Some popular virtual machines out there include VirtualBox and VMware.
If a CPU lacks this flag, it’s highly likely that it won’t have the vmx or svm flag either.
4.5. pae
PAE (Physical Address Extension) is a memory management feature for x86-based processors. This feature allows our CPUs to access physical memory sizes greater than 4 GB. It’s available in most processors that were manufactured since 2003. Therefore, most modern operating systems support this feature.
4.6. pn
Intel’s processors have a unique serial number called pn, which is short for Processor Serial Number (PSN). This serial number is unique to every processor and is used by programs to identify individual processors.
4.7. acpi
The acronym ACPI stands for Advanced Configuration and Power Interface. Originally developed by Intel, Microsoft, and Toshiba, it’s a standard specification designed to allow the operating system to discover and configure hardware components. For instance, it’s used by our operating system to carry out power management of peripherals attached to the computer system.
The operating system also uses it to perform automatic configuration for plug-and-play devices and carry out status monitoring such as temperature information.
4.8. sse
SSE (Streaming SIMD Extension) is an extension for Intel-based processors. The SIMD acronym, in turn, stands for Single Instruction Multiple Data. The SSE enables our CPU to handle multiple data elements, thus increasing the performance through parallel processing. It’s mostly used in process-intensive applications like 3D graphics, computer vision, and digital signal processing.
4.9. sse2
SSE2 is the extended version of SSE. Unlike SSE, SSE2 is capable of handling 64-bit values. It has 144 more instructions and is capable of performing one task on multiple pieces of information simultaneously.
4.10. sse3
SSE3 is the third version of SSE and is also known as Prescott New Instructions (PNI). It has 13 new instructions and has improved performance for digital signal processing and 3D operations.
4.11. sse4_1 and sse4_2
SSE4 is the latest version of SSE and is also known by the term HD Boost. The flags sse4_1 and sse4_2 indicate SSE 4.1 and SSE 4.2, respectively. Both versions contain subsets of 54 new instructions.
4.12. ht
ht stands for Hyper-threading. Hyper-threading allows a CPU’s core to execute more than one thread in a parallel manner. As a result, it increases efficiency, thereby allowing us to run multiple programs simultaneously. However, the ht flag does not indicate that the CPU has Hyper-threading enabled. It merely indicates that the CPU is Hyper-threading capable.
4.13. tm
Thermal Monitor is a feature in Intel CPUs that reduces its thermal output by reducing its clock speed. Therefore, the CPU can perform thermal management when the processor’s temperature rises above a certain limit. Certainly, it can reduce the CPU performance but prevents it from being damaged.
Furthermore, this feature can be enabled in the BIOS settings.
4.14. pdcm
The pdcm flag in Intel CPUs is an abbreviation for Performance and Debugging Capability MSR. MSR, in turn, stands for Model-Specific Register. As the name suggests, a special register can be used to carry out debugging, program execution tracing, benchmarks, and performance monitoring.
5. Common AMD-Defined Flags
5.1. mp
The mp flag in AMD CPUs stands for Multiprocessing. Multiprocessing allows our system to execute multiple processes simultaneously because the system is capable of supporting more than one processor and allocating tasks among them. As a result, it can provide us with more enhanced throughput and a reliable system because if one of the processors fails, the system will not halt.
5.2. lm
As in Intel CPUs, the lm flag stands for Long Mode. When an AMD CPU has Long Mode support, it is 64-bit capable.
5.3. abm
abm stands for Advanced Bit Manipulation. It’s an extension in both Intel and AMD processors that provides improved speed of bit manipulation.
5.4. sse4a
SSE4A is a Streaming SIMD Extension that contains 4 SIMD instructions in AMD processors.
6. Common ARM-Defined Flags
6.1. 26bit
The 26bit flag indicates the processor support 26-bit-wide data. This flag is not available in the newer ARM processors.
6.2. java
The java flag in ARM processors indicates the Jazelle DBX extension. The Java Virtual Machine (JVM) takes advantage of this extension to carry out hardware-accelerated bytecode execution, thus, allowing our programs to perform faster.
6.3. neon
This flag is also known as Advanced SIMD Extension. This extension provides acceleration for media and digital signal processing programs such as video games and camera apps. On 32-bit ARM processors, it will be indicated as neon while 64-bit ARM processors will signal it through the asimd flag.
Furthermore, it should be noted that the older Linux kernels will indicate it through the asimd flag, regardless of the processor architecture.
6.4. lpae
The lpae flag points out that our processor supports Large Physical Address Extension, which allows us to have more than 4 GB of physical memory on 32-bit processors.
6.5. thumb
Thumb is an instruction set supported by some of the ARM processors. Thumb instructions are 16-bit wide and allow for code to be smaller and faster if our physical memory is slow.
7. Linux-defined Flags
7.1. tsc_reliable
TSC stands for Time Stamp Counter, which counts the number of CPU cycles since its reset. This flag indicates that the TSC register is known to be reliable. This flag exists because TSC cannot be reliable when a system has multi-core CPUs since there is no promise that the counter for multiple CPUs will be synchronized.
7.3. acc_power
The acc_power flag on AMD CPUs suggests that our CPU can calculate the average power consumption for the processor. It’s an abbreviation for AMD Accumulated Power Reporting Mechanism.
8. Conclusion
In this article, we familiarized ourselves with the concept of virtual files and what the /proc/cpuinfo virtual file is about. Afterwards, we went through some of the important flags for CPUs that can be retrieved from the /proc/cpuinfo virtual file.
We took a look at Intel-defined flags alongside AMD and ARM-defined flags. Lastly, we went through a couple of flags that Linux itself defines.