diff options
| author | Alexander Gordeev <[email protected]> | 2023-04-03 08:44:36 +0200 |
|---|---|---|
| committer | Vasily Gorbik <[email protected]> | 2023-04-19 17:24:15 +0200 |
| commit | 7a04d491edf4766e7724671355b1ab27cae81a4a (patch) | |
| tree | 26e760f5c0deb6b6b4925886d51c2b5037ee55d5 | |
| parent | 1a33aee1dc2476c5937a0890f2dfc228a165f364 (diff) | |
s390/kexec: turn DAT mode off immediately before purgatory
The kernel code is not guaranteed DAT-off mode safe.
Turn the DAT mode off immediately before entering the
purgatory.
Further, to avoid subtle side effects reset the system
immediately before turning DAT mode off while making
all necessary preparations in advance.
Signed-off-by: Alexander Gordeev <[email protected]>
Reviewed-by: Heiko Carstens <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
| -rw-r--r-- | arch/s390/kernel/machine_kexec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 2a8e73266428..eb473fc835b2 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -254,14 +254,13 @@ static void __do_machine_kexec(void *data) relocate_kernel_t data_mover; struct kimage *image = data; - s390_reset_system(); data_mover = (relocate_kernel_t) page_to_phys(image->control_code_page); - - __arch_local_irq_stnsm(0xfb); /* disable DAT - avoid no-execute */ - /* Call the moving routine */ diag308_subcode = DIAG308_CLEAR_RESET; if (sclp.has_iplcc) diag308_subcode |= DIAG308_FLAG_EI; + s390_reset_system(); + + __arch_local_irq_stnsm(0xfb); /* disable DAT - avoid no-execute */ (*data_mover)(&image->head, image->start, diag308_subcode); /* Die if kexec returns */ |