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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 95D7FC433E0 for ; Thu, 4 Mar 2021 14:12:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 289A464EEC for ; Thu, 4 Mar 2021 14:12:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 289A464EEC 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AEX4WbZ/XA0SShvwA7e/JMtNkdO0yP+mTmmjdK8gA/c=; b=J7/5GG0iRU4r6hGQwK/257+El vmPudEgYxgqwnT8MHsxP+g+mAhBi5jJAfiMtHmHJbcL+lsiuxX17ZcRML05ZtXU3Ufn6gIUCcbQnL b041gh3GxLa7qJZ3+XlSgrt2+ZuqQ2qlxoDRRji7RP1c+Z9vufKzW0SVJ2Ps9RIwRBoxReMBfbFCs BXomgQT76vwzP21zzBsmcv9kECzkmq2FEO5anOXEs2xJpoW2HGAtl6pjP51gSTaECG9r/cfDEKJMA 8u6eJm+Yks/S6XL77dVBcC1RXS9cFlwNvSWK/8FHzUjkOyKg0G4EKMKoE20D374lw84aD2mdfvj5Q qV5qeN4UA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHofp-008r4o-6N; Thu, 04 Mar 2021 14:09:53 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHofi-008r3K-Jy for linux-arm-kernel@lists.infradead.org; Thu, 04 Mar 2021 14:09:50 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6EC5F64EDF; Thu, 4 Mar 2021 14:09:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614866982; bh=6EzIY8mKBs6byT+yHKkgcBlOIVV0b78KDf87tIOxB00=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UrLovbK0Yz6BuDjF+iBIgvC9apQ074oZiquUsRoxNP57gxQyf9vO1V7aqG39ne+DE lkGnQAkCi6sUhrxkNYWD3ADJEMIpD/BFXFX8cjv4F7wW66vLoLYqbOwqQ3nt36Pz5W n7o34V0bjYFFuma7ZsasQa21f3v2oxb0pC768CNiwtN8cKp3quhy6YOMrbPrL08Qjf +ATR9QY5jJSBoRKvFRwX9X8JeEjse7Ds20/btLeZ/dwbCA10Jc0qEG3FHmLJ+TUwU3 fKD0cE07a1LfyCT8184I4jX0lCy4g9thQJoKyNngaMrF9K71BYbQYVDLyvWoivjN0L HoCTbDrMG6cFA== Date: Thu, 4 Mar 2021 14:09:36 +0000 From: Will Deacon To: Quentin Perret Cc: catalin.marinas@arm.com, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, tabba@google.com, mark.rutland@arm.com, dbrazdil@google.com, mate.toth-pal@arm.com, seanjc@google.com, robh+dt@kernel.org Subject: Re: [PATCH v3 07/32] KVM: arm64: Introduce a BSS section for use at Hyp Message-ID: <20210304140935.GD21229@willie-the-truck> References: <20210302150002.3685113-1-qperret@google.com> <20210302150002.3685113-8-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210302150002.3685113-8-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) 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 Tue, Mar 02, 2021 at 02:59:37PM +0000, Quentin Perret wrote: > Currently, the hyp code cannot make full use of a bss, as the kernel > section is mapped read-only. > > While this mapping could simply be changed to read-write, it would > intermingle even more the hyp and kernel state than they currently are. > Instead, introduce a __hyp_bss section, that uses reserved pages, and > create the appropriate RW hyp mappings during KVM init. > > Signed-off-by: Quentin Perret > --- > arch/arm64/include/asm/sections.h | 1 + > arch/arm64/kernel/vmlinux.lds.S | 52 ++++++++++++++++++++----------- > arch/arm64/kvm/arm.c | 14 ++++++++- > arch/arm64/kvm/hyp/nvhe/hyp.lds.S | 1 + > 4 files changed, 49 insertions(+), 19 deletions(-) Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel