[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/21] target-i386: Disable VME by default with TCG
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 03/21] target-i386: Disable VME by default with TCG |
Date: |
Mon, 17 Oct 2016 15:51:20 -0200 |
VME is already disabled automatically when using TCG. So, instead
of pretending it is there when reporting CPU model data on
query-cpu-* QMP commands (making every CPU model to be reported
as not runnable), we can disable it by default on all CPU models
when using TCG.
Do that by adding a tcg_default_props array that will work like
kvm_default_props.
Signed-off-by: Eduardo Habkost <address@hidden>
---
target-i386/cpu.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index cad2759..25a3d80 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1550,6 +1550,14 @@ static PropValue kvm_default_props[] = {
{ NULL, NULL },
};
+/* TCG-specific defaults that override all CPU models when using TCG
+ */
+static PropValue tcg_default_props[] = {
+ { "vme", "off" },
+ { NULL, NULL },
+};
+
+
void x86_cpu_change_kvm_default(const char *prop, const char *value)
{
PropValue *pv;
@@ -2283,6 +2291,8 @@ static void x86_cpu_load_def(X86CPU *cpu,
X86CPUDefinition *def, Error **errp)
}
x86_cpu_apply_props(cpu, kvm_default_props);
+ } else if (tcg_enabled()) {
+ x86_cpu_apply_props(cpu, tcg_default_props);
}
env->features[FEAT_1_ECX] |= CPUID_EXT_HYPERVISOR;
--
2.7.4
- [Qemu-devel] [PULL 00/21] x86 queue, 2016-10-17, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 01/21] tests: Add test case for x86 feature parsing compatibility, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 02/21] target-i386: List CPU models using subclass list, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 03/21] target-i386: Disable VME by default with TCG,
Eduardo Habkost <=
- [Qemu-devel] [PULL 04/21] target-i386: Register aliases for feature names with underscores, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 06/21] target-i386: Remove underscores from feat_names arrays, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 07/21] target-i386: Register properties for feature aliases manually, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 05/21] target-i386: Make plus_features/minus_features QOM-based, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 08/21] target-i386: xsave: Add FP and SSE bits to x86_ext_save_areas, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 09/21] qmp: Add runnability information to query-cpu-definitions, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 11/21] apic: add global apic_get_class(), Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 10/21] target-i386: Move warning code outside x86_cpu_filter_features(), Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 12/21] apic: add send_msi() to APICCommonClass, Eduardo Habkost, 2016/10/17
- [Qemu-devel] [PULL 13/21] intel_iommu: pass whole remapped addresses to apic, Eduardo Habkost, 2016/10/17