]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/svm: Unshare all pages before kexecing a new kernel
authorRam Pai <linuxram@us.ibm.com>
Tue, 20 Aug 2019 02:13:20 +0000 (23:13 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 29 Aug 2019 23:55:40 +0000 (09:55 +1000)
commit757945ba5f0d93b2fd4a99d57295834b4bf80158
tree94a258b3beaf19687b753886117c659ed5cd333f
parent0289e77c557d4cbf496d4e0bc884378095ba8546
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
arch/powerpc/include/asm/ultravisor-api.h
arch/powerpc/include/asm/ultravisor.h
arch/powerpc/kernel/machine_kexec_64.c