英特尔定义的CPU功能

405 阅读6分钟

英特尔定义的CPU功能

如果需要用到半虚拟化技术肯定就需要查看cpu是否支持了。查看方式就是cat /proc/cpuinfo 查看flags是否有vmx和svm。那这些flags都表示什么呢?

86

32位又名i386-i686​和64位又名amd64​。这些cpu基本就是你的工作站,笔记本电脑或服务器。

所有的flags

完整的flags列表位于文件的内核源代码中 arch/x86/include/asm/cpufeatures.h

英特尔定义的CPU功能

flags功能
fpuOnboard FPU (floating point support)
vmeVirtual 8086 mode enhancements
deDebugging Extensions (CR4.DE)
psePage Size Extensions (4MB memory pages)
tscTime Stamp Counter (RDTSC)
msrModel-Specific Registers (RDMSR, WRMSR)
paePhysical Address Extensions (support for more than 4GB of RAM)
mceMachine Check Exception
cx8CMPXCHG8 instruction (64-bit compare-and-swap)
apicOnboard APIC
sepSYSENTER/SYSEXIT
mtrrMemory Type Range Registers
pgePage Global Enable (global bit in PDEs and PTEs)
mcaMachine Check Architecture
cmovCMOV instructions (conditional move) (also FCMOV)
patPage Attribute Table
pse3636-bit PSEs (huge pages)
pnProcessor serial number
clflushCache Line Flush instruction
dtsDebug Store (buffer for debugging and profiling instructions)
acpiACPI via MSR (temperature monitoring and clock speed modulation)
mmxMultimedia Extensions
fxsrFXSAVE/FXRSTOR, CR4.OSFXSR
sseIntel SSE vector instructions
sse2SSE2
ssCPU self snoop
htHyper-Threading
tmAutomatic clock control (Thermal Monitor)
ia64Intel Itanium Architecture 64-bit (not to be confused with Intel’s 64-bit x86 architecture with flag x86-64 or “AMD64” bit indicated by flag lm)
pbePending Break Enable (PBE# pin) wakeup support

AMD-defined CPU features, CPUID level 0x80000001 See also Wikipedia and table 2-23 in Intel Advanced Vector Extensions Programming Reference

flags功能
syscallSYSCALL (Fast System Call) and SYSRET (Return From Fast System Call)
mpMultiprocessing Capable.
nxExecute Disable
mmxextAMD MMX extensions
fxsr_optFXSAVE/FXRSTOR optimizations
pdpe1gbOne GB pages (allows hugepagesz=1G)
rdtscpRead Time-Stamp Counter and Processor ID
lmLong Mode (x86-64 amd64, also known as Intel 64, i.e. 64-bit capable)
3dnowextAMD 3DNow! extensions
3dnow3DNow! (AMD vector instructions, competing with Intel’s SSE1)

Transmeta-defined CPU features, CPUID level 0x80860001

flags功能
recoveryCPU in recovery mode
longrunLongrun power control
lrtiLongRun table interface
Other features, Linux-defined mapping
cxmmxCyrix MMX extensions
k6_mtrrAMD K6 nonstandard MTRRs
cyrix_arrCyrix ARRs (= MTRRs)
centaur_mcrCentaur MCRs (= MTRRs)
constant_tscTSC ticks at a constant rate
upSMP kernel running on UP
artAlways-Running Timer
arch_perfmonIntel Architectural PerfMon
pebsPrecise-Event Based Sampling
btsBranch Trace Store
rep_goodrep microcode works well
acc_powerAMD accumulated power mechanism
noplThe NOPL (0F 1F) instructions
xtopologycpu topology enum extensions
tsc_reliableTSC is known to be reliable
nonstop_tscTSC does not stop in C states
cpuidCPU has CPUID instruction itself
extd_apicidhas extended APICID (8 bits)
amd_dcmmulti-node processor
aperfmperfAPERFMPERF
eagerfpuNon lazy FPU restore
nonstop_tsc_s3TSC doesn’t stop in S3 state
tsc_known_freqTSC has known frequency
mce_recoveryCPU has recoverable machine checks

Intel-defined CPU features, CPUID level 0x00000001 (ecx) See also Wikipedia and table 2-26 in Intel Advanced Vector Extensions Programming Reference

flags功能
pniSSE-3 (“Prescott New Instructions”)
pclmulqdqPerform a Carry-Less Multiplication of Quadword instruction — accelerator for GCM)
dtes6464-bit Debug Store
monitorMonitor/Mwait support (Intel SSE3 supplements)
ds_cplCPL Qual. Debug Store
vmxHardware virtualization, Intel VMX
smxSafer mode, TXT (TPM support)
estEnhanced SpeedStep
tm2Thermal Monitor 2
ssse3Supplemental SSE-3
cidContext ID
sdbgsilicon debug
fmaFused multiply-add
cx16CMPXCHG16B
xtprSend Task Priority Messages
pdcmPerformance Capabilities
pcidProcess Context Identifiers
dcaDirect Cache Access
sse4_1SSE-4.1
sse4_2SSE-4.2
x2apicx2APIC
movbeMove Data After Swapping Bytes instruction
popcntReturn the Count of Number of Bits Set to 1 instruction (Hamming weight, i.e. bit count)
tsc_deadline_timerTsc deadline timer
aes/aes-niAdvanced Encryption Standard (New Instructions)
xsaveSave Processor Extended States, also provides XGETBY,XRSTOR,XSETBY
avxAdvanced Vector Extensions
f16c16-bit fp conversions (CVT16)
rdrandRead Random Number from hardware random number generator instruction
hypervisorRunning on a hypervisor

VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001

flags功能
rngRandom Number Generator present (xstore)
rng_enRandom Number Generator enabled
aceon-CPU crypto (xcrypt)
ace_enon-CPU crypto enabled
ace2Advanced Cryptography Engine v2
ace2_enACE v2 enabled
phePadLock Hash Engine
phe_enPHE enabled
pmmPadLock Montgomery Multiplier
pmm_enPMM enabled

More extended AMD flags CPUID level 0x80000001, ecx

flags功能
lahf_lmLoad AH from Flags (LAHF) and Store AH into Flags (SAHF) in long mode
cmp_legacyIf yes HyperThreading not valid
svm“Secure virtual machine”, AMD-V
extapicExtended APIC space
cr8_legacyCR8 in 32-bit mode
abmAdvanced Bit Manipulation
sse4aSSE-4A
misalignsseindicates if a general-protection exception (#GP) is generated when some legacy SSE instructions operate on unaligned data. Also depends on CR0 and Alignment Checking bit
3dnowprefetch3DNow prefetch instructions
osvwindicates OS Visible Workaround, which allows the OS to work around processor errata.
ibsInstruction Based Sampling
xopextended AVX instructions
skinitSKINIT/STGI instructions
wdtWatchdog timer
lwpLight Weight Profiling
fma44 operands MAC instructions
tcetranslation cache extension
nodeid_msrNodeId MSR
tbmTrailing Bit Manipulation
topoextTopology Extensions CPUID leafs
perfctr_coreCore Performance Counter Extensions
perfctr_nbNB Performance Counter Extensions
bpextdata breakpoint extension
ptscperformance time-stamp counter
perfctr_l2L2 Performance Counter Extensions
mwaitxMWAIT extension (MONITORX/MWAITX)

Auxiliary flags, Linux defined - For features scattered in various CPUID levels

flags功能
ring3mwaitRing 3 MONITOR/MWAIT
cpuid_faultIntel CPUID faulting
cpbAMD Core Performance Boost
epbIA32_ENERGY_PERF_BIAS support
cat_l3Cache Allocation Technology L3
cat_l2Cache Allocation Technology L2
cdp_l3Code and Data Prioritization L3
invpcid_singleeffectively invpcid and CR4.PCIDE=1
hw_pstateAMD HW-PState
proc_feedbackAMD ProcFeedbackInterface
smeAMD Secure Memory Encryption
ptiKernel Page Table Isolation (Kaiser)
retpolineRetpoline mitigation for Spectre variant 2 (indirect branches)
retpoline_amdAMD Retpoline mitigation
intel_ppinIntel Processor Inventory Number
avx512_4vnniwAVX-512 Neural Network Instructions
avx512_4fmapsAVX-512 Multiply Accumulation Single precision
mbaMemory Bandwidth Allocation
rsb_ctxswFill RSB on context switches
Virtualization flagsLinux defined
tpr_shadowIntel TPR Shadow
vnmiIntel Virtual NMI
flexpriorityIntel FlexPriority
eptIntel Extended Page Table
vpidIntel Virtual Processor ID
vmmcallprefer VMMCALL to VMCALL

Intel-defined CPU features, CPUID level 0x00000007:0 (ebx)

flags功能
fsgsbase{RD/WR}{FS/GS}BASE instructions
tsc_adjustTSC adjustment MSR
bmi11st group bit manipulation extensions
hleHardware Lock Elision
avx2AVX2 instructions
smepSupervisor Mode Execution Protection
bmi22nd group bit manipulation extensions
ermsEnhanced REP MOVSB/STOSB
invpcidInvalidate Processor Context ID
rtmRestricted Transactional Memory
cqmCache QoS Monitoring
mpxMemory Protection Extension
rdt_aResource Director Technology Allocation
avx512fAVX-512 foundation
avx512dqAVX-512 Double/Quad instructions
rdseedThe RDSEED instruction
adxThe ADCX and ADOX instructions
smapSupervisor Mode Access Prevention
clflushoptCLFLUSHOPT instruction
clwbCLWB instruction
intel_ptIntel Processor Tracing
avx512pfAVX-512 Prefetch
avx512erAVX-512 Exponential and Reciprocal
avx512cdAVX-512 Conflict Detection
sha_niSHA1/SHA256 Instruction Extensions
avx512bwAVX-512 Byte/Word instructions
avx512vlAVX-512 128/256 Vector Length extensions

Extended state features, CPUID level 0x0000000d:1 (eax)

flags功能
xsaveoptOptimized XSAVE
xsavecXSAVEC
xgetbv1XGETBV with ECX = 1
xsavesXSAVES/XRSTORS

Intel-defined CPU QoS sub-leaf, CPUID level 0x0000000F:0 (edx)

flags功能
cqm_llcLLC QoS

Intel-defined CPU QoS sub-leaf, CPUID level 0x0000000F:1 (edx)

flags功能
cqm_occup_llcLLC occupancy monitoring
cqm_mbm_totalLLC total MBM monitoring
cqm_mbm_localLLC local MBM monitoring

AMD-defined CPU features, CPUID level 0x80000008 (ebx)

flags功能
clzeroCLZERO instruction
irperfinstructions retired performance counter
xsaveerptrAlways save/restore FP error pointers

Thermal and Power Management leaf, CPUID level 0x00000006 (eax)

flags功能
dtherm (formerly dts)digital thermal sensor
idaIntel Dynamic Acceleration
aratAlways Running APIC Timer
plnIntel Power Limit Notification
ptsIntel Package Thermal Status
hwpIntel Hardware P-states
hwp_notifyHWP notification
hwp_act_windowHWP Activity Window
hwp_eppHWP Energy Performance Preference
hwp_pkg_reqHWP package-level request

AMD SVM Feature Identification, CPUID level 0x8000000a (edx)

flags功能
nptAMD Nested Page Table support
lbrvAMD LBR Virtualization support
svm_lockAMD SVM locking MSR
nrip_saveAMD SVM next_rip save
tsc_scaleAMD TSC scaling support
vmcb_cleanAMD VMCB clean bits support
flushbyasidAMD flush-by-ASID support
decodeassistsAMD Decode Assists support
pausefilterAMD filtered pause intercept
pfthresholdAMD pause filter threshold
avicVirtual Interrupt Controller
vmsave_vmloadVirtual VMSAVE VMLOAD
vgifVirtual GIF

Intel-defined CPU features, CPUID level 0x00000007:0 (ecx)

flags功能
avx512vbmiAVX512 Vector Bit Manipulation instructions
umipUser Mode Instruction Protection
pkuProtection Keys for Userspace
ospkeOS Protection Keys Enable
avx512_vbmi2Additional AVX512 Vector Bit Manipulation instructions
gfniGalois Field New Instructions
vaesVector AES
vpclmulqdqCarry-Less Multiplication Double Quadword
avx512_vnniVector Neural Network Instructions
avx512_bitalgVPOPCNT[B,W] and VPSHUF-BITQMB instructions
avx512_vpopcntdqPOPCNT for vectors of DW/QW
la575-level page tables
rdpidRDPID instruction
AMD-defined CPU features, CPUID level 0x80000007 (ebx)
flags功能
overflow_recovMCA overflow recovery support
succoruncorrectable error containment and recovery
smcaScalable MCA

Detected CPU bugs (Linux-defined)

flags功能
f00fIntel F00F
fdivCPU FDIV
comaCyrix 6x86 coma
amd_tlb_mmatchtlb_mmatch AMD Erratum 383
amd_apic_c1eapic_c1e AMD Erratum 400
11apBad local APIC aka 11AP
fxsave_leakFXSAVE leaks FOP/FIP/FOP
clflush_monitorAAI65, CLFLUSH required before MONITOR
sysret_ss_attrsSYSRET doesn’t fix up SS attrs
espfix”” IRET to 16-bit SS corrupts ESP/RSP high bits
null_segNulling a selector preserves the base
swapgs_fenceSWAPGS without input dep on GS
monitorIPI required to wake up remote CPU
amd_e400CPU is among the affected by Erratum 400
cpu_meltdownCPU is affected by meltdown attack and needs kernel page table isolation
spectre_v1CPU is affected by Spectre variant 1 attack with conditional branches
spectre_v2CPU is affected by Spectre variant 2 attack with indirect branches
spec_store_bypassCPU is affected by the Speculative Store Bypass vulnerability (Spectre variant 4).