]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
target-i386: Set AMD alias bits after filtering CPUID data
authorEduardo Habkost <ehabkost@redhat.com>
Fri, 15 Apr 2016 17:54:26 +0000 (14:54 -0300)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 18 Apr 2016 18:49:17 +0000 (15:49 -0300)
commit9997cf7bdac056aeed246613639675c5a9f8fdc2
treeb5443e0b49e2b344f7413562be429422f357b31a
parent92b674b62a1aec734280c9019cfb3b3745044b66
target-i386: Set AMD alias bits after filtering CPUID data

QEMU complains about -cpu host on an AMD machine:
  warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 0]
For bits 0,1,3,4,5,6,7,8,9,12,13,14,15,16,17,23,24.

KVM_GET_SUPPORTED_CPUID and and x86_cpu_get_migratable_flags()
don't handle the AMD CPUID aliases bits, making
x86_cpu_filter_features() print warnings and clear those CPUID
bits incorrectly.

To avoid hacking x86_cpu_get_migratable_flags() to handle
CPUID_EXT2_AMD_ALIASES (just like the existing hack inside
kvm_arch_get_supported_cpuid()), simply move the
CPUID_EXT2_AMD_ALIASES code in x86_cpu_realizefn() after the
x86_cpu_filter_features() call.

This will probably make the CPUID_EXT2_AMD_ALIASES hack in
kvm_arch_get_supported_cpuid() unnecessary, too. The hack will be
removed in a follow-up patch after v2.6.0.

Reported-by: Radim Krčmář <rkrcmar@redhat.com>
Tested-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
target-i386/cpu.c