Lines Matching full:ms
45 MachineState *ms = MACHINE(x86ms); in init_topo_info() local
47 topo_info->dies_per_pkg = ms->smp.dies; in init_topo_info()
54 topo_info->modules_per_die = ms->smp.modules; in init_topo_info()
55 topo_info->cores_per_module = ms->smp.cores; in init_topo_info()
56 topo_info->threads_per_core = ms->smp.threads; in init_topo_info()
78 x86_cpu_index_to_props(MachineState *ms, unsigned cpu_index) in x86_cpu_index_to_props() argument
80 MachineClass *mc = MACHINE_GET_CLASS(ms); in x86_cpu_index_to_props()
81 const CPUArchIdList *possible_cpus = mc->possible_cpu_arch_ids(ms); in x86_cpu_index_to_props()
87 static int64_t x86_get_default_cpu_node_id(const MachineState *ms, int idx) in x86_get_default_cpu_node_id() argument
90 X86MachineState *x86ms = X86_MACHINE(ms); in x86_get_default_cpu_node_id()
95 assert(idx < ms->possible_cpus->len); in x86_get_default_cpu_node_id()
96 x86_topo_ids_from_apicid(ms->possible_cpus->cpus[idx].arch_id, in x86_get_default_cpu_node_id()
98 return topo_ids.pkg_id % ms->numa_state->num_nodes; in x86_get_default_cpu_node_id()
101 static const CPUArchIdList *x86_possible_cpu_arch_ids(MachineState *ms) in x86_possible_cpu_arch_ids() argument
103 X86MachineState *x86ms = X86_MACHINE(ms); in x86_possible_cpu_arch_ids()
104 unsigned int max_cpus = ms->smp.max_cpus; in x86_possible_cpu_arch_ids()
108 if (ms->possible_cpus) { in x86_possible_cpu_arch_ids()
113 assert(ms->possible_cpus->len == max_cpus); in x86_possible_cpu_arch_ids()
114 return ms->possible_cpus; in x86_possible_cpu_arch_ids()
117 ms->possible_cpus = g_malloc0(sizeof(CPUArchIdList) + in x86_possible_cpu_arch_ids()
119 ms->possible_cpus->len = max_cpus; in x86_possible_cpu_arch_ids()
123 for (i = 0; i < ms->possible_cpus->len; i++) { in x86_possible_cpu_arch_ids()
126 ms->possible_cpus->cpus[i].type = ms->cpu_type; in x86_possible_cpu_arch_ids()
127 ms->possible_cpus->cpus[i].vcpus_count = 1; in x86_possible_cpu_arch_ids()
128 ms->possible_cpus->cpus[i].arch_id = in x86_possible_cpu_arch_ids()
130 x86_topo_ids_from_apicid(ms->possible_cpus->cpus[i].arch_id, in x86_possible_cpu_arch_ids()
132 ms->possible_cpus->cpus[i].props.has_socket_id = true; in x86_possible_cpu_arch_ids()
133 ms->possible_cpus->cpus[i].props.socket_id = topo_ids.pkg_id; in x86_possible_cpu_arch_ids()
134 if (ms->smp.dies > 1) { in x86_possible_cpu_arch_ids()
135 ms->possible_cpus->cpus[i].props.has_die_id = true; in x86_possible_cpu_arch_ids()
136 ms->possible_cpus->cpus[i].props.die_id = topo_ids.die_id; in x86_possible_cpu_arch_ids()
138 if (ms->smp.modules > 1) { in x86_possible_cpu_arch_ids()
139 ms->possible_cpus->cpus[i].props.has_module_id = true; in x86_possible_cpu_arch_ids()
140 ms->possible_cpus->cpus[i].props.module_id = topo_ids.module_id; in x86_possible_cpu_arch_ids()
142 ms->possible_cpus->cpus[i].props.has_core_id = true; in x86_possible_cpu_arch_ids()
143 ms->possible_cpus->cpus[i].props.core_id = topo_ids.core_id; in x86_possible_cpu_arch_ids()
144 ms->possible_cpus->cpus[i].props.has_thread_id = true; in x86_possible_cpu_arch_ids()
145 ms->possible_cpus->cpus[i].props.thread_id = topo_ids.smt_id; in x86_possible_cpu_arch_ids()
147 return ms->possible_cpus; in x86_possible_cpu_arch_ids()
350 static int x86_kvm_type(MachineState *ms, const char *vm_type) in x86_kvm_type() argument
357 return kvm_enabled() ? kvm_get_vm_type(ms) : 0; in x86_kvm_type()