diff options
author | Ram Pai <[email protected]> | 2019-08-19 23:13:20 -0300 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2019-08-30 09:55:40 +1000 |
commit | 256ba2c1689efd4f5383cf7ebe2f9970c198b79d (patch) | |
tree | 94a258b3beaf19687b753886117c659ed5cd333f /arch/powerpc/include/asm/ultravisor.h | |
parent | d5394c059da9786043934bed474562cde124e7d3 (diff) |
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 <[email protected]>
Signed-off-by: Thiago Jung Bauermann <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
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 */ |