qemu: Translate features in virQEMUCapsGetCPUFeatures
qemu: Translate features in virQEMUCapsGetCPUFeatures

Starting with QEMU 4.1 qemuMonitorCPUModelInfo structure in virQEMUCaps
stores only canonical feature names which may differ from the name used
by libvirt. We need translate these canonical names into libvirt names
for further consumption.

This fixes a bug in qemuConnectBaselineHypervisorCPU which would remove
all features for which libvirt's spelling differs from the QEMU's
preferred name. For example, the following result of
qemuConnectBaselineHypervisorCPU on my host with QEMU 4.1 is wrong:

    <cpu mode='custom' match='exact'>
      <model fallback='forbid'>Skylake-Client</model>
      <vendor>Intel</vendor>
      <feature policy='require' name='ss'/>
      <feature policy='require' name='vmx'/>
      <feature policy='require' name='hypervisor'/>
      <feature policy='require' name='clflushopt'/>
      <feature policy='require' name='umip'/>
      <feature policy='require' name='arch-capabilities'/>
      <feature policy='require' name='xsaves'/>
      <feature policy='require' name='pdpe1gb'/>
      <feature policy='require' name='invtsc'/>
      <feature policy='disable' name='pclmuldq'/>
      <feature policy='disable' name='lahf_lm'/>
    </cpu>

The 'pclmuldq' and 'lahf_lm' should not be disabled in the baseline CPU
as they are supported by QEMU on this host.

Signed-off-by: Jiri Denemark <62bdf77dc47919a4d59a91822129d14633cfca81@redhat.com>
Reviewed-by: Andrea Bolognani <3ada0bee826c753786fdbba72243dfba997094cf@redhat.com>

jardasgit/libvirt,olafhering/libvirt,libvirt/libvirt,crobinso/libvirt,crobinso/libvirt,fabianfreyer/libvirt,zippy2/libvirt,zippy2/libvirt,jardasgit/libvirt,nertpinx/libvirt,zippy2/libvirt,jardasgit/libvirt,nertpinx/libvirt,andreabolognani/libvirt,zippy2/libvirt,olafhering/libvirt,libvirt/libvirt,jfehlig/libvirt,jfehlig/libvirt,libvirt/libvirt,nertpinx/libvirt,jfehlig/libvirt,crobinso/libvirt,andreabolognani/libvirt,jardasgit/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,olafhering/libvirt,nertpinx/libvirt,libvirt/libvirt,crobinso/libvirt,olafhering/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,nertpinx/libvirt