qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] target-i386: emulate CPUID level of real har


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v2] target-i386: emulate CPUID level of real hardware
Date: Fri, 19 Jun 2015 12:52:48 -0300
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Jun 19, 2015 at 01:20:40PM +0200, Radim Krčmář wrote:
[...]
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index e142f75649d8..c335e230277b 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -307,6 +307,24 @@ static void pc_init1(MachineState *machine)
>  static void pc_compat_2_3(MachineState *machine)
>  {
>      savevm_skip_section_footers();
> +
> +    x86_cpu_compat_set_level("qemu64",   4);
> +    x86_cpu_compat_set_level("kvm64",    5);
> +    x86_cpu_compat_set_level("pentium3", 2);
> +    x86_cpu_compat_set_level("n270",     5);
> +    x86_cpu_compat_set_level("Conroe",   4);
> +    x86_cpu_compat_set_level("Penryn",   4);
> +    x86_cpu_compat_set_level("Nehalem",  4);
> +
> +    x86_cpu_compat_set_xlevel("n270",            0x8000000a);
> +    x86_cpu_compat_set_xlevel("Penryn",          0x8000000a);
> +    x86_cpu_compat_set_xlevel("Nehalem",         0x8000000a);
> +    x86_cpu_compat_set_xlevel("Westmere",        0x8000000a);
> +    x86_cpu_compat_set_xlevel("SandyBridge",     0x8000000a);
> +    x86_cpu_compat_set_xlevel("Haswell",         0x8000000a);
> +    x86_cpu_compat_set_xlevel("Haswell-noTSX",   0x8000000a);
> +    x86_cpu_compat_set_xlevel("Broadwell",       0x8000000a);
> +    x86_cpu_compat_set_xlevel("Broadwell-noTSX", 0x8000000a);

We can simply use set the "level" and "xlevel" properties on
PC_COMPAT_2_3, we don't need the x86_cpu_compat_set_*level() functions.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]