diff options
author | Andreas Färber <afaerber@suse.de> | 2014-03-04 03:17:10 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-03-13 19:20:46 +0100 |
commit | 9262685b818512215f0829f0dc95c2363898a1ad (patch) | |
tree | a45bd8ce1dbcb4eaecbe6ad67af4f91d49c94f28 /include/qom | |
parent | 1590bbcb02921dfe8e3cf66e3a3aafd31193babf (diff) |
cpu: Factor out cpu_generic_init()
All targets using it gain the ability to set -cpu name,key=value,...
options via the default TYPE_CPU CPUClass::parse_features() implementation.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'include/qom')
-rw-r--r-- | include/qom/cpu.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 3703b6864e..f5b0d7a8e1 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -352,6 +352,17 @@ void cpu_reset(CPUState *cpu); ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model); /** + * cpu_generic_init: + * @typename: The CPU base type. + * @cpu_model: The model string including optional parameters. + * + * Instantiates a CPU, processes optional parameters and realizes the CPU. + * + * Returns: A #CPUState or %NULL if an error occurred. + */ +CPUState *cpu_generic_init(const char *typename, const char *cpu_model); + +/** * cpu_has_work: * @cpu: The vCPU to check. * |