Lines Matching +full:s390x +full:- +full:linux +full:- +full:user

6  * Copyright (c) 2012 SUSE LINUX Products GmbH
26 #include "s390x-internal.h"
31 #include "qapi/qapi-types-machine.h"
33 #include "hw/qdev-properties.h"
34 #include "hw/qdev-properties-system.h"
36 #include "fpu/softfloat-helpers.h"
42 #include "hw/s390x/cpu-topology.h"
70 uint64_t old_mask = env->psw.mask; in s390_cpu_set_psw()
73 env->psw.addr = addr; in s390_cpu_set_psw()
74 env->psw.mask = mask; in s390_cpu_set_psw()
80 env->cc_op = (mask >> 44) & 3; in s390_cpu_set_psw()
84 env->int_pgm_ilen = 0; in s390_cpu_set_psw()
101 uint64_t r = env->psw.mask; in s390_cpu_get_psw_mask()
104 uint64_t cc = calc_cc(env, env->cc_op, env->cc_src, in s390_cpu_get_psw_mask()
105 env->cc_dst, env->cc_vr); in s390_cpu_get_psw_mask()
119 cpu->env.psw.addr = value; in s390_cpu_set_pc()
126 return cpu->env.psw.addr; in s390_cpu_get_pc()
139 if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { in s390_cpu_has_work()
155 value->u.s390x.cpu_state = s390_cpu->env.cpu_state; in s390_query_cpu_fast()
158 value->u.s390x.has_dedicated = true; in s390_query_cpu_fast()
159 value->u.s390x.dedicated = s390_cpu->env.dedicated; in s390_query_cpu_fast()
160 value->u.s390x.has_entitlement = true; in s390_query_cpu_fast()
161 value->u.s390x.entitlement = s390_cpu->env.entitlement; in s390_query_cpu_fast()
171 CPUS390XState *env = &cpu->env; in s390_cpu_reset_hold()
173 if (scc->parent_phases.hold) { in s390_cpu_reset_hold()
174 scc->parent_phases.hold(obj, type); in s390_cpu_reset_hold()
176 cpu->env.sigp_order = 0; in s390_cpu_reset_hold()
186 memset(&env->start_initial_reset_fields, 0, in s390_cpu_reset_hold()
187 offsetof(CPUS390XState, start_normal_reset_fields) - in s390_cpu_reset_hold()
190 /* architectured initial value for Breaking-Event-Address register */ in s390_cpu_reset_hold()
191 env->gbea = 1; in s390_cpu_reset_hold()
194 env->cregs[0] = CR0_RESET; in s390_cpu_reset_hold()
195 env->cregs[14] = CR14_RESET; in s390_cpu_reset_hold()
198 /* user mode should always be allowed to use the full FPU */ in s390_cpu_reset_hold()
199 env->cregs[0] |= CR0_AFP; in s390_cpu_reset_hold()
201 env->cregs[0] |= CR0_VECTOR; in s390_cpu_reset_hold()
207 &env->fpu_status); in s390_cpu_reset_hold()
208 set_float_2nan_prop_rule(float_2nan_prop_s_ab, &env->fpu_status); in s390_cpu_reset_hold()
211 env->psw.mask &= ~PSW_MASK_RI; in s390_cpu_reset_hold()
212 memset(&env->start_normal_reset_fields, 0, in s390_cpu_reset_hold()
213 offsetof(CPUS390XState, end_reset_fields) - in s390_cpu_reset_hold()
216 env->pfault_token = -1UL; in s390_cpu_reset_hold()
217 env->bpbc = false; in s390_cpu_reset_hold()
239 info->mach = bfd_mach_s390_64; in s390_cpu_disas_set_info()
240 info->cap_arch = CS_ARCH_SYSZ; in s390_cpu_disas_set_info()
241 info->cap_insn_unit = 2; in s390_cpu_disas_set_info()
242 info->cap_insn_split = 6; in s390_cpu_disas_set_info()
276 * CPU thread. CPU hotplug under single-threaded TCG will not work with in s390_cpu_realizefn()
286 scc->parent_realize(dev, &err); in s390_cpu_realizefn()
295 cs->exception_index = EXCP_HLT; in s390_cpu_initfn()
304 return "s390:64-bit"; in s390_gdb_arch_name()
309 DEFINE_PROP_UINT32("core-id", S390CPU, env.core_id, 0),
310 DEFINE_PROP_INT32("socket-id", S390CPU, env.socket_id, -1),
311 DEFINE_PROP_INT32("book-id", S390CPU, env.book_id, -1),
312 DEFINE_PROP_INT32("drawer-id", S390CPU, env.drawer_id, -1),
321 #include "hw/core/tcg-cpu-ops.h"
328 if (env->psw.addr & 1) { in cpu_get_tb_cpu_state()
333 env->int_pgm_ilen = 2; /* see s390_cpu_tlb_fill() */ in cpu_get_tb_cpu_state()
337 *pc = env->psw.addr; in cpu_get_tb_cpu_state()
338 *cs_base = env->ex_value; in cpu_get_tb_cpu_state()
340 flags = (env->psw.mask >> FLAG_MASK_PSW_SHIFT) & FLAG_MASK_PSW; in cpu_get_tb_cpu_state()
341 if (env->psw.mask & PSW_MASK_PER) { in cpu_get_tb_cpu_state()
342 flags |= env->cregs[9] & (FLAG_MASK_PER_BRANCH | in cpu_get_tb_cpu_state()
345 if ((env->cregs[9] & PER_CR9_EVENT_STORE) && in cpu_get_tb_cpu_state()
346 (env->cregs[9] & PER_CR9_EVENT_STORE_REAL)) { in cpu_get_tb_cpu_state()
350 if (env->cregs[0] & CR0_AFP) { in cpu_get_tb_cpu_state()
353 if (env->cregs[0] & CR0_VECTOR) { in cpu_get_tb_cpu_state()
385 &scc->parent_realize); in s390_cpu_class_init()
387 dc->user_creatable = true; in s390_cpu_class_init()
390 &scc->parent_phases); in s390_cpu_class_init()
392 cc->class_by_name = s390_cpu_class_by_name, in s390_cpu_class_init()
393 cc->has_work = s390_cpu_has_work; in s390_cpu_class_init()
394 cc->mmu_index = s390x_cpu_mmu_index; in s390_cpu_class_init()
395 cc->dump_state = s390_cpu_dump_state; in s390_cpu_class_init()
396 cc->query_cpu_fast = s390_query_cpu_fast; in s390_cpu_class_init()
397 cc->set_pc = s390_cpu_set_pc; in s390_cpu_class_init()
398 cc->get_pc = s390_cpu_get_pc; in s390_cpu_class_init()
399 cc->gdb_read_register = s390_cpu_gdb_read_register; in s390_cpu_class_init()
400 cc->gdb_write_register = s390_cpu_gdb_write_register; in s390_cpu_class_init()
404 cc->disas_set_info = s390_cpu_disas_set_info; in s390_cpu_class_init()
405 cc->gdb_core_xml_file = "s390x-core64.xml"; in s390_cpu_class_init()
406 cc->gdb_arch_name = s390_gdb_arch_name; in s390_cpu_class_init()
411 cc->tcg_ops = &s390_tcg_ops; in s390_cpu_class_init()