[clug] Haswell CPU

George at Clug Clug at goproject.info
Thu Nov 23 10:08:40 UTC 2017



With the Intel microcode update that removed HLE and RTM, there will
be different kinds of Haswell and Broadwell CPUs out there: some that
still have the HLE and RTM features, and some that don't have the HLE
and RTM features. On both cases people may be willing to use the
pc-*-2.3 machine-types. So, to cover both cases, introduce
Haswell-noTSX and Broadwell-noTSX CPU models, for hosts that have
Haswell and Broadwell CPUs without TSX support.

I think is going on here is that your older version of libvirt is not
aware of the fact that Intel disabled TSX [1] in Haswell chips in a
microcode update which your processor has almost certainly received by
now. Libvirt only became aware of and advertised a Haswell-noTSX CPU
model in version 1.2.14 [2]. Because your CPU has had some features
disabled that libvirt uses for CPU type detection, it mistakenly
thinks it is a SandyBridge. On a current version of libvirt, it should
be correctly detected as Haswell-noTSX.

In practice, this should not really affect you at all, except for VMs
being unable to use the other features [3] introduced in Haswell and
not present in SandyBridge, but you can manually add these [4] to your
VM definition XML if you can't upgrade libvirt and really want them.
Keep in mind that you probably will also need to upgrade qemu. And at
that point you should probably just use a more current hypervisor.
found another workaround which doesn't require to upgrade libvirt. I
removed hle and rtm flags from the definition of Haswell in cpu
mapping xml file used by libvirt (/usr/share/libvirt/cpu_map.xml). And
then I restarted libvirt process. Then I rebooted VM and it showed
correct model name as Haswell.



QEMU 2.3 adds these new models to cover Haswell and Broadwell CPUs
with updated microcode. Luckily, they also reverted former the machine
type specific changes to existing models. And since these changes were
never released, we don't need to hack around them in libvirt.


[2] https://libvirt.org/news-2015.html
[4] https://libvirt.org/formatdomain.html#elementsCPU

More information about the linux mailing list