From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CE2EC47083 for ; Wed, 2 Jun 2021 08:42:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ECC4A6139A for ; Wed, 2 Jun 2021 08:42:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECC4A6139A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=suxMDNkMwrT/bnDmOLSAKmIdVeRbtUmUdeJ5s5ia75I=; b=nQfQ4bMCQvmRmN hMTLpoVjGBFDBX5Zh+2rYF+so6TApodPM5w3bUCl+/T+O7rGeUYfeu/abAfw7n/cDIXUA55DxI/DS +2bZ6eArCznGwCzXqdowXTbTt3PPf3k19+Mzz4of8RLBm6EjcmQ3h2difsWbLCwt8SDeA3U85/9wi BLCePex0Mm8fkO8O911ENQs1h7c57/dVboBHN+Zt0MtIUBFnnko6kyRJC30GGrS9f0h/Zan5fIYdb VexDkdZ2z/PObMNUmxVXJhMvL1whUF3gjOLHm5FBaw8ag4W+WmRs8XXnp5e93fdJdXOZHQTXxqm5C Nh+g//9k4JNJUkIeMZ4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loMQp-002jGw-24; Wed, 02 Jun 2021 08:40:55 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1loM7Y-002axn-Ls; Wed, 02 Jun 2021 08:21:02 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45BEA613AC; Wed, 2 Jun 2021 08:21:00 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1loM7V-004ykh-UW; Wed, 02 Jun 2021 09:20:58 +0100 Date: Wed, 02 Jun 2021 09:20:49 +0100 Message-ID: <87czt41xum.wl-maz@kernel.org> From: Marc Zyngier 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 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> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, james.morse@arm.com, vladimir.murzin@arm.com, matthias.bgg@gmail.com, linux-mm@kvack.org, mark.rutland@arm.com, steve.capper@arm.com, rfontana@redhat.com, tglx@linutronix.de, selindag@gmail.com, tyhicks@linux.microsoft.com, kernelfans@gmail.com, akpm@linux-foundation.org, madvenka@linux.microsoft.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_012100_781140_749ED289 X-CRM114-Status: GOOD ( 24.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel