#endif
}
-const char *parse_cpu_model(const char *cpu_model)
+const char *parse_cpu_option(const char *cpu_option)
{
ObjectClass *oc;
CPUClass *cc;
gchar **model_pieces;
const char *cpu_type;
- model_pieces = g_strsplit(cpu_model, ",", 2);
+ model_pieces = g_strsplit(cpu_option, ",", 2);
oc = cpu_class_by_name(CPU_RESOLVING_TYPE, model_pieces[0]);
if (oc == NULL) {
CPUState *cpu_create(const char *typename);
/**
- * parse_cpu_model:
- * @cpu_model: The model string including optional parameters.
+ * parse_cpu_option:
+ * @cpu_option: The -cpu option including optional parameters.
*
* processes optional parameters and registers them as global properties
*
* Returns: type of CPU to create or prints error and terminates process
* if an error occurred.
*/
-const char *parse_cpu_model(const char *cpu_model);
+const char *parse_cpu_option(const char *cpu_option);
/**
* cpu_has_work:
const char *optarg;
const char *loadvm = NULL;
MachineClass *machine_class;
- const char *cpu_model;
+ const char *cpu_option;
const char *vga_model = NULL;
const char *qtest_chrdev = NULL;
const char *qtest_log = NULL;
QLIST_INIT (&vm_change_state_head);
os_setup_early_signal_handling();
- cpu_model = NULL;
+ cpu_option = NULL;
snapshot = 0;
nb_nics = 0;
switch(popt->index) {
case QEMU_OPTION_cpu:
/* hw initialization will check this */
- cpu_model = optarg;
+ cpu_option = optarg;
break;
case QEMU_OPTION_hda:
case QEMU_OPTION_hdb:
qemu_set_hw_version(machine_class->hw_version);
}
- if (cpu_model && is_help_option(cpu_model)) {
- list_cpus(cpu_model);
+ if (cpu_option && is_help_option(cpu_option)) {
+ list_cpus(cpu_option);
exit(0);
}
* Global properties get set up by qdev_prop_register_global(),
* called from user_register_global_props(), and certain option
* desugaring. Also in CPU feature desugaring (buried in
- * parse_cpu_model()), which happens below this point, but may
+ * parse_cpu_option()), which happens below this point, but may
* only target the CPU type, which can only be created after
- * parse_cpu_model() returned the type.
+ * parse_cpu_option() returned the type.
*
* Machine compat properties: object_set_machine_compat_props().
* Accelerator compat props: object_set_accelerator_compat_props(),
/* parse features once if machine provides default cpu_type */
current_machine->cpu_type = machine_class->default_cpu_type;
- if (cpu_model) {
- current_machine->cpu_type = parse_cpu_model(cpu_model);
+ if (cpu_option) {
+ current_machine->cpu_type = parse_cpu_option(cpu_option);
}
parse_numa_opts(current_machine);