Thread (27 messages) 27 messages, 2 authors, 2021-06-08

Re: [PATCH 04/18] arm64: kernel: add helper for booted at EL2 and not VHE

From: Marc Zyngier <maz@kernel.org>
Date: 2021-06-02 08:21:02
Also in: kexec, linux-arm-kernel, lkml

On Wed, 02 Jun 2021 02:33:52 +0100,
Pavel Tatashin [off-list ref] wrote:
On Tue, Jun 1, 2021 at 8:38 AM Marc Zyngier [off-list ref] wrote:
quoted
On Thu, 27 May 2021 16:05:12 +0100,
Pavel Tatashin [off-list ref] wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help