[libvirt-users] libvirt reported capabilities doesn't match /proc/cpuinfo while the model does match

Jiri Denemark jdenemar at redhat.com
Mon Oct 1 12:48:57 UTC 2018


On Sun, Sep 30, 2018 at 14:58:29 -0400, Braiam Peguero wrote:
> Hi,
> 
> According to virsh capabilities I only have the following cpu features:
> 
>     <cpu>
>       <arch>x86_64</arch>
>       <model>IvyBridge-IBRS</model>
>       <vendor>Intel</vendor>
>       <microcode version='32'/>
>       <topology sockets='1' cores='4' threads='1'/>
>       <feature name='ds'/>
>       <feature name='acpi'/>
>       <feature name='ss'/>
>       <feature name='ht'/>
>       <feature name='tm'/>
>       <feature name='pbe'/>
>       <feature name='dtes64'/>
>       <feature name='monitor'/>
>       <feature name='ds_cpl'/>
>       <feature name='vmx'/>
>       <feature name='smx'/>
>       <feature name='est'/>
>       <feature name='tm2'/>
>       <feature name='xtpr'/>
>       <feature name='pdcm'/>
>       <feature name='pcid'/>
>       <feature name='osxsave'/>
>       <feature name='arat'/>
>       <feature name='ssbd'/>
>       <feature name='xsaveopt'/>
>       <feature name='invtsc'/>
>       <pages unit='KiB' size='4'/>
>       <pages unit='KiB' size='2048'/>
>     </cpu>
> 
> Meanwhile, cpuinfo reports the following:
> 
> 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 rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
> xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor
> ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
> popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm
> cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority
> ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts flush_l1d
> bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf

The capabilities XML shows the host CPU info as a model + features and
in this context you can think about the model as a named set of
features. In other words, none of the features which form the
IvyBridge-IBRS CPU model will be shown in the capabilities XML. If you
want to see all features detected by libvirt, you can take the <cpu>
element from the capabilities XML and pass it to

    virsh cpu-baseline --features

command. The result will explicitly list all features even those
included in IvyBridge-IBRS CPU model.

But anyway, the CPU in the capbilites XML does not really describe what
a guest will get on that host. The virtual CPU depends no QEMU and KVM
capabilities. You can see what CPU model and features were used when
starting your domain by checking

    virsh dumpxml $DOMAIN

while the domain is running.

Jirka




More information about the libvirt-users mailing list