Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3305258pxt; Mon, 9 Aug 2021 23:53:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxh1FrZ8RTuVRPlLL7VrRefoDsSHhiIz/vK6IlCnSoYOw0MSlhhEvpnn3pC1yDFSH2x6c9 X-Received: by 2002:aa7:db13:: with SMTP id t19mr3164621eds.72.1628578394877; Mon, 09 Aug 2021 23:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628578394; cv=none; d=google.com; s=arc-20160816; b=j8Y/kA/LXF+NcBCl5IkFZAn6Kc7rIF7xZ4X4ueLMbImMiA2RuuTUbhA5TP3lkAXZ2U pfJg055WZsoWud1kPon9cjk3VfzQLfv6OpcMIi9xb9RZHM4dD0Y1O0KtVXWVtNUGue96 Cu+XhGAvRRw4AGXEjWQU5rCar+OX3G1qHPu0iB1hp+Bf/ZAUHGGRMt+MIe08GHqLQDBh vjKI9MrHuqePK1ovBGmeKiGlSOOuQp7XWcqnedMCaj1956Te+kzIwMmEaArwgfLQ6gE1 OcgMfZ0xLdRruZ8uCECTRJmPvF2RBphfzkdOUsvfWY3EmdO8uR++7Y2S5C/DScJdKuAv E1RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZzIb/ALC5uOWJQxpcPBbJjvGksioyH36daLuKghiHvM=; b=a5GcxRL4ey6EsVl6QtXI3mG5JPcX96iE2Cukfk4yNBSV9yT8zCvNuCAB2qh7aH3K6P prafifJv83WAYBiPwSQHggX1Y2+A5YA88nycHqSgYWpiuTDbXkXpJXk6LRiFlN00qW2i kNS7P/c0Th8HSTwFgCWX1udwjo0bo+78PLUM0JwEheBzVdKYXPP339z8KZS75vMuFJw/ 0BoqXFTrFBiwO8CZxPBSkeHX58WsiXq0D3+sGHPb6j4Ns5hHcBO+37d1Cn/e6whIvDUS 11P3AicMnrUejVUUzm01assiNno2g9KDR/kyAocRLhvvRl0f6j+buuy8lN/YcTC3Gh5f TCgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=c0FITYn9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr20si21411627ejc.220.2021.08.09.23.52.51; Mon, 09 Aug 2021 23:53:14 -0700 (PDT) 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=@google.com header.s=20161025 header.b=c0FITYn9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236972AbhHJE6N (ORCPT + 99 others); Tue, 10 Aug 2021 00:58:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235564AbhHJE6L (ORCPT ); Tue, 10 Aug 2021 00:58:11 -0400 Received: from mail-oo1-xc34.google.com (mail-oo1-xc34.google.com [IPv6:2607:f8b0:4864:20::c34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42FD7C0613D3 for ; Mon, 9 Aug 2021 21:57:50 -0700 (PDT) Received: by mail-oo1-xc34.google.com with SMTP id b25-20020a4ac2990000b0290263aab95660so5013630ooq.13 for ; Mon, 09 Aug 2021 21:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZzIb/ALC5uOWJQxpcPBbJjvGksioyH36daLuKghiHvM=; b=c0FITYn9LmtYp+Fa/PwYe1ydEJp02qgTJpSn/ArFf4psnFIQSeDxgGESgqIMKZLiVA KbqzDsuBk5Lk5hZ6D42YbUGBACnkoRC0fGQN4WN3UIbKx55/7Wbata/iDz6KgHxThZ9L ZoMhypSwa+pPwMKe2XmVnwTAJMkahr20XIavtGV1bJ4nyz7RVEpW7SgUwQ3aZGdwl+Rc iTKWtyKpXFJ3FdIElreai6cs2X0ZPNbiztQJ758+JBNvddgqUCBC8xTutHChnGiD+/Oy jdsJyX+abDiPYFRzvDcc/XIWuumQTCc0amugFHMQBwjU3sThHWVPOBLAGsT2Sjs5FG7q jweg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZzIb/ALC5uOWJQxpcPBbJjvGksioyH36daLuKghiHvM=; b=HRHI5b4nJQIBsS7vY7BkHWuRHpZAYqyO/Un3UReFOdeGnaQTjz9oMQZFwK+lRYACSZ 7uhmeTNP/EfXsYxmt4ifx/g2VkCzRJD2RbwfDPWY//+Zn8/LDECfXiwXeHOEyY6jhB+2 1gDFDlB2YDMSJx3Q3Em42ctA1L6TfFPqYDFIbySv6BkT+OmdPDO4qTNjEckWLszE0OSs 03gAREa3OdOHfTaZZvIopDyGSoj9aukRzypng4hv/3l0kgZp0j5wWwQW79mNAgV3nG1V in6JNWib5IbWL+mv11GtnNZ3Qrm6jU6cbSdiw0B4odxI3BjoLE/iKqA3UQwDHVc+QROA mjSg== X-Gm-Message-State: AOAM530R4sb7cS0p5NjAjVX2xFNM3wwFvvqqZWiWoseHN+qdIUSLAeVR lJWn8hHN8bsuK+olToZHelyiPYiB3o6aEkVWXiARvA== X-Received: by 2002:a4a:4c55:: with SMTP id a82mr17509260oob.66.1628571469459; Mon, 09 Aug 2021 21:57:49 -0700 (PDT) MIME-Version: 1.0 References: <20210809152448.1810400-1-qperret@google.com> <20210809152448.1810400-15-qperret@google.com> In-Reply-To: <20210809152448.1810400-15-qperret@google.com> From: Fuad Tabba Date: Tue, 10 Aug 2021 06:57:13 +0200 Message-ID: Subject: Re: [PATCH v4 14/21] KVM: arm64: Expose pkvm_hyp_id To: Quentin Perret Cc: maz@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, ardb@kernel.org, qwandor@google.com, dbrazdil@google.com, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Quentin, On Mon, Aug 9, 2021 at 5:25 PM Quentin Perret wrote: > > Allow references to the hypervisor's owner id from outside > mem_protect.c. > > Signed-off-by: Quentin Perret > --- Reviewed-by: Fuad Tabba Thanks, /fuad > arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 ++ > arch/arm64/kvm/hyp/nvhe/mem_protect.c | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h b/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h > index 0849ee8fa260..23316a021880 100644 > --- a/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h > +++ b/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h > @@ -46,6 +46,8 @@ struct host_kvm { > }; > extern struct host_kvm host_kvm; > > +extern const u8 pkvm_hyp_id; > + > int __pkvm_prot_finalize(void); > int __pkvm_mark_hyp(phys_addr_t start, phys_addr_t end); > > diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c > index f95a5a4aa09c..ee255171945c 100644 > --- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c > +++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c > @@ -31,7 +31,7 @@ static struct hyp_pool host_s2_pool; > u64 id_aa64mmfr0_el1_sys_val; > u64 id_aa64mmfr1_el1_sys_val; > > -static const u8 pkvm_hyp_id = 1; > +const u8 pkvm_hyp_id = 1; > > static void *host_s2_zalloc_pages_exact(size_t size) > { > -- > 2.32.0.605.g8dce9f2422-goog >