[RFC PATCH 2/6] powerpc/64s: Helpers to switch between linear and vmapped stack pointers
Nicholas Piggin
npiggin at gmail.com
Mon Nov 7 23:38:06 AEDT 2022
On Sat Nov 5, 2022 at 6:00 PM AEST, Christophe Leroy wrote:
>
>
> Le 04/11/2022 à 18:27, Andrew Donnellan a écrit :
> > powerpc unfortunately has too many places where we run stuff in real mode.
> >
> > With CONFIG_VMAP_STACK enabled, this means we need to be able to swap the
> > stack pointer to use the linear mapping when we enter a real mode section,
> > and back afterwards.
> >
> > Store the top bits of the stack pointer in both the linear map and the
> > vmalloc space in the PACA, and add some helper macros/functions to swap
> > between them.
>
> That may work when pagesize is 64k because stack is on a single page,
> but I doubt is works with 4k pages, because vmalloc may allocate non
> contiguous pages.
Yeah. This could be a first-stage though, and depend on 64k page size
and stack size, or !KVM or whatever. When the real-mode code is solved,
that could be relaxed.
Thanks,
Nick
More information about the Linuxppc-dev
mailing list