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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46F97C25B7E for ; Wed, 29 May 2024 15:56:51 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=b1HcRd4F; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4VqDKD1WXXz7BK2 for ; Thu, 30 May 2024 01:47:12 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=b1HcRd4F; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=maz@kernel.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4VqDJP0M2nz7B6g for ; Thu, 30 May 2024 01:46:28 +1000 (AEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 1B54861276; Wed, 29 May 2024 15:46:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBC9CC116B1; Wed, 29 May 2024 15:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716997585; bh=5H/9tAGxhCnQIdq/gPNT2uQTCgvD6jAZwCxyBBdjciY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=b1HcRd4FyRr1Fgr8KI7GaMOYM54DLB/kJz++0sBj9koRiH1ImimLxCkncD3DWiJb4 NDH8P+IaKPe1VLQGZJP5nf9t3/ZSchz0OAJ4mpGWs1V3Apgz6CUNpTj4p22M34KEtD loH1/x5pPy2LnldfHajuPt15CKIwbllYL7rKylFdmMpIBBgYHlG/x0E6Prqo4VLR5F BXQc7DRs+e2H+ZvsNZNJqBI82iorAnwgpyaXrvj8xDcNrsvMLpbDse62m0cMekjJFE qRxhbulfJVSoPdv1Pix0R7Pb3LaMDPnYzIDyrfMx4qLrotZZidXBLndgigIRuAscB0 vdOTG32dAyCcw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sCLVP-00Gfog-PN; Wed, 29 May 2024 16:46:23 +0100 Date: Wed, 29 May 2024 16:46:23 +0100 Message-ID: <8634q0mxio.wl-maz@kernel.org> From: Marc Zyngier To: Joey Gouly Subject: Re: [PATCH v4 08/29] KVM: arm64: make kvm_at() take an OP_AT_* In-Reply-To: <20240503130147.1154804-9-joey.gouly@arm.com> References: <20240503130147.1154804-1-joey.gouly@arm.com> <20240503130147.1154804-9-joey.gouly@arm.com> 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/29.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: joey.gouly@arm.com, linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.com, bp@alien8.de, broonie@kernel.org, catalin.marinas@arm.com, christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com, hpa@zytor.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.ibm.com, npiggin@gmail.com, oliver.upton@linux.dev, shuah@kernel.org, szabolcs.nagy@arm.com, tglx@linutronix.de, will@kernel.org, x86@kernel.org, kvmarm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: szabolcs.nagy@arm.com, catalin.marinas@arm.com, dave.hansen@linux.intel.com, linux-mm@kvack.org, hpa@zytor.com, shuah@kernel.org, aneesh.kumar@linux.ibm.com, x86@kernel.org, aneesh.kumar@kernel.org, mingo@redhat.com, naveen.n.rao@linux.ibm.com, will@kernel.org, npiggin@gmail.com, broonie@kernel.org, bp@alien8.de, kvmarm@lists.linux.dev, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, 03 May 2024 14:01:26 +0100, Joey Gouly wrote: > > To allow using newer instructions that current assemblers don't know about, > replace the `at` instruction with the underlying SYS instruction. > > Signed-off-by: Joey Gouly > Cc: Marc Zyngier > Cc: Oliver Upton > Cc: Catalin Marinas > Cc: Will Deacon > --- > arch/arm64/include/asm/kvm_asm.h | 3 ++- > arch/arm64/kvm/hyp/include/hyp/fault.h | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h > index 24b5e6b23417..ce65fd0f01b0 100644 > --- a/arch/arm64/include/asm/kvm_asm.h > +++ b/arch/arm64/include/asm/kvm_asm.h > @@ -10,6 +10,7 @@ > #include > #include > #include > +#include nit: include order. > > #define ARM_EXIT_WITH_SERROR_BIT 31 > #define ARM_EXCEPTION_CODE(x) ((x) & ~(1U << ARM_EXIT_WITH_SERROR_BIT)) > @@ -261,7 +262,7 @@ extern u64 __kvm_get_mdcr_el2(void); > asm volatile( \ > " mrs %1, spsr_el2\n" \ > " mrs %2, elr_el2\n" \ > - "1: at "at_op", %3\n" \ > + "1: " __msr_s(at_op, "%3") "\n" \ > " isb\n" \ > " b 9f\n" \ > "2: msr spsr_el2, %1\n" \ > diff --git a/arch/arm64/kvm/hyp/include/hyp/fault.h b/arch/arm64/kvm/hyp/include/hyp/fault.h > index 9e13c1bc2ad5..487c06099d6f 100644 > --- a/arch/arm64/kvm/hyp/include/hyp/fault.h > +++ b/arch/arm64/kvm/hyp/include/hyp/fault.h > @@ -27,7 +27,7 @@ static inline bool __translate_far_to_hpfar(u64 far, u64 *hpfar) > * saved the guest context yet, and we may return early... > */ > par = read_sysreg_par(); > - if (!__kvm_at("s1e1r", far)) > + if (!__kvm_at(OP_AT_S1E1R, far)) > tmp = read_sysreg_par(); > else > tmp = SYS_PAR_EL1_F; /* back to the guest */ Reviewed-by: Marc Zyngier M. -- Without deviation from the norm, progress is not possible.