[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 07/12] target-i386: Filter KVM and 0xC0000001 fea
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH v3 07/12] target-i386: Filter KVM and 0xC0000001 features on TCG |
Date: |
Wed, 23 Apr 2014 17:29:35 -0300 |
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 <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
Changes v1 -> v2:
* Trivial rebase to latest qom-cpu (commit 90c5d39c)
(Reviewed-by line kept)
Changes v2 -> v3:
* Trivial rebase after QEMU 2.0 (onto commit 2d03b49)
(Reviewed-by line kept)
---
target-i386/cpu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 6358b7c..f8973de 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -581,7 +581,9 @@ struct X86CPUDefinition {
CPUID_EXT2_PDPE1GB */
#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:
@@ -2593,6 +2595,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,
--
1.9.0
- [Qemu-devel] [PATCH v3 09/12] target-i386: Loop-based feature word filtering in TCG mode, (continued)
- [Qemu-devel] [PATCH v3 09/12] target-i386: Loop-based feature word filtering in TCG mode, Eduardo Habkost, 2014/04/23
- [Qemu-devel] [PATCH v3 11/12] target-i386: support "invariant tsc" flag, Eduardo Habkost, 2014/04/23
- [Qemu-devel] [PATCH v3 08/12] target-i386: Define TCG_*_FEATURES earlier on cpu.c, Eduardo Habkost, 2014/04/23
- [Qemu-devel] [PATCH v3 12/12] target-i386: Support "-cpu host" in TCG mode, Eduardo Habkost, 2014/04/23
- [Qemu-devel] [PATCH v3 05/12] target-i386: Make TCG feature filtering more readable, Eduardo Habkost, 2014/04/23
- [Qemu-devel] [PATCH v3 03/12] target-i386: Pass FeatureWord argument to report_unavailable_features(), Eduardo Habkost, 2014/04/23
- [Qemu-devel] [PATCH v3 06/12] target-i386: Filter FEAT_7_0_EBX TCG features too, Eduardo Habkost, 2014/04/23
- Re: [Qemu-devel] [PATCH v3 00/12] target-i386: Support check/enforce flags & -cpu host in TCG mode, too, Eduardo Habkost, 2014/04/23
- [Qemu-devel] [PATCH v3 07/12] target-i386: Filter KVM and 0xC0000001 features on TCG,
Eduardo Habkost <=