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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3918DC2BD09 for ; Mon, 15 Jul 2024 08:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uPMzlsgnL8R/QiQfmyp770SvYe9ecicLzEbOI+zGB84=; b=NK4CTQc0Pdzj3qF+PDvLBBTQOe Xma27Zdp0ghTHXfMUH6p2HsbGo4gKUKkYTVGtp+yF61yYOmzkYLr26DkWmZnwZ+PnvDlBP3JqIRQi MItT21fKrcUoWUZmXb/RvcNSrhwJtH1gYSURThUGk1WbzMPPd5JKCLQ9G9v+ql4F7b7Jo3TPo9Bkr ROs+tOop6nKYksuu9rXVeaI36CxHwxbPcLgsnI1q9zMYSVpBs0uw1WlfT1sf5IR9LZgMWXMWZuYA9 5+0gCCI6yoS8JxXqcln1neZ/VQKbjC4/Uo/7GdS+MHmVEvcq+3+wNZ3NzEW/cT4EyaiH7YVZ4ZE4q NeO14X/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTHCZ-00000006LzD-34jz; Mon, 15 Jul 2024 08:36:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTHCG-00000006LvG-2mWF for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 08:36:38 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 256A8DA7; Mon, 15 Jul 2024 01:37:01 -0700 (PDT) Received: from [10.162.40.16] (a077893.blr.arm.com [10.162.40.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9C89A3F73F; Mon, 15 Jul 2024 01:36:27 -0700 (PDT) Message-ID: <82a5acea-0a06-437e-b246-ae2874c3493e@arm.com> Date: Mon, 15 Jul 2024 14:06:24 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 08/29] KVM: arm64: make kvm_at() take an OP_AT_* To: Joey Gouly , linux-arm-kernel@lists.infradead.org Cc: 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, maz@kernel.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 References: <20240503130147.1154804-1-joey.gouly@arm.com> <20240503130147.1154804-9-joey.gouly@arm.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: <20240503130147.1154804-9-joey.gouly@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_013636_777641_7651DDBB X-CRM114-Status: GOOD ( 13.81 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/3/24 18:31, 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 > > #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 */ I guess this patch has already been included in a different series now. https://lore.kernel.org/all/20240625133508.259829-6-maz@kernel.org/