Hello libvirt-users,

I have an issue with libvirt on Centos 7.2 regarding CPU features seen by the Guest OS.

The physical Host is Dell PowerEdge R730 with Haswell CPU, with the following features

$ grep "model name" /proc/cpuinfo | tail -1
model name    : Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz

$ grep flags /proc/cpuinfo  | tail -1
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 arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc

Regarding libvirt configuration, we have the following features detected :

$ virsh capabilities | grep feature
      <feature name='invtsc'/>
      <feature name='abm'/>
      <feature name='pdpe1gb'/>
      <feature name='rdrand'/>
      <feature name='f16c'/>
      <feature name='osxsave'/>
      <feature name='dca'/>
      <feature name='pdcm'/>
      <feature name='xtpr'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='smx'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='monitor'/>
      <feature name='dtes64'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
      <feature name='vme'/>

We have created a VM named that is configured with match="exact"
$ virsh dumpxml compil | grep -A2 match
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Haswell-noTSX</model>
  </cpu>

However, on the guest side, there no feature such as f16c is detected

$ grep flag /proc/cpuinfo  | tail -1
flags        : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt

Is this normal ?
Should we use match="strict" to have the f16c feature seen by the guest OS ?

The xml file describing both the host and the guest are in attachment.

$ yum info libvirt
Modules complémentaires chargés : fastestmirror
Loading mirror speeds from cached hostfile
Paquets installés
Nom                 : libvirt
Architecture        : x86_64
Version             : 1.2.17
Révision            : 13.el7_2.4
Taille              : 0.0 
Dépôt               : installed
Depuis le dépôt     : updates
Résumé              : Library providing a simple virtualization API
URL                 : http://libvirt.org/
Licence             : LGPLv2+
Description         : Libvirt is a C toolkit to interact with the virtualization capabilities
                    : of recent versions of Linux (and other OSes). The main package includes
                    : the libvirtd server exporting the virtualization support.


Thanks in advance for any advices we can receive.

Best regards,

Laurent Pouilloux

-- 
Ingénieur en Calcul Scientifique
Laboratoire de Mécanique des Fluides et d'Acoustique
École Centrale de Lyon
36 Avenue Guy de Collongue, 69130 Écully
Batiment I11 - Bureau 11097W
Tél : 	04.72.18.61.57