为什么 /proc/cpuinfo 显示同一 CPU 上内核的不同标志?

为什么 /proc/cpuinfo 显示同一 CPU 上内核的不同标志?

系统上的 cat /proc/cpuinfo 为我的 2 个核心提供了不同的标志。有人能解释一下为什么吗?我正在运行 Ubuntu 10.10 内核 2.6.35-24-generic。

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 CPU         E8400  @ 3.00GHz
stepping        : 10
cpu MHz         : 2999.820
cache size      : 6144 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
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 lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni monitor tm2 ssse3 lahf_lm dts
bogomips        : 5999.64
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 CPU         E8400  @ 3.00GHz
stepping        : 10
cpu MHz         : 2999.820
cache size      : 6144 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
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 lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority
bogomips        : 6000.04
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

我在尝试为 KVM 配置系统时注意到了这个问题。我无法加载 kvm_intel 模块,我也不知道为什么会这样。其中一个 cpu 标志显示我支持 vmx,但另一个则不支持。

谢谢

答案1

您是否尝试过启动不同的内核/发行版?也许这只是一个内核错误。尝试使用 fedora LiveCD,它应该与您的 Ubuntu 完全不同。

答案2

看起来第二个 CPU 有这些额外的标志(来自的评论linux-2.6.38-rc1/arch/x86/include/asm/cpufeature.h):

dtes64 - 64-bit debug store
ds_cpl - CPL Qual. Debug Store
vmx - hardware virtualization
smx - safer mode
est - enhanced speedstep
cx16 - CMPXCHG16B
xtpr - send tax priority messages
pdcm - performance capabilities
sse4_1 - sse 
xsave - XSAVE/XRSTOR/XSETBV/XGETBV
tpr_shadow - Intel TPR shadow
vnmi - Intel virtual NMI
flexpriority - Intel Flex Priority

我无法得出结论。其中很多似乎与虚拟化有关,但我只能看到这些。

您是否有可能在 BIOS 中为第二个 CPU 禁用了其中一些功能?您是否在启动时传递了任何可能影响处理器配置的内核参数?这就是我能想到的全部。

有关 CPU 标志的旧 Server Fault 问题似乎相关但没有帮助。

相关内容