aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2014-04-30 13:48:35 -0300
committerAndreas Färber <afaerber@suse.de>2014-06-25 23:54:56 +0200
commit84a6c6cd40687598c7e85d7de8095e08b5e636d7 (patch)
treeb19e296c50ef08d16a37d7483081190ee385c71e /target-i386
parentd0a70f46fa9a3257089a56f2f620b0eff868557f (diff)
target-i386: Filter KVM and 0xC0000001 features on TCG
TCG doesn't support any of the feature flags on FEAT_KVM and FEAT_C000_0001_EDX feature words, so clear all bits on those feature words. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/cpu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 077df27b4b..38b007f304 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -585,7 +585,9 @@ struct X86CPUDefinition {
TCG_EXT2_X86_64_FEATURES)
#define TCG_EXT3_FEATURES (CPUID_EXT3_LAHF_LM | CPUID_EXT3_SVM | \
CPUID_EXT3_CR8LEG | CPUID_EXT3_ABM | CPUID_EXT3_SSE4A)
+#define TCG_EXT4_FEATURES 0
#define TCG_SVM_FEATURES 0
+#define TCG_KVM_FEATURES 0
#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:
@@ -2606,6 +2608,8 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
env->features[FEAT_8000_0001_EDX] &= TCG_EXT2_FEATURES;
env->features[FEAT_8000_0001_ECX] &= TCG_EXT3_FEATURES;
env->features[FEAT_SVM] &= TCG_SVM_FEATURES;
+ env->features[FEAT_KVM] &= TCG_KVM_FEATURES;
+ env->features[FEAT_C000_0001_EDX] &= TCG_EXT4_FEATURES;
} else {
if (x86_cpu_filter_features(cpu) && cpu->enforce_cpuid) {
error_setg(&local_err,