diff options
author | Janosch Frank <frankja@linux.ibm.com> | 2020-04-29 10:35:15 -0400 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2020-04-30 16:52:14 +0200 |
commit | ccf6dd34be8b999bc9be5799baa7a841b54cbfbb (patch) | |
tree | d01ea9cf4cf03accad5a619c49901455c27c0a4b | |
parent | af9d06870cd43092c6f70bfa4d76ae7ace5d329c (diff) | |
download | kvm-unit-tests-ccf6dd34be8b999bc9be5799baa7a841b54cbfbb.tar.gz |
s390x: smp: Use full PSW to bringup new cpu
Up to now we ignored the psw mask and only used the psw address when
bringing up a new cpu. For DAT we need to also load the mask, so let's
do that.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200429143518.1360468-8-frankja@linux.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
-rw-r--r-- | lib/s390x/smp.c | 2 | ||||
-rw-r--r-- | s390x/cstart64.S | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c index df8dcd9..2860e9c 100644 --- a/lib/s390x/smp.c +++ b/lib/s390x/smp.c @@ -202,6 +202,8 @@ int smp_cpu_setup(uint16_t addr, struct psw psw) cpu->stack = (uint64_t *)alloc_pages(2); /* Start without DAT and any other mask bits. */ + cpu->lowcore->sw_int_psw.mask = psw.mask; + cpu->lowcore->sw_int_psw.addr = psw.addr; cpu->lowcore->sw_int_grs[14] = psw.addr; cpu->lowcore->sw_int_grs[15] = (uint64_t)cpu->stack + (PAGE_SIZE * 4); lc->restart_new_psw.mask = 0x0000000180000000UL; diff --git a/s390x/cstart64.S b/s390x/cstart64.S index ecffbe0..e084f13 100644 --- a/s390x/cstart64.S +++ b/s390x/cstart64.S @@ -161,7 +161,8 @@ smp_cpu_setup_state: lctlg %c0, %c0, GEN_LC_SW_INT_CRS /* We should only go once through cpu setup and not for every restart */ stg %r14, GEN_LC_RESTART_NEW_PSW + 8 - brasl %r14, %r14 + larl %r14, 0f + lpswe GEN_LC_SW_INT_PSW /* If the function returns, just loop here */ 0: j 0 |