Bug 1195061

Summary: KVM unsupported on Haswell CPUs
Product: [Fedora] Fedora Reporter: Joshua Rosen <bjrosen>
Component: kvmAssignee: Orphan Owner <extras-orphan>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 21CC: berrange, clalancette, ehabkost, extras-orphan, kchamart, markmc, quintela, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-23 10:29:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Joshua Rosen 2015-02-22 16:51:35 UTC
Description of problem: KVM doesn't work on Haswell systems.

The latest kernel update broke KVM. I have three Fedora boxs, two Haswells and an Ivy Bridge. The Ivy Bridge seems to be working, the Haswells aren't. The VMs are RHEL 6.6 clones (Scientific Linux 6.6).

Version-Release number of selected component (if applicable):

How reproducible:100%

Steps to Reproduce:
1.Start a virtual machine

Actual results: Unsupported CPU error

Expected results:

Additional info:
rror starting domain: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, hle

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1388, in startup
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 999, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: unsupported configuration: guest and host CPU are not compatible: Host CPU does not provide required features: rtm, hle

Comment 1 Kashyap Chamarthy 2015-02-23 10:29:30 UTC
This is already fixed upstream:


That said, pasting Jan Tomko's suggestion from another bug[1] which is a duplicate of this[2]: update the guest XML config manually to omit those features:

  $ virsh edit VM
  . . .

Disable the two CPU features:

  <cpu mode="custom" match="exact">
      <model fallback="forbid">Haswell</model>
      <feature policy='disable' name='rtm'/>
      <feature policy='disable' name='hle'/>

And a comment from: Josh Boyer 2015-02-10 08:51:03 EST 

  "As a bit more information, Intel pushed a firmware update that 
  disabled the rtm/hle operations entirely because the TSX support in
  Hgaswell is broken in the chip.  It works... until it doesn't.  Fedora
  includes that microcode update and it is applied during early boot

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1190307 -- 
    3.18.4-200.fc21 (and later) cause guest/host CPU compatibility failures

[2] https://bugzilla.redhat.com/show_bug.cgi?id=1182650 -- 
    Can't launch any VM : rtm and hle CPU features flags needed by 
    libvirt but not in /proc/cpuinfo

*** This bug has been marked as a duplicate of bug 1182650 ***