Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1379509pxb; Thu, 4 Mar 2021 09:48:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVLzQr+47CRs1JtGN2J6j/B9kC8hcedoKb913bpN6zzU3Fzor5W1cNk9vdHyOoXrzs6l74 X-Received: by 2002:a17:907:2661:: with SMTP id ci1mr5463316ejc.403.1614880116966; Thu, 04 Mar 2021 09:48:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614880116; cv=none; d=google.com; s=arc-20160816; b=Tk0h22t1Te/Bfk8jT1J6JZs2Nzg13jaoxk/4qffyOUoeZZy8IqUU1T2bmzVdR8Qeuk fDGi57SYvfaplKXkKHTAG6TOyuEkyt+bOgOyuWLyFKFThaKOUVsm7ngyImEul2gpUp6h 8pizuv4Y1GSVHvkyAQPngFWi24BW5OmHrhc3qKK/purFI8VsEcYom/OCaN9WdklDbniz KSZ2Ypwvh4UssjVLJ/lOg3Y54zhs6zyjq6PDkPGXmAM1UDV04n6zVYf3j2AxqnVWzJtv fZ5uunwNIY76YWwOWF8dghFn42g5A58rFdByg6H4ShizwGVcHQH23zPZ2V4cxgK+xK2o CiWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=vSXU/R7o3aYKytvKdZCe44n+bkN18KkXrCDMbTQLp64=; b=clEWiRZHIZl2cDZLr5SX3u1ICCzcVkDYBsRd1gZ1ItNu89iX57FDBsjc+Xu3/47uU/ Z8mmpOyiBBezyv3C7yCZKqJh1mPYGZ/1VRjH4cKKv4vAQ21O6O4TJrlmpSX8kmWs/80V JBRYSV5pUJrqkqSwQVv9go5Uckyx5InUPh4811nsQtKeQc0coiXLCmFz9qBGotU7fbmv z9iUvc/ztMhsoSogrdmyDtsfIOezht4rSDMOx33aMFm7p6TC7Fdk6Hz05U+WyoIm8AL6 T4HCLC6t8HRJEL6oY3mpOX7vTPtTgb5UGY6AROOgq3MRxkXmj+7Rin26Ck8IZRATqkne unFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UrLovbK0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hk1si18163581ejb.36.2021.03.04.09.48.14; Thu, 04 Mar 2021 09:48:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UrLovbK0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238171AbhCDOKf (ORCPT + 99 others); Thu, 4 Mar 2021 09:10:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:36532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241370AbhCDOKW (ORCPT ); Thu, 4 Mar 2021 09:10:22 -0500 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210302150002.3685113-8-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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