qemu/target-i386
Eduardo Habkost 5e891bf8fd target-i386: Use #defines instead of magic numbers for CPUID cache info
This is an attempt to make the CPUID cache topology code clearer, by
replacing the magic numbers in the code with #defines, and moving all
the cache information to the same place in the file.

I took care of comparing the assembly output of compiling
target-i386/cpu.c before and after applying this change, to make sure
not a single bit was changed on cpu_x86_cpuid() before and after
applying this patch (unfortunately I had to manually check existing
differences, because of __LINE__ expansions on
object_class_dynamic_cast_assert() calls).

This even keeps the code bug-compatible with the previous version: today
the cache information returned on AMD cache information leaves (CPUID
0x80000005 & 0x80000006) do not match the information returned on CPUID
leaves 2 and 4. The L2 cache information on CPUID leaf 2 also doesn't
match the information on CPUID leaf 2. The new constants should make it
easier to eventually fix those inconsistencies. All inconsistencies I
have found are documented in code comments.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: liguang <lig.fnst@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-09-03 12:25:56 +02:00
..
arch_dump.c dump: rebase from host-private RAMBlock offsets to guest-physical addresses 2013-08-08 11:01:46 -04:00
arch_memory_mapping.c
cc_helper.c
cc_helper_template.h
cpu-qom.h target-i386: Move hyperv_* static globals to X86CPU 2013-08-16 18:44:33 +02:00
cpu.c target-i386: Use #defines instead of magic numbers for CPUID cache info 2013-09-03 12:25:56 +02:00
cpu.h Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5 2013-08-29 17:21:51 -05:00
excp_helper.c
fpu_helper.c
gdbstub.c cpu: Introduce CPUClass::gdb_{read,write}_register() 2013-07-27 00:04:17 +02:00
helper.c cpu: Use QTAILQ for CPU list 2013-09-03 12:25:55 +02:00
helper.h
int_helper.c
ioport-user.c
kvm-stub.c
kvm.c Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5 2013-08-29 17:21:51 -05:00
kvm_i386.h
machine.c kvm: migrate vPMU state 2013-08-09 21:19:52 +02:00
Makefile.objs target-i386: Move hyperv_* static globals to X86CPU 2013-08-16 18:44:33 +02:00
mem_helper.c
misc_helper.c cpu: Use QTAILQ for CPU list 2013-09-03 12:25:55 +02:00
ops_sse.h
ops_sse_header.h
seg_helper.c
shift_helper_template.h
smm_helper.c
svm.h
svm_helper.c
TODO
topology.h
translate.c tcg: Change tcg_gen_exit_tb argument to uintptr_t 2013-09-02 09:08:30 -07:00