From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Wed, 02 Jun 2021 09:20:49 +0100 Message-ID: <87czt41xum.wl-maz@kernel.org> From: Marc Zyngier Subject: Re: [PATCH 04/18] arm64: kernel: add helper for booted at EL2 and not VHE In-Reply-To: References: <20210527150526.271941-1-pasha.tatashin@soleen.com> <20210527150526.271941-5-pasha.tatashin@soleen.com> <87pmx52212.wl-maz@kernel.org> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Pavel Tatashin Cc: James Morris , Sasha Levin , "Eric W. Biederman" , kexec mailing list , LKML , Jonathan Corbet , Catalin Marinas , Will Deacon , Linux ARM , James Morse , Vladimir Murzin , Matthias Brugger , linux-mm , Mark Rutland , steve.capper@arm.com, rfontana@redhat.com, Thomas Gleixner , Selin Dag , Tyler Hicks , Pingfan Liu , Andrew Morton , madvenka@linux.microsoft.com On Wed, 02 Jun 2021 02:33:52 +0100, Pavel Tatashin wrote: > > On Tue, Jun 1, 2021 at 8:38 AM Marc Zyngier wrote: > > > > On Thu, 27 May 2021 16:05:12 +0100, > > Pavel Tatashin 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. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec