unicorn/qemu
Igor Mammedov 733d60e6d7
vl.c: convert cpu_model to cpu type and set of global properties before machine_init()
All machines that support user specified cpu_model either call
cpu_generic_init() or cpu_class_by_name()/CPUClass::parse_features
to parse feature string and to get CPU type to create.

Which leads to code duplication and hard-codding default CPU model
within machine_foo_init() code. Which makes it impossible to
get CPU type before machine_init() is run.

So instead of setting default CPUs models and doing parsing in
target specific machine_foo_init() in various ways, provide
a generic data driven cpu_model parsing before machine_init()
is called.

in follow up per target patches, it will allow to:
* define default CPU type in consistent/generic manner
per machine type and drop custom code that fallbacks
to default if cpu_model is NULL
* drop custom features parsing in targets and do it
in centralized way.
* for cases of
cpu_generic_init(TYPE_BASE/DEFAULT_CPU, "some_cpu")
replace it with
cpu_create(machine->cpu_type) || cpu_create(TYPE_FOO)
depending if CPU type is user settable or not.
not doing useless parsing and clearly documenting where
CPU model is user settable or fixed one.

Patch allows machine subclasses to define default CPU type
per machine class at class_init() time and if that is set
generic code will parse cpu_model into a MachineState::cpu_type
which will be used to create CPUs for that machine instance
and allows gradual per board conversion.

Backports commit 6063d4c0f98b35a27ca018393d328a1825412a7e from qemu
2018-03-20 13:15:21 -04:00
..
accel cpu-exec: fix exception_index handling 2018-03-17 19:33:05 -04:00
crypto crypto: Clean up includes 2018-02-19 00:47:40 -05:00
default-configs
docs
fpu softfloat: fix crash on int conversion of SNaN 2018-03-09 11:40:17 -05:00
hw i386: keep cpu_model field in MachineState uptodate 2018-03-20 12:40:35 -04:00
include vl.c: convert cpu_model to cpu type and set of global properties before machine_init() 2018-03-20 13:15:21 -04:00
qapi qapi: Make more of qobject_to() 2018-03-20 11:05:44 -04:00
qobject qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
qom qom: cpus: split cpu_generic_init() on feature parsing and cpu creation parts 2018-03-20 13:09:04 -04:00
scripts qapi: Move qapi-schema.json to qapi/, rename generated files 2018-03-09 11:35:11 -05:00
target i386: keep cpu_model field in MachineState uptodate 2018-03-20 12:40:35 -04:00
tcg tcg/i386: Perform comparison pass against qemu 2018-03-20 06:29:06 -04:00
util membarrier: add --enable-membarrier 2018-03-17 19:30:43 -04:00
aarch64.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
aarch64eb.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
accel.c
arm.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
armeb.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
CODING_STYLE
configure use _Static_assert in QEMU_BUILD_BUG_ON 2018-03-20 10:42:20 -04:00
COPYING
COPYING.LIB
cpus.c
exec.c exec: Drop unnecessary code for unicorn 2018-03-12 10:11:46 -04:00
gen_all_header.sh
glib_compat.c memory: Share FlatView's and dispatch trees between address spaces 2018-03-11 22:05:44 -04:00
HACKING
header_gen.py qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
ioport.c
LICENSE
m68k.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
Makefile qapi: Don't create useless directory qapi-generated 2018-03-09 11:36:49 -05:00
Makefile.objs qapi: Move qapi-schema.json to qapi/, rename generated files 2018-03-09 11:35:11 -05:00
Makefile.target tcg: move tcg backend files into accel/tcg/ 2018-03-13 11:48:15 -04:00
memory_ldst.inc.c exec: Drop unnecessary code for unicorn 2018-03-12 10:11:46 -04:00
memory_mapping.c
memory.c memory: Share special empty FlatView 2018-03-11 22:34:28 -04:00
mips64.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
mips64el.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
mips.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
mipsel.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
powerpc.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
qemu-timer.c
rules.mak build-sys: silence make by default or V=0 2018-03-06 08:58:03 -05:00
sparc64.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
sparc.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00
unicorn_common.h memory: Share special empty FlatView 2018-03-11 22:34:28 -04:00
VERSION
vl.c vl.c: convert cpu_model to cpu type and set of global properties before machine_init() 2018-03-20 13:15:21 -04:00
vl.h
x86_64.h qobject: introduce qobject_get_try_str() 2018-03-20 11:10:03 -04:00