[PATCH v2 1/3] arm64: Avoid enabling KPTI unnecessarily
Mark Rutland
mark.rutland at arm.com
Tue Dec 12 09:16:12 PST 2023
On Mon, Dec 11, 2023 at 11:39:39AM +0000, Will Deacon wrote:
> On Tue, Nov 28, 2023 at 02:13:16PM +0000, Mark Rutland wrote:
> > On Tue, Nov 28, 2023 at 11:03:40AM +0000, Will Deacon wrote:
> > > On Mon, Nov 27, 2023 at 05:49:21PM +0000, Mark Rutland wrote:
> > > > If you want these cases moves back to alternatives-based feature check helpers,
> > > > I can go do that.
> > >
> > > I was thinking of something like the diff below to start with.
> >
> > Sure; as-is that breaks the hyp offset patching, and we'll need ensure we still
> > call hyp_mode_check() before apply_alternatives_all(). In hyp_mode_check() we
> > call kvm_compute_layout(), which generates the 'va_mask', 'tag_val', and
> > 'tag_lsb' values which are used by the kvm_update_va_mask() patching callback
> > (for kern_hyp_va() and __kern_hyp_va()).
> >
> > I think that can be moved before enable_cpu_capabilities() ratehr than needing
> > to be between enable_cpu_capabilities() and apply_alternatives_all(), but I'll
> > need to go digging to make certain.
> >
> > Do you want this as a cleanup for v6.7-rc*, or as something to queue for
> > v6.8-rc1?
>
> Sorry, I keep forgetting to reply to this after we spoke in-person. If
> you're able to spin something in the next day or so, I can pick it up for
> the next merge window. In the meantime, I'll grab Ard's changes so this can
> go on top.
I've sent that to:
https://lore.kernel.org/linux-arm-kernel/20231212170910.3745497-1-mark.rutland@arm.com/
... based on the arm64 for-next/fixes branch.
Mark.
More information about the linux-arm-kernel
mailing list