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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF6D0C433FE for ; Thu, 3 Nov 2022 13:07:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 27DB44B18F; Thu, 3 Nov 2022 09:07:54 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org 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 eeEGM7Vbr53v; Thu, 3 Nov 2022 09:07:52 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CEBA34B2A1; Thu, 3 Nov 2022 09:07:52 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2138D4B2A1 for ; Thu, 3 Nov 2022 09:07:51 -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 RJs87Rmbp+l9 for ; Thu, 3 Nov 2022 09:07:49 -0400 (EDT) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id CBCE74B18F for ; Thu, 3 Nov 2022 09:07:49 -0400 (EDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 796BBB825E5; Thu, 3 Nov 2022 13:07:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2138CC433C1; Thu, 3 Nov 2022 13:07:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667480867; bh=paPkw39dqHtmErAsf9C/CLDJENUkAuTQbIXYzYC094Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HIYf+nQdrasSK/NVQgGx2iqIUt/stTwTv4lk1CfomCCZn/QTuub9yvHJ2Wz0QUSN5 5N1JyUVMduehZOkIHHl7QNQ4DdLmYCACpfOfhQgxmANP7630fce2ubXIPGddWBv83b qsQp05lAMG3mQjRJram82blP7wQsyfYOwfKiVpvCy4TN/qi4ZJT8VrSGxtgjIBiY7E X5RigzF7elfmQ39vl0Dvr9Gpe/MDiRw81wLKqAFAHR0+k+Xxe9XQ50a7fRCYC+6Hvy 8UMz4wscne+dbcAvK6NQstNmOYmR/seOHShcztXdN4FunsY2Zep9xIwonFje/L8WN6 8mS8LIAkWcJUw== 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 1oqZwe-003VMC-Gl; Thu, 03 Nov 2022 13:07:44 +0000 Date: Thu, 03 Nov 2022 13:07:38 +0000 Message-ID: <86h6zgqj8l.wl-maz@kernel.org> From: Marc Zyngier To: Wei-Lin Chang Subject: Re: [PATCH] KVM: arm64: Update comment of create_hyp_mappings In-Reply-To: <20221103053228.961591-1-r09922117@csie.ntu.edu.tw> References: <20221103053228.961591-1-r09922117@csie.ntu.edu.tw> 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 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: r09922117@csie.ntu.edu.tw, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: will@kernel.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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 Thu, 03 Nov 2022 05:32:28 +0000, Wei-Lin Chang wrote: > > HYP_PAGE_OFFSET is removed since 4.8, and the method for generating Hyp > VAs has evolved. Update the functional description of > create_hyp_mappings accordingly. > > Signed-off-by: Wei-Lin Chang > --- > arch/arm64/kvm/mmu.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index c9a13e487..a9ae4a3f9 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -424,9 +424,10 @@ void kvm_unshare_hyp(void *from, void *to) > * @to: The virtual kernel end address of the range (exclusive) > * @prot: The protection to be applied to this range > * > - * The same virtual address as the kernel virtual address is also used > - * in Hyp-mode mapping (modulo HYP_PAGE_OFFSET) to the same underlying > - * physical pages. > + * The Hyp virtual address is generated by masking the kernel VA with > + * va_mask then inserting tag_val for the higher bits starting from > + * tag_lsb. See kvm_compute_layout() in va_layout.c for more info. > + * Both Hyp VA and kernel VA ranges map to the same underlying physical pages. > */ > int create_hyp_mappings(void *from, void *to, enum kvm_pgtable_prot prot) > { What's the difference with the previous instance of this patch? M. -- Without deviation from the norm, progress is not possible. _______________________________________________ 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 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73A246FCC for ; Thu, 3 Nov 2022 13:07:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2138CC433C1; Thu, 3 Nov 2022 13:07:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667480867; bh=paPkw39dqHtmErAsf9C/CLDJENUkAuTQbIXYzYC094Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HIYf+nQdrasSK/NVQgGx2iqIUt/stTwTv4lk1CfomCCZn/QTuub9yvHJ2Wz0QUSN5 5N1JyUVMduehZOkIHHl7QNQ4DdLmYCACpfOfhQgxmANP7630fce2ubXIPGddWBv83b qsQp05lAMG3mQjRJram82blP7wQsyfYOwfKiVpvCy4TN/qi4ZJT8VrSGxtgjIBiY7E X5RigzF7elfmQ39vl0Dvr9Gpe/MDiRw81wLKqAFAHR0+k+Xxe9XQ50a7fRCYC+6Hvy 8UMz4wscne+dbcAvK6NQstNmOYmR/seOHShcztXdN4FunsY2Zep9xIwonFje/L8WN6 8mS8LIAkWcJUw== 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 1oqZwe-003VMC-Gl; Thu, 03 Nov 2022 13:07:44 +0000 Date: Thu, 03 Nov 2022 13:07:38 +0000 Message-ID: <86h6zgqj8l.wl-maz@kernel.org> From: Marc Zyngier To: Wei-Lin Chang Cc: james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: Update comment of create_hyp_mappings In-Reply-To: <20221103053228.961591-1-r09922117@csie.ntu.edu.tw> References: <20221103053228.961591-1-r09922117@csie.ntu.edu.tw> 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 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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: r09922117@csie.ntu.edu.tw, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Message-ID: <20221103130738.Kx8Dh_c8trs6gfdl2KRY6_C9JyBjD3sptSA-OF_aCug@z> On Thu, 03 Nov 2022 05:32:28 +0000, Wei-Lin Chang wrote: > > HYP_PAGE_OFFSET is removed since 4.8, and the method for generating Hyp > VAs has evolved. Update the functional description of > create_hyp_mappings accordingly. > > Signed-off-by: Wei-Lin Chang > --- > arch/arm64/kvm/mmu.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index c9a13e487..a9ae4a3f9 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -424,9 +424,10 @@ void kvm_unshare_hyp(void *from, void *to) > * @to: The virtual kernel end address of the range (exclusive) > * @prot: The protection to be applied to this range > * > - * The same virtual address as the kernel virtual address is also used > - * in Hyp-mode mapping (modulo HYP_PAGE_OFFSET) to the same underlying > - * physical pages. > + * The Hyp virtual address is generated by masking the kernel VA with > + * va_mask then inserting tag_val for the higher bits starting from > + * tag_lsb. See kvm_compute_layout() in va_layout.c for more info. > + * Both Hyp VA and kernel VA ranges map to the same underlying physical pages. > */ > int create_hyp_mappings(void *from, void *to, enum kvm_pgtable_prot prot) > { What's the difference with the previous instance of this patch? M. -- Without deviation from the norm, progress is not possible. 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 54088C4332F for ; Thu, 3 Nov 2022 13:09:11 +0000 (UTC) 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=6FhAW4tPmA0VupU2dQElMEtlRXMXPLJkht96+6TIPzo=; b=uGNCTAAikXo55l WHtkiGNLGYZe31BBBvJbxiOiRKvogiJzj4pqNTckoZ21APYF/DK79bZYKMF1U1LhIsowGtLfdYf6d SdEObLR9NbBVt9EIZZEstOi9G2pOhnTsAL0xsfQor8OR8/TSIb010jMaDBJRJ7YAc1mLNXl/QQ2dF EQqc4VpB7JOOCiatG7F6j/6B9Knky2hRkMgbvl6fh1ZubU21cjHKvUaDzSmHFCcv+kHvS9nvDzeeH l2G3BLyYyjxSyJepVAi3scUWqpm/9kRJXyya31hpoH06OdFRIKP9HbZT+rJ28Mdo2Jvf+kTIXkt/1 geZJXa+8vsgvtLBN2cdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqZwp-00HRlS-Ai; Thu, 03 Nov 2022 13:07:55 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqZwj-00HRkf-WD for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 13:07:53 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 796BBB825E5; Thu, 3 Nov 2022 13:07:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2138CC433C1; Thu, 3 Nov 2022 13:07:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667480867; bh=paPkw39dqHtmErAsf9C/CLDJENUkAuTQbIXYzYC094Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HIYf+nQdrasSK/NVQgGx2iqIUt/stTwTv4lk1CfomCCZn/QTuub9yvHJ2Wz0QUSN5 5N1JyUVMduehZOkIHHl7QNQ4DdLmYCACpfOfhQgxmANP7630fce2ubXIPGddWBv83b qsQp05lAMG3mQjRJram82blP7wQsyfYOwfKiVpvCy4TN/qi4ZJT8VrSGxtgjIBiY7E X5RigzF7elfmQ39vl0Dvr9Gpe/MDiRw81wLKqAFAHR0+k+Xxe9XQ50a7fRCYC+6Hvy 8UMz4wscne+dbcAvK6NQstNmOYmR/seOHShcztXdN4FunsY2Zep9xIwonFje/L8WN6 8mS8LIAkWcJUw== 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 1oqZwe-003VMC-Gl; Thu, 03 Nov 2022 13:07:44 +0000 Date: Thu, 03 Nov 2022 13:07:38 +0000 Message-ID: <86h6zgqj8l.wl-maz@kernel.org> From: Marc Zyngier To: Wei-Lin Chang Cc: james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: Update comment of create_hyp_mappings In-Reply-To: <20221103053228.961591-1-r09922117@csie.ntu.edu.tw> References: <20221103053228.961591-1-r09922117@csie.ntu.edu.tw> 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 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: r09922117@csie.ntu.edu.tw, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org 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-20221103_060750_339969_D41E92C7 X-CRM114-Status: GOOD ( 24.17 ) 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 Thu, 03 Nov 2022 05:32:28 +0000, Wei-Lin Chang wrote: > > HYP_PAGE_OFFSET is removed since 4.8, and the method for generating Hyp > VAs has evolved. Update the functional description of > create_hyp_mappings accordingly. > > Signed-off-by: Wei-Lin Chang > --- > arch/arm64/kvm/mmu.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c > index c9a13e487..a9ae4a3f9 100644 > --- a/arch/arm64/kvm/mmu.c > +++ b/arch/arm64/kvm/mmu.c > @@ -424,9 +424,10 @@ void kvm_unshare_hyp(void *from, void *to) > * @to: The virtual kernel end address of the range (exclusive) > * @prot: The protection to be applied to this range > * > - * The same virtual address as the kernel virtual address is also used > - * in Hyp-mode mapping (modulo HYP_PAGE_OFFSET) to the same underlying > - * physical pages. > + * The Hyp virtual address is generated by masking the kernel VA with > + * va_mask then inserting tag_val for the higher bits starting from > + * tag_lsb. See kvm_compute_layout() in va_layout.c for more info. > + * Both Hyp VA and kernel VA ranges map to the same underlying physical pages. > */ > int create_hyp_mappings(void *from, void *to, enum kvm_pgtable_prot prot) > { What's the difference with the previous instance of this patch? 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