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=-13.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 C3D4BC4363A for ; Mon, 26 Oct 2020 10:48:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C2E920754 for ; Mon, 26 Oct 2020 10:48:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1770266AbgJZKsE (ORCPT ); Mon, 26 Oct 2020 06:48:04 -0400 Received: from foss.arm.com ([217.140.110.172]:34894 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1769871AbgJZKsE (ORCPT ); Mon, 26 Oct 2020 06:48:04 -0400 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 70FFB101E; Mon, 26 Oct 2020 03:48:03 -0700 (PDT) Received: from [10.57.20.91] (unknown [10.57.20.91]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D7DC93F719; Mon, 26 Oct 2020 03:48:01 -0700 (PDT) Subject: Re: [PATCH 3/8] KVM: arm64: Drop useless PAN setting on host EL1 to EL2 transition To: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: kernel-team@android.com, Will Deacon References: <20201026095116.72051-1-maz@kernel.org> <20201026095116.72051-4-maz@kernel.org> From: Vladimir Murzin Message-ID: <8d798f0d-6bf4-ed26-9d40-b9d09bf2954e@arm.com> Date: Mon, 26 Oct 2020 10:48:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20201026095116.72051-4-maz@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 10/26/20 9:51 AM, Marc Zyngier wrote: > Setting PSTATE.PAN when entering EL2 on nVHE doesn't make much > sense as this bit only means something for translation regimes > that include EL0. This obviously isn't the case in the nVHE case, > so let's drop this setting. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/hyp/nvhe/host.S | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm64/kvm/hyp/nvhe/host.S b/arch/arm64/kvm/hyp/nvhe/host.S > index ff9a0f547b9f..ed27f06a31ba 100644 > --- a/arch/arm64/kvm/hyp/nvhe/host.S > +++ b/arch/arm64/kvm/hyp/nvhe/host.S > @@ -17,8 +17,6 @@ SYM_FUNC_START(__host_exit) > > get_host_ctxt x0, x1 > > - ALTERNATIVE(nop, SET_PSTATE_PAN(1), ARM64_HAS_PAN, CONFIG_ARM64_PAN) > - > /* Store the host regs x2 and x3 */ > stp x2, x3, [x0, #CPU_XREG_OFFSET(2)] > > It was originally introduced in cb96408da4e1 (arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2) and indeed only applies to VHE (I even remember some attempts to put in under CONFIG_ARM64_VHE). So, if it helps: Reviewed-by: Vladimir Murzin Cheers Vladimir 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=-13.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 9DA12C2D0A3 for ; Mon, 26 Oct 2020 10:48:09 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id E535620754 for ; Mon, 26 Oct 2020 10:48:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E535620754 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 1760D4B5E2; Mon, 26 Oct 2020 06:48:08 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ObTWOvKJC7dR; Mon, 26 Oct 2020 06:48:06 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B41494B538; Mon, 26 Oct 2020 06:48:06 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A65554B516 for ; Mon, 26 Oct 2020 06:48:05 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yLld6e7QD9sm for ; Mon, 26 Oct 2020 06:48:04 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2580B4B515 for ; Mon, 26 Oct 2020 06:48:04 -0400 (EDT) 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 70FFB101E; Mon, 26 Oct 2020 03:48:03 -0700 (PDT) Received: from [10.57.20.91] (unknown [10.57.20.91]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D7DC93F719; Mon, 26 Oct 2020 03:48:01 -0700 (PDT) Subject: Re: [PATCH 3/8] KVM: arm64: Drop useless PAN setting on host EL1 to EL2 transition To: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org References: <20201026095116.72051-1-maz@kernel.org> <20201026095116.72051-4-maz@kernel.org> From: Vladimir Murzin Message-ID: <8d798f0d-6bf4-ed26-9d40-b9d09bf2954e@arm.com> Date: Mon, 26 Oct 2020 10:48:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20201026095116.72051-4-maz@kernel.org> Content-Language: en-US Cc: Will Deacon , kernel-team@android.com X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 10/26/20 9:51 AM, Marc Zyngier wrote: > Setting PSTATE.PAN when entering EL2 on nVHE doesn't make much > sense as this bit only means something for translation regimes > that include EL0. This obviously isn't the case in the nVHE case, > so let's drop this setting. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/hyp/nvhe/host.S | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm64/kvm/hyp/nvhe/host.S b/arch/arm64/kvm/hyp/nvhe/host.S > index ff9a0f547b9f..ed27f06a31ba 100644 > --- a/arch/arm64/kvm/hyp/nvhe/host.S > +++ b/arch/arm64/kvm/hyp/nvhe/host.S > @@ -17,8 +17,6 @@ SYM_FUNC_START(__host_exit) > > get_host_ctxt x0, x1 > > - ALTERNATIVE(nop, SET_PSTATE_PAN(1), ARM64_HAS_PAN, CONFIG_ARM64_PAN) > - > /* Store the host regs x2 and x3 */ > stp x2, x3, [x0, #CPU_XREG_OFFSET(2)] > > It was originally introduced in cb96408da4e1 (arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2) and indeed only applies to VHE (I even remember some attempts to put in under CONFIG_ARM64_VHE). So, if it helps: Reviewed-by: Vladimir Murzin Cheers Vladimir _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-13.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 BD7FCC2D0A3 for ; Mon, 26 Oct 2020 10:49:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 49BDE2072E for ; Mon, 26 Oct 2020 10:49:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uJCDbDgI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49BDE2072E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wdaE/J81XWPe9EHZuSlrHRuvF25XeNRz3SdYDvWPuCU=; b=uJCDbDgIuCtMBtmXB0+vdEPpD ER6r2jarAe7ByOHHrxCss9TMekqZdE3neiutyBd+hDNsFO1eGlhKYOqAAMuVcXyrZguPivKLXiDPW 379VXTI8LVdEGwGHhGVtMHH70tgVSYTUpd2oWVg/DVXjP2iPgwoggsm5OAdy9sB0JGGaYtoLeHK81 2dSKrHS0XbiaVzCvYRPQq5fIILJ9oWgPmOBJHovoi3j9DMrIF/SglDcifgoQ6w4q/mNx1TB2pG7mj XcPMsKYSxz9qdxIgYBIILHB8sBMw/uDgX4Toj3kxvxSI/9p2UJhmCYO7IJI6ar8A8H2yz/ZARSrH+ uN2zagFlQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX02q-0000ro-QC; Mon, 26 Oct 2020 10:48:08 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kX02o-0000qM-2w for linux-arm-kernel@lists.infradead.org; Mon, 26 Oct 2020 10:48:06 +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 70FFB101E; Mon, 26 Oct 2020 03:48:03 -0700 (PDT) Received: from [10.57.20.91] (unknown [10.57.20.91]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D7DC93F719; Mon, 26 Oct 2020 03:48:01 -0700 (PDT) Subject: Re: [PATCH 3/8] KVM: arm64: Drop useless PAN setting on host EL1 to EL2 transition To: Marc Zyngier , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org References: <20201026095116.72051-1-maz@kernel.org> <20201026095116.72051-4-maz@kernel.org> From: Vladimir Murzin Message-ID: <8d798f0d-6bf4-ed26-9d40-b9d09bf2954e@arm.com> Date: Mon, 26 Oct 2020 10:48:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20201026095116.72051-4-maz@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201026_064806_204324_95A3F87E X-CRM114-Status: GOOD ( 18.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Will Deacon , kernel-team@android.com 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 10/26/20 9:51 AM, Marc Zyngier wrote: > Setting PSTATE.PAN when entering EL2 on nVHE doesn't make much > sense as this bit only means something for translation regimes > that include EL0. This obviously isn't the case in the nVHE case, > so let's drop this setting. > > Signed-off-by: Marc Zyngier > --- > arch/arm64/kvm/hyp/nvhe/host.S | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm64/kvm/hyp/nvhe/host.S b/arch/arm64/kvm/hyp/nvhe/host.S > index ff9a0f547b9f..ed27f06a31ba 100644 > --- a/arch/arm64/kvm/hyp/nvhe/host.S > +++ b/arch/arm64/kvm/hyp/nvhe/host.S > @@ -17,8 +17,6 @@ SYM_FUNC_START(__host_exit) > > get_host_ctxt x0, x1 > > - ALTERNATIVE(nop, SET_PSTATE_PAN(1), ARM64_HAS_PAN, CONFIG_ARM64_PAN) > - > /* Store the host regs x2 and x3 */ > stp x2, x3, [x0, #CPU_XREG_OFFSET(2)] > > It was originally introduced in cb96408da4e1 (arm64: KVM: VHE: reset PSTATE.PAN on entry to EL2) and indeed only applies to VHE (I even remember some attempts to put in under CONFIG_ARM64_VHE). So, if it helps: Reviewed-by: Vladimir Murzin Cheers Vladimir _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel