mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
s390x: Fix cpu normal reset ri clearing
As it turns out we need to clear the ri controls and PSW enablement bit to be architecture compliant. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20191203132813.2734-4-frankja@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
This commit is contained in:
parent
15b6c0370c
commit
e893baee70
2 changed files with 12 additions and 2 deletions
|
@ -100,7 +100,7 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type)
|
|||
case S390_CPU_RESET_INITIAL:
|
||||
/* initial reset does not clear everything! */
|
||||
memset(&env->start_initial_reset_fields, 0,
|
||||
offsetof(CPUS390XState, end_reset_fields) -
|
||||
offsetof(CPUS390XState, start_normal_reset_fields) -
|
||||
offsetof(CPUS390XState, start_initial_reset_fields));
|
||||
|
||||
/* architectured initial value for Breaking-Event-Address register */
|
||||
|
@ -123,6 +123,11 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type)
|
|||
&env->fpu_status);
|
||||
/* fall through */
|
||||
case S390_CPU_RESET_NORMAL:
|
||||
env->psw.mask &= ~PSW_MASK_RI;
|
||||
memset(&env->start_normal_reset_fields, 0,
|
||||
offsetof(CPUS390XState, end_reset_fields) -
|
||||
offsetof(CPUS390XState, start_normal_reset_fields));
|
||||
|
||||
env->pfault_token = -1UL;
|
||||
env->bpbc = false;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue