diff options
| author | Michael Ellerman <mpe@ellerman.id.au> | 2019-11-04 13:01:59 +0300 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-11-04 13:01:59 +0300 |
| commit | 7c202575ef63f1c67832acea2179f07f8a2cf7bc (patch) | |
| tree | d303274894a8163cad6cc4197135cab840963424 /arch/powerpc/kernel/prom_init.c | |
| parent | e44ff9ea8f4c8a90c82f7b85bd4f5e497c841960 (diff) | |
| parent | 7d6475051fb3d9339c5c760ed9883bc0a9048b21 (diff) | |
| download | linux-7c202575ef63f1c67832acea2179f07f8a2cf7bc.tar.xz | |
Merge branch 'fixes' into next
Merge our fixes branch, primarily to bring in the powernv CPU hotplug
warning fix.
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
| -rw-r--r-- | arch/powerpc/kernel/prom_init.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index a4e7762dd286..100f1b57ec2f 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -3249,7 +3249,20 @@ static void setup_secure_guest(unsigned long kbase, unsigned long fdt) /* Switch to secure mode. */ prom_printf("Switching to secure mode.\n"); + /* + * The ultravisor will do an integrity check of the kernel image but we + * relocated it so the check will fail. Restore the original image by + * relocating it back to the kernel virtual base address. + */ + if (IS_ENABLED(CONFIG_RELOCATABLE)) + relocate(KERNELBASE); + ret = enter_secure_mode(kbase, fdt); + + /* Relocate the kernel again. */ + if (IS_ENABLED(CONFIG_RELOCATABLE)) + relocate(kbase); + if (ret != U_SUCCESS) { prom_printf("Returned %d from switching to secure mode.\n", ret); prom_rtas_os_term("Switch to secure mode failed.\n"); |
