qom: cpus: split cpu_generic_init() on feature parsing and cpu creation parts

it would allow to reuse feature parsing part in various machines
that have CPU features instead of re-implementing the same feature
parsing each time.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1505318697-77161-2-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Igor Mammedov 2017-09-13 18:04:53 +02:00 committed by Eduardo Habkost
parent 11ae6ed8af
commit 3c72234c98
2 changed files with 51 additions and 16 deletions

View file

@ -644,6 +644,27 @@ void cpu_reset(CPUState *cpu);
*/
ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model);
/**
* cpu_create:
* @typename: The CPU type.
*
* Instantiates a CPU and realizes the CPU.
*
* Returns: A #CPUState or %NULL if an error occurred.
*/
CPUState *cpu_create(const char *typename);
/**
* cpu_parse_cpu_model:
* @typename: The CPU base type or CPU type.
* @cpu_model: The model string including optional parameters.
*
* processes optional parameters and registers them as global properties
*
* Returns: type of CPU to create or %NULL if an error occurred.
*/
const char *cpu_parse_cpu_model(const char *typename, const char *cpu_model);
/**
* cpu_generic_init:
* @typename: The CPU base type.