mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-29 06:20:26 +00:00
target-i386: Disable VME by default with TCG
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 <ehabkost@redhat.com>
This commit is contained in:
parent
ee465a3ef7
commit
04d99c3c61
@ -1550,6 +1550,14 @@ static PropValue kvm_default_props[] = {
|
|||||||
{ NULL, NULL },
|
{ 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)
|
void x86_cpu_change_kvm_default(const char *prop, const char *value)
|
||||||
{
|
{
|
||||||
PropValue *pv;
|
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);
|
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;
|
env->features[FEAT_1_ECX] |= CPUID_EXT_HYPERVISOR;
|
||||||
|
Loading…
Reference in New Issue
Block a user