[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/4] target-i386: add VME to all CPUs
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH 2/4] target-i386: add VME to all CPUs |
Date: |
Fri, 5 Dec 2014 16:32:51 -0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Fri, Dec 05, 2014 at 06:44:24PM +0100, Paolo Bonzini wrote:
> vm86 mode extensions date back to the 486. All models should have
> them.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
TCG doesn't support VME (that's probably why we didn't have it set on
most CPU models), and I would like to eventually make check/enforce mode
work on TCG as well.
I was going to suggest adding it to kvm_default_features instead, but as
we have existing models that have CPUID_VME already, let's be consistent
and add it to all of them (and deal with TCG check/enforce mode later,
if necessary).
> ---
> hw/i386/pc_piix.c | 15 +++++++++++++++
> hw/i386/pc_q35.c | 15 +++++++++++++++
> target-i386/cpu.c | 30 +++++++++++++++---------------
> 3 files changed, 45 insertions(+), 15 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index 5ad23d0..3f1524e 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -305,6 +305,21 @@ static void pc_init_pci(MachineState *machine)
>
> static void pc_compat_2_2(MachineState *machine)
> {
> + x86_cpu_compat_set_features("kvm64", FEAT_1_ECX, CPUID_EXT_VME, 0);
qemu/hw/i386/pc_piix.c:313:54: error:
‘CPUID_EXT_VME’ undeclared (first use in this function)
x86_cpu_compat_set_features("kvm64", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("kvm32", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("coreduo", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Conroe", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Penryn", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Nehalem", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("SandyBridge", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Haswell", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Broadwell", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Opteron_G1", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Opteron_G2", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Opteron_G3", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Opteron_G4", FEAT_1_ECX, CPUID_EXT_VME, 0);
> + x86_cpu_compat_set_features("Opteron_G5", FEAT_1_ECX, CPUID_EXT_VME, 0);
The features need to be _removed_ when running an older machine-type,
not added. It should be:
x86_cpu_compat_set_features(MODEL, FEAT_1_EDX, 0, CPUID_VME);
But the list of CPU models is correct, and matches what is being changed
on builtin_x86_defs[].
--
Eduardo