diff options
author | Ram Pai <linuxram@us.ibm.com> | 2019-08-20 05:13:20 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-08-30 02:55:40 +0300 |
commit | 256ba2c1689efd4f5383cf7ebe2f9970c198b79d (patch) | |
tree | 94a258b3beaf19687b753886117c659ed5cd333f /arch/powerpc/include/asm/ultravisor.h | |
parent | d5394c059da9786043934bed474562cde124e7d3 (diff) | |
download | linux-256ba2c1689efd4f5383cf7ebe2f9970c198b79d.tar.xz |
powerpc/pseries/svm: Unshare all pages before kexecing a new kernel
A new kernel deserves a clean slate. Any pages shared with the hypervisor
is unshared before invoking the new kernel. However there are exceptions.
If the new kernel is invoked to dump the current kernel, or if there is a
explicit request to preserve the state of the current kernel, unsharing
of pages is skipped.
NOTE: While testing crashkernel, make sure at least 256M is reserved for
crashkernel. Otherwise SWIOTLB allocation will fail and crash kernel will
fail to boot.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190820021326.6884-11-bauerman@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/ultravisor.h')
-rw-r--r-- | arch/powerpc/include/asm/ultravisor.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/ultravisor.h b/arch/powerpc/include/asm/ultravisor.h index e5c8413de06f..b1bc2e043ed4 100644 --- a/arch/powerpc/include/asm/ultravisor.h +++ b/arch/powerpc/include/asm/ultravisor.h @@ -41,4 +41,9 @@ static inline int uv_unshare_page(u64 pfn, u64 npages) return ucall_norets(UV_UNSHARE_PAGE, pfn, npages); } +static inline int uv_unshare_all_pages(void) +{ + return ucall_norets(UV_UNSHARE_ALL_PAGES); +} + #endif /* _ASM_POWERPC_ULTRAVISOR_H */ |