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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71104C433EF for ; Wed, 8 Dec 2021 16:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236823AbhLHQ1Z (ORCPT ); Wed, 8 Dec 2021 11:27:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236757AbhLHQ1Y (ORCPT ); Wed, 8 Dec 2021 11:27:24 -0500 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91898C061746 for ; Wed, 8 Dec 2021 08:23:52 -0800 (PST) Received: by mail-il1-x12a.google.com with SMTP id j21so2664629ila.5 for ; Wed, 08 Dec 2021 08:23:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KpeBsHFB6eYlB3WCacPzAIVN5v2f8OXbEdK+xuRejBI=; b=n9+Ehv25B9izYS6DvOsCoidZsiRlWn+xp5i8odEKYpXsLoUhi56Bt3jJKaK8TgTnjy TraMRM8R/H3Jrb5g/o3vz4KiOmRWnOedTG+VTnIj2hyAd+2fGpok1D+4X5ndgXABpqca TP1pMYEyy93tVTt2oDLQc7cRsRcpl9LHqLDzxvWsqhREH+greNdSvRiDfF/MjmFaVxou jL8h0/fcLI7etSRF/Vz02/GM0t0U9CiFo9Pa6lbm1COx6qqm2Yp7oyUprAzYUZK26lhF uOYqnxjxfwJwGK6TczptXpt5D70QwM1a3hn2uRRXpJfPqqLrqm8u0070v6Ft2q1iln0q RkHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KpeBsHFB6eYlB3WCacPzAIVN5v2f8OXbEdK+xuRejBI=; b=PwS5eVE78FDlp/TpBF+FdYKnPMvT9phLDCvvVynvk+iTNFoxtScDT82t83YjDZi9WP FV0uTY9bmoOZ0Hhu9xOQ/ot89oP54WsClTjIuH/5YIfnIktaYz9ejNXrWwNXmHhMsADF Xh04iR/6KSyvcXwpjG0mxBPFTOZQU4jEoIRUW8Axy0x6TxXvF1EeioaML3ux9VbDt1FY lqer6PkGdJtQN34w6xpcmqD2i5WWQsZNNHeeeCh9PNLrjmpD09K1D1oAptzpg1RSHetX ecf2zCBraBXdwXo9MGlrwTZt2C0UZ3HysD0ZtbTMvu2Hbou2fjo+CImc75fck/BZTy11 rUNg== X-Gm-Message-State: AOAM532RPR9oJrvjJfd3ZF0Tm34zGSa4Pwm7HTJpcNLlQ+ZtW8GpRiFT NMpzd9a4u0kVJ+0xUCfyLxXVV5cIERc3I0ZCWXr/TiHKXFk= X-Google-Smtp-Source: ABdhPJxVQkF+aF2MbNgKkiukN5DRV+T8wLOjkOLna7Vo5jp94IsNAeAv7TD2/GW4L2t4ojfwAftaEKK5/PhhTDH+w9o= X-Received: by 2002:a05:6e02:1a2c:: with SMTP id g12mr9021619ile.22.1638980631731; Wed, 08 Dec 2021 08:23:51 -0800 (PST) MIME-Version: 1.0 References: <20211208152300.2478542-1-qperret@google.com> <20211208152300.2478542-4-qperret@google.com> In-Reply-To: <20211208152300.2478542-4-qperret@google.com> From: Andrew Walbran Date: Wed, 8 Dec 2021 16:23:37 +0000 Message-ID: Subject: Re: [PATCH 3/6] KVM: arm64: Make the hyp memory pool static To: Quentin Perret Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000060146105d2a4eaf3" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000060146105d2a4eaf3 Content-Type: text/plain; charset="UTF-8" Reviewed-by: Andrew Walbran On Wed, 8 Dec 2021 at 15:23, 'Quentin Perret' via kernel-team wrote: > > The hyp memory pool struct is sized to fit exactly the needs of the > hypervisor stage-1 page-table allocator, so it is important it is not > used for anything else. As it is currently used only from setup.c, > reduce its visibility by marking it static. > > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/hyp/include/nvhe/mm.h | 1 - > arch/arm64/kvm/hyp/nvhe/setup.c | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/arm64/kvm/hyp/include/nvhe/mm.h b/arch/arm64/kvm/hyp/include/nvhe/mm.h > index ef6a58a04235..3f60d6cc5368 100644 > --- a/arch/arm64/kvm/hyp/include/nvhe/mm.h > +++ b/arch/arm64/kvm/hyp/include/nvhe/mm.h > @@ -12,7 +12,6 @@ > > extern struct kvm_pgtable pkvm_pgtable; > extern hyp_spinlock_t pkvm_pgd_lock; > -extern struct hyp_pool hpool; > extern u64 __io_map_base; > > int hyp_create_idmap(u32 hyp_va_bits); > diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c > index 51e68a040d8a..e31149965204 100644 > --- a/arch/arm64/kvm/hyp/nvhe/setup.c > +++ b/arch/arm64/kvm/hyp/nvhe/setup.c > @@ -18,7 +18,6 @@ > #include > #include > > -struct hyp_pool hpool; > unsigned long hyp_nr_cpus; > > #define hyp_percpu_size ((unsigned long)__per_cpu_end - \ > @@ -28,6 +27,7 @@ static void *vmemmap_base; > static void *hyp_pgt_base; > static void *host_s2_pgt_base; > static struct kvm_pgtable_mm_ops pkvm_pgtable_mm_ops; > +static struct hyp_pool hpool; > > static int divide_memory_pool(void *virt, unsigned long size) > { > -- > 2.34.1.400.ga245620fadb-goog > > -- > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. > --00000000000060146105d2a4eaf3 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPmgYJKoZIhvcNAQcCoIIPizCCD4cCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggz0MIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0yOTAzMTgwMDAwMDBaMFQxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSowKAYDVQQDEyFHbG9iYWxTaWduIEF0bGFz IFIzIFNNSU1FIENBIDIwMjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvLe9xPU9W dpiHLAvX7kFnaFZPuJLey7LYaMO8P/xSngB9IN73mVc7YiLov12Fekdtn5kL8PjmDBEvTYmWsuQS 6VBo3vdlqqXZ0M9eMkjcKqijrmDRleudEoPDzTumwQ18VB/3I+vbN039HIaRQ5x+NHGiPHVfk6Rx c6KAbYceyeqqfuJEcq23vhTdium/Bf5hHqYUhuJwnBQ+dAUcFndUKMJrth6lHeoifkbw2bv81zxJ I9cvIy516+oUekqiSFGfzAqByv41OrgLV4fLGCDH3yRh1tj7EtV3l2TngqtrDLUs5R+sWIItPa/4 AJXB1Q3nGNl2tNjVpcSn0uJ7aFPbAgMBAAGjggGKMIIBhjAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0l BBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMBIGA1UdEwEB/wQIMAYB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