[clug] KVM and Haswell CPU

George at Clug Clug at goproject.info
Wed May 13 00:48:47 MDT 2015


    Hi,

Please excuse me if my first email did reach you, but since I have not
seen it arrive in my inbox, I expect that it got lost.

I am looking for comments from anyone who uses KVM on Haswell CPUs,
see below;

I have had issues with my Debian Jessie laptop running KVM not being
able to run Windows 10, further investigation showed that KVM on my
laptop though the Laptop's CPU was a SandyBridge, and not the Haswell
it actually was.

Research on the Internet led me to disable hle and rtm from the
Haswell definition in /usr/share/libvirt/cpu_map.xml, and then a
reboot and now KVM recognises the laptop's Haswell CPU.


http://wiki.qemu.org/ChangeLog/2.3
 x86

    New CPU model IvyBridge.
    Consistent with the latest Intel microcode, RTM and HLE have
been disabled on the Haswell and Broadwell CPU models. (will be
reverted before release)
    Support for defining maximum memory speed in "-smbios type=17"
command-line options.
    Reduced dependency on IASL by replacing pre-compiled binary
SSDT patching with dynamic SSDT generation with help of new AML API. 

https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1290361.html

Dear Maintainer,

The intel-microcode 3.20140913.1 update disables TSX-NI (transactional
memory instructions). When a server running libvirt is rebooted with
this update, libvirt no longer considers the machine to have a Haswell
CPU:

dietrich ~ # virsh capabilities | grep -A1 'x86_64'
      x86_64
      SandyBridge

This causes a problem as any VMs that require a Haswell CPU, which
would
have worked previously, now fail to start altogether. Commenting out
the
two cpuinfo flags relevant to TSX-NI from
/usr/share/libvirt/cpu_map.xml
fixes this for me:

# cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 60
model name    : Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz
stepping    : 3

# virsh capabilities | grep -A1 'x86_64'
      x86_64
      SandyBridge

==========================================================================

Checking KVM on my laptop showed "SandyBridge" as the CPU type

# virsh capabilities | egrep "/model|/vendor"
      SandyBridge
      Intel
      none
      dac

When checking, nested virtualisation was not enabled

# cat /sys/module/kvm_intel/parameters/nested 
N

I remarked out the hle and rtm settings and rebooted the laptop, then
checked once more to find the CPU is now recognised as a Haswell.

# nano /usr/share/libvirt/cpu_map.xml

    
      
      
      
      
      
      

      
      
      
      
      

    


# cat /sys/module/kvm_intel/parameters/nested 
Y

# virsh capabilities | egrep "/model|/vendor"
      Haswell
      Intel
      none
      dac

# cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 60
model name    : Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz
stepping    : 3
microcode    : 0x1c
cpu MHz        : 2989.000
cache size    : 6144 KB
physical id    : 0
siblings    : 8
core id        : 0
cpu cores    : 4
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 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
sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx
f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm
tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2
smep bmi2 erms invpcid
bogomips    : 5586.96
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual


Thanks,

George.ally was.ally was.



More information about the linux mailing list