summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-04-30 13:48:34 -0300
committerMichael Roth <mdroth@linux.vnet.ibm.com>2014-07-15 19:28:01 -0500
commit7a3cd5ab408d06fac4e1ae6aa88b823a48db085c (patch)
tree3ca9c5f91e075f340c9eec3d4a1bec0d0aea5809
parent8a93721d04a55b3f23d1594287fe812da01c0d31 (diff)
downloadqemu-7a3cd5ab408d06fac4e1ae6aa88b823a48db085c.tar.gz
target-i386: Filter FEAT_7_0_EBX TCG features too
The TCG_7_0_EBX_FEATURES macro was defined but never used (it even had a typo that was never noticed). Make the existing TCG feature filtering code use it. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber <afaerber@suse.de> (cherry picked from commit d0a70f46fa9a3257089a56f2f620b0eff868557f) Conflicts: target-i386/cpu.c *fixed simple context mismatch Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--target-i386/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 654a04e187..d6bc332156 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -539,7 +539,7 @@ typedef struct x86_def_t {
#define TCG_EXT3_FEATURES (CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM | \
CPUID_EXT3_CR8LEG | CPUID_EXT3_ABM | CPUID_EXT3_SSE4A)
#define TCG_SVM_FEATURES 0
-#define TCG_7_0_EBX_FEATURES (CPUID_7_0_EBX_SMEP | CPUID_7_0_EBX_SMAP \
+#define TCG_7_0_EBX_FEATURES (CPUID_7_0_EBX_SMEP | CPUID_7_0_EBX_SMAP | \
CPUID_7_0_EBX_BMI1 | CPUID_7_0_EBX_BMI2 | CPUID_7_0_EBX_ADX)
/* missing:
CPUID_7_0_EBX_FSGSBASE, CPUID_7_0_EBX_HLE, CPUID_7_0_EBX_AVX2,
@@ -2562,6 +2562,7 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
if (!kvm_enabled()) {
env->features[FEAT_1_EDX] &= TCG_FEATURES;
env->features[FEAT_1_ECX] &= TCG_EXT_FEATURES;
+ env->features[FEAT_7_0_EBX] &= TCG_7_0_EBX_FEATURES;
env->features[FEAT_8000_0001_EDX] &= (TCG_EXT2_FEATURES
#ifdef TARGET_X86_64
| CPUID_EXT2_SYSCALL | CPUID_EXT2_LM