Bug 1186402 - Haswell and Broadwell CPU models contain unavailable features (HLE and RTM)
Summary: Haswell and Broadwell CPU models contain unavailable features (HLE and RTM)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Eduardo Habkost
QA Contact: Virtualization Bugs
URL: http://www.intel.com/content/dam/www/...
Whiteboard:
Depends On:
Blocks: 1186405
TreeView+ depends on / blocked
 
Reported: 2015-01-27 15:45 UTC by Eduardo Habkost
Modified: 2018-02-21 06:30 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-rhev-2.3.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1186405 (view as bug list)
Environment:
Last Closed: 2015-12-04 16:25:58 UTC
Target Upstream Version:


Attachments (Terms of Use)
/usr/src/debug/qemu-2.3.0/target-i386/cpu.c (103.71 KB, text/x-csrc)
2015-08-06 05:16 UTC, weliao
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1183960 None None None 2019-07-19 13:06:59 UTC
Red Hat Knowledge Base (Solution) 1345113 None None None 2016-09-27 00:24:59 UTC
Red Hat Product Errata RHBA-2015:2546 normal SHIPPED_LIVE qemu-kvm-rhev bug fix and enhancement update 2015-12-04 21:11:56 UTC

Internal Links: 1183960

Description Eduardo Habkost 2015-01-27 15:45:09 UTC
A microcode update from Intel disables the HLE and RTM features on Haswell and some Broadwell CPUs. This makes the existing Haswell and Broadwell CPU definitions not runnable on those CPUs after the microcode update. The Haswell and Broadwell CPU models in QEMU need to be updated to not contain those features.

Comment 1 Eduardo Habkost 2015-01-27 16:58:41 UTC
Upstream fix:

commit 13704e4c455770d500d6b87b117e32f0d01252c9
Author: Eduardo Habkost <ehabkost@redhat.com>
Date:   Thu Jan 22 17:22:54 2015 -0200

    target-i386: Disable HLE and RTM on Haswell & Broadwell
    
    All Haswell CPUs and some Broadwell CPUs were updated by Intel to have
    the HLE and RTM features disabled. This will prevent
    "-cpu Haswell,enforce" and "-cpu Broadwell,enforce" from running out of
    the box on those CPUs.
    
    Disable those features by default on Broadwell and Haswell CPU models,
    starting on pc-*-2.3. Users who want to use those features can enable
    them explicitly on the command-line.
    
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Comment 2 Eduardo Habkost 2015-07-03 19:58:20 UTC
Upstream fix included in the 2.3.0 rebase.

Comment 5 weliao 2015-08-06 05:16:58 UTC
Created attachment 1059712 [details]
/usr/src/debug/qemu-2.3.0/target-i386/cpu.c

qemu-kvm-rhev-2.2.0-9.el7.x86_64 & qemu-kvm-rhev-2.3.0-15.el7.x86_64
result all show display :
[root@intel-wildcatpass-06 qemu]# /usr/libexec/qemu-kvm -cpu Broadwell,enforce
warning: host doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
warning: host doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
qemu-kvm: Host doesn't support requested features

and at /usr/src/debug/qemu-2.3.0/target-i386/cpu.c(qemu-kvm-rhev-2.3.0-15.el7.x86_64) I saw have HLE and RTM feature

        .features[FEAT_7_0_EBX] =
            CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
            CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
            CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
            CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
            CPUID_7_0_EBX_SMAP,
        .features[FEAT_XSAVE] =
            CPUID_XSAVE_XSAVEOPT,
        .xlevel = 0x8000000A,
        .model_id = "Intel Core Processor (Broadwell)",

can you tell me what to do in this bug ,thank you

Comment 6 Eduardo Habkost 2015-08-18 21:48:54 UTC
There's a new upstream fix replacing the one mentioned at comment #1:

commit a356850b80b3d13b2ef737dad2acb05e6da03753
Author: Eduardo Habkost <ehabkost@redhat.com>
Date:   Fri Mar 13 15:58:09 2015 -0300

    target-i386: Haswell-noTSX and Broadwell-noTSX
    
    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.
    
    Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
    Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Broadwell and Haswell will keep including HLE and RTM. Users without HLE and RTM support in the host should use Broadwell-noTSX or Haswell-noTSX.

Comment 7 weliao 2015-08-27 07:11:14 UTC
Verified this bug with tested two scenarios.

For Broadwell cpu model
S1: Launch guest with -cpu Broadwell,enforce

1.Saw host has RTM and HLE features
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 3dnowprefetch ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt

2.Saw cpu.c has RTM and HLE features
        .name = "Broadwell",
        .features[FEAT_7_0_EBX] =
            CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
            CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
            CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
            CPUID_7_0_EBX_RTM | CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
            CPUID_7_0_EBX_SMAP
3.Saw guest has RTM and HLE features
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 3dnowprefetch ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt

S2: Launch guest with -cpu Broadwell-noTSX,enforce

1.Saw host has RTM and HLE features
2.Saw cpu.c no RTM and HLE features
        .name = "Broadwell-noTSX",
        .features[FEAT_7_0_EBX] =
            CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
            CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
            CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
            CPUID_7_0_EBX_RDSEED | CPUID_7_0_EBX_ADX |
            CPUID_7_0_EBX_SMAP,
3.Saw guest no RTM and HLE features
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht 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 f16c rdrand hypervisor lahf_lm 3dnowprefetch fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt



For Haswell cpu model
S1: Launch guest with -cpu Haswell,enforce

1.Saw host has RTM and HLE features
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 3dnowprefetch ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt

2.Saw cpu.c has RTM and HLE features
        .name = "Haswell",
        .features[FEAT_7_0_EBX] =
            CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
            CPUID_7_0_EBX_HLE | CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
            CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID |
            CPUID_7_0_EBX_RTM,
3.Saw guest has RTM and HLE features
flags		: flags		: fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht 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 hle avx2 smep bmi2 erms invpcid rtm xsaveopt


S2: Launch guest with -cpu Haswell-noTSX,enforce

1.Saw host has RTM and HLE features
2.Saw cpu.c no RTM and HLE features
        .name = "Haswell-noTSX",
        .features[FEAT_7_0_EBX] =
            CPUID_7_0_EBX_FSGSBASE | CPUID_7_0_EBX_BMI1 |
            CPUID_7_0_EBX_AVX2 | CPUID_7_0_EBX_SMEP |
            CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ERMS | CPUID_7_0_EBX_INVPCID,
3.Saw guest no RTM and HLE features
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht 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 f16c rdrand hypervisor lahf_lm fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt

Two scenarios are tested on the same Broadwell host, The test result can verify this bug?

Comment 8 Eduardo Habkost 2015-08-27 18:43:34 UTC
(In reply to weliao from comment #7)
> Two scenarios are tested on the same Broadwell host, The test result can
> verify this bug?

Yes, this is the expected behavior.

Comment 9 juzhang 2015-08-31 02:58:00 UTC
According to comment7 and comment8, set this issue as verified.

Comment 11 errata-xmlrpc 2015-12-04 16:25:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2546.html


Note You need to log in before you can comment on or make changes to this bug.