mirror_qemu/target-i386
Eduardo Habkost d940ee9b78 target-i386: X86CPU model subclasses
Register separate QOM types for each x86 CPU model.

This will allow management code to more easily probe what each CPU model
provides, by simply creating objects using the appropriate class name,
without having to restart QEMU.

This also allows us to eliminate the qdev_prop_set_globals_for_type()
hack to set CPU-model-specific global properties.

Instead of creating separate class_init functions for each class, I just
used class_data to store a pointer to the X86CPUDefinition struct for
each CPU model. This should make the patch shorter and easier to review.
Later we can gradually convert each X86CPUDefinition field to lists of
per-class property defaults.

The "host" CPU model is special, as the feature flags depend on KVM
being initialized. So it has its own class_init and instance_init
function, and feature flags are set on instance_init instead of
class_init.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Tested-by: Eduardo Habkost <ehabkost@redhat.com>
[AF: Limit the host CPU type to CONFIG_KVM as build fix]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13 19:20:07 +01:00
..
Makefile.objs Makefile.target: CONFIG_NO_* variables removed 2013-10-16 18:21:00 +02:00
TODO target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions 2012-01-11 09:55:28 +01: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 exec: Make ldq/ldub_*_phys input an AddressSpace 2014-02-11 22:57:00 +10:00
cc_helper.c target-i386: Fix CC_OP_CLR vs PF 2014-02-28 08:43:15 -08:00
cc_helper_template.h target-i386: Implement BLSR, BLSMSK, BLSI 2013-02-18 15:52:05 -08:00
cpu-qom.h target-i386: X86CPU model subclasses 2014-03-13 19:20:07 +01:00
cpu.c target-i386: X86CPU model subclasses 2014-03-13 19:20:07 +01:00
cpu.h target-i386: Introduce x86_cpu_compat_disable_kvm_features() 2014-03-13 19:01:49 +01:00
excp_helper.c target-i386/helper: remove EIP macro 2013-06-15 17:50:13 +00:00
fpu_helper.c target-i386: Fix SSE status flag corruption 2014-02-28 08:44:01 -08:00
gdbstub.c target-i386: Fix SSE status flag corruption 2014-02-28 08:44:01 -08:00
helper.c target-i386: Clean up ENV_GET_CPU() usage 2014-03-13 19:01:48 +01:00
helper.h target-i386: yield to another VCPU on PAUSE 2013-11-21 17:39:20 +01:00
int_helper.c target-i386/helper: remove EDX macro 2013-06-15 17:49:10 +00:00
ioport-user.c exec: move include files to include/exec/ 2012-12-19 08:31:31 +01:00
kvm-stub.c target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid() 2013-11-21 17:39:11 +01:00
kvm.c kvm: add support for hyper-v timers 2014-02-03 17:33:55 +01:00
kvm_i386.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
machine.c kvm: add support for hyper-v timers 2014-02-03 17:33:55 +01:00
mem_helper.c target-i386/helper: remove EDX macro 2013-06-15 17:49:10 +00:00
misc_helper.c target-i386: Move apic_state field from CPUX86State to X86CPU 2013-12-23 16:30:40 +01:00
ops_sse.h target-i386: add AES-NI instructions 2013-04-13 13:51:57 +02:00
ops_sse_header.h target-i386: add AES-NI instructions 2013-04-13 13:51:57 +02:00
seg_helper.c target-i386: Clean up ENV_GET_CPU() usage 2014-03-13 19:01:48 +01:00
shift_helper_template.h target-i386: compute eflags outside rcl/rcr helper 2013-02-18 15:03:56 -08:00
smm_helper.c target-i386: Clean up ENV_GET_CPU() usage 2014-03-13 19:01:48 +01:00
svm.h Use new macro QEMU_PACKED for packed structures 2011-09-03 10:45:59 +00:00
svm_helper.c target-i386: Clean up ENV_GET_CPU() usage 2014-03-13 19:01:48 +01:00
topology.h target-i386: Inline bitops_flsl 2013-02-16 11:12:29 +00:00
translate.c target-i386: Fix ucomis and comis memory access 2014-02-28 08:44:26 -08:00