Lines Matching full:model
92 CPUDEF_INIT(0x3907, 14, 1, 47, 0x08000000U, "z14ZR1", "IBM z14 Model ZR1 GA1"),
106 /* features part of a base model but not relevant for finding a base model */
167 if (!cpu || !cpu->model) { in s390_get_hmfai()
170 return cpu->model->def->hmfai; in s390_get_hmfai()
181 if (!cpu || !cpu->model) { in s390_get_mha_pow()
184 return cpu->model->def->mha_pow; in s390_get_mha_pow()
196 if (!cpu || !cpu->model) { in s390_get_ibc_val()
199 unblocked_ibc = s390_ibc_from_cpu_model(cpu->model); in s390_get_ibc_val()
200 lowest_ibc = cpu->model->lowest_ibc; in s390_get_ibc_val()
212 if (!cpu || !cpu->model) { in s390_get_feat_block()
215 s390_fill_feat_block(cpu->model->features, type, data); in s390_get_feat_block()
226 if (!cpu || !cpu->model) { in s390_has_feat()
273 return test_bit(feat, cpu->model->features); in s390_has_feat()
316 /* see if the model satisfies the minimum features */ in s390_find_cpu_def()
319 * Ignore certain features that are in the base model, but not in s390_find_cpu_def()
328 /* stop the search if we found the exact model */ in s390_find_cpu_def()
338 /* prefer the model with the same cpu type, esp. don't take the BC for EC */ in s390_find_cpu_def()
406 /* exact same definition - list base model first */ in s390_cpu_list_compare()
437 static void check_consistency(const S390CPUModel *model) in check_consistency() argument
560 if (test_bit(dep[i][0], model->features) && in check_consistency()
561 !test_bit(dep[i][1], model->features)) { in check_consistency()
578 error_setg(errp, "%s. Maximum supported model in the current configuration: \'%s\'", in check_compat_model_failed()
584 const S390CPUModel *model, Error **errp) in check_compatibility() argument
589 if (model->def->gen > max_model->def->gen) { in check_compatibility()
592 } else if (model->def->gen == max_model->def->gen && in check_compatibility()
593 model->def->ec_ga > max_model->def->ec_ga) { in check_compatibility()
599 if (only_migratable && test_bit(S390_FEAT_UNPACK, model->features)) { in check_compatibility()
608 bitmap_andnot(missing, model->features, max_model->features, S390_FEAT_MAX); in check_compatibility()
615 error_prepend(errp, "Some features requested in the CPU model are not " in check_compatibility()
656 if (!cpu->model) { in s390_realize_cpu_model()
657 /* no host model support -> perform compatibility stuff */ in s390_realize_cpu_model()
669 cpu->model->lowest_ibc = max_model->lowest_ibc; in s390_realize_cpu_model()
670 cpu->model->cpu_id = max_model->cpu_id; in s390_realize_cpu_model()
671 cpu->model->cpu_id_format = max_model->cpu_id_format; in s390_realize_cpu_model()
672 cpu->model->cpu_ver = max_model->cpu_ver; in s390_realize_cpu_model()
674 check_consistency(cpu->model); in s390_realize_cpu_model()
675 if (!check_compatibility(max_model, cpu->model, errp)) { in s390_realize_cpu_model()
679 apply_cpu_model(cpu->model, errp); in s390_realize_cpu_model()
682 cpu->env.cpuid = s390_cpuid_from_cpu_model(cpu->model); in s390_realize_cpu_model()
697 if (!cpu->model) { in get_feature()
698 error_setg(errp, "Details about the host CPU model are not available, " in get_feature()
703 value = test_bit(feat, cpu->model->features); in get_feature()
719 } else if (!cpu->model) { in set_feature()
720 error_setg(errp, "Details about the host CPU model are not available, " in set_feature()
729 if (!test_bit(feat, cpu->model->def->full_feat)) { in set_feature()
730 error_setg(errp, "Feature '%s' is not available for CPU model '%s'," in set_feature()
732 name, cpu->model->def->name); in set_feature()
735 set_bit(feat, cpu->model->features); in set_feature()
737 clear_bit(feat, cpu->model->features); in set_feature()
750 if (!cpu->model) { in get_feature_group()
751 error_setg(errp, "Details about the host CPU model are not available, " in get_feature_group()
757 bitmap_and(tmp, cpu->model->features, def->feat, S390_FEAT_MAX); in get_feature_group()
775 } else if (!cpu->model) { in set_feature_group()
776 error_setg(errp, "Details about the host CPU model are not available, " in set_feature_group()
786 if (!bitmap_intersects(def->feat, cpu->model->def->full_feat, in set_feature_group()
788 error_setg(errp, "Group '%s' is not available for CPU model '%s'," in set_feature_group()
790 name, cpu->model->def->name); in set_feature_group()
793 bitmap_or(cpu->model->features, cpu->model->features, def->feat, in set_feature_group()
796 bitmap_andnot(cpu->model->features, cpu->model->features, def->feat, in set_feature_group()
806 cpu->model = g_malloc0(sizeof(*cpu->model)); in s390_cpu_model_initfn()
807 /* copy the model, so we can modify it */ in s390_cpu_model_initfn()
808 cpu->model->def = xcc->cpu_def; in s390_cpu_model_initfn()
810 /* base model - features will never change */ in s390_cpu_model_initfn()
811 bitmap_copy(cpu->model->features, cpu->model->def->base_feat, in s390_cpu_model_initfn()
814 /* latest model - features can change */ in s390_cpu_model_initfn()
815 bitmap_copy(cpu->model->features, in s390_cpu_model_initfn()
816 cpu->model->def->default_feat, S390_FEAT_MAX); in s390_cpu_model_initfn()
822 /* Set the qemu CPU model (on machine initialization). Must not be called
833 /* build the CPU model */ in s390_set_qemu_cpu_model()
843 cpu->model = g_malloc0(sizeof(*cpu->model)); in s390_qemu_cpu_model_initfn()
844 /* copy the CPU model so we can modify it */ in s390_qemu_cpu_model_initfn()
845 memcpy(cpu->model, &s390_qemu_cpu_model, sizeof(*cpu->model)); in s390_qemu_cpu_model_initfn()
855 /* "max" and "host" always work, even without CPU model support */ in s390_max_cpu_model_initfn()
868 cpu->model = g_new(S390CPUModel, 1); in s390_max_cpu_model_initfn()
869 /* copy the CPU model so we can modify it */ in s390_max_cpu_model_initfn()
870 memcpy(cpu->model, max_model, sizeof(*cpu->model)); in s390_max_cpu_model_initfn()
877 g_free(cpu->model); in s390_cpu_model_finalize()
878 cpu->model = NULL; in s390_cpu_model_finalize()
946 /* model that can change between QEMU versions */ in s390_cpu_model_class_init()
966 * The "max" model is neither static nor migration safe. Under KVM in s390_max_cpu_model_class_init()
967 * it represents the "host" model. Under TCG it represents the "qemu" CPU in s390_max_cpu_model_class_init()
968 * model of the latest QEMU machine. in s390_max_cpu_model_class_init()
974 /* Generate type name for a cpu model. Caller has to free the string. */
980 /* Generate type name for a base cpu model. Caller has to free the string. */
1063 /* initialize the qemu model with the maximum definition ("max" model) */ in register_types()