lkml.org 
[lkml]   [2021]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/18] arm64: kernel: add helper for booted at EL2 and not VHE
On Wed, 02 Jun 2021 02:33:52 +0100,
Pavel Tatashin <pasha.tatashin@soleen.com> wrote:
>
> On Tue, Jun 1, 2021 at 8:38 AM Marc Zyngier <maz@kernel.org> wrote:
> >
> > On Thu, 27 May 2021 16:05:12 +0100,
> > Pavel Tatashin <pasha.tatashin@soleen.com> wrote:
> > >
> > > Replace places that contain logic like this:
> > > is_hyp_mode_available() && !is_kernel_in_hyp_mode()
> > >
> > > With a dedicated boolean function is_hyp_callable(). This will be needed
> > > later in kexec in order to sooner switch back to EL2.
> >
> > This looks like the very definition of "run in nVHE mode", so I'd
> > rather you call it like this, rather than "callable", which is
> > extremely ambiguous (if running at EL2, I call it any time I want, for
> > free).
>
> Hi Marc,
>
> Naming is hard.

News flash!

> Are you proposing s/is_hyp_callable/run_in_nvhe_mode/ ? This is also
> not a very good name because it does not sound like a boolean, but
> instead that we know that there is nvhe mode available and we can
> switch to it.

No, what I suggest is "is_hyp_nvhe()", or something along those
lines. It clearly identifies that we are in control of EL2, and which
mode it is in.

M.

--
Without deviation from the norm, progress is not possible.

\
 
 \ /
  Last update: 2021-06-02 10:21    [W:0.059 / U:1.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site