target-i386: Inline -cpu host check into cpu_x86_register()

Simplifies the upcoming cleanup of cpu_x86_find_by_name().

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386: Drop redundant list of CPU definitions

Since we are no longer parsing cpudefs from config files, only the array
of built-in definitions remains.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Really finally kill cpudef config section support

Commit 511c68d3af626cb0a39034cb77e7ac64d3a26c0c (finally kill cpudef
config section support) removed the cpudef parsing support but left
cpudef_* hooks behind. Remove those.

Since TYPE_X86_CPU currently is the only CPU class and CPUs are
instantiated exclusively through QOM (i.e., cpu_x86_init()), we can use
its class_init to bootstrap the list of model definitions until we have
these as subclasses. Avoid code movements for x86_cpudef_setup() to not
interfere with the various approaches to drop it in favor of subclasses.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
target-i386: Drop x86_def_t next field

Signed-off-by: Andreas Färber <afaerber@suse.de>
target-i386: Convert CPU definitions into X86CPU subclasses

TODO: sort classes for -cpu ?, generalize X86CPUListState, more testing

Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
target-i386: Turn Haswell into subclass of SandyBridge

  ehabkost: "When adding the Haswell CPU model, I intended to make it
  a superset of the features present on the SandyBridge model"

Inherit from SandyBridge to keep only the delta for Haswell.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Cc: Eduardo Habkost <ehabkost@redhat.com>