Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3596809pxb; Wed, 13 Oct 2021 09:04:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDpvHPhildLSMzDiaqJECXewl5Jgt8qU2dTUOLqQL1OiP+aMRv4V6s8DCii87rcYJnz+22 X-Received: by 2002:a17:902:a3c9:b0:13e:2e41:2a76 with SMTP id q9-20020a170902a3c900b0013e2e412a76mr84691plb.43.1634141085298; Wed, 13 Oct 2021 09:04:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634141085; cv=none; d=google.com; s=arc-20160816; b=B5MU8bbG1ZnJC0gVdkwzRZUgBD7kRK1hDd/Q+mxp1ue38xgHTnYE0e90WYtrXG8KC0 KOYR67C1BvX0U6gj1WEGPf2KsnT1SueVAYKUMW7RCXEIQc09lrI0P3CCwRVE6/pfZQdA 3IxkqSB2QgJCjW1q1JVq9v5fUBn6yZnVEtvHN9rO7NaUHT6uoM+MaN+jTOxthM+1EeMv AGTbpAhhhAWo9+CKlf0/cWE1BvIHIS7oz4WpDGPefITBS6Vme3dwGeHSB07S4OgWzPQV r5YL95NthDAvWzZRj4VxXJlEbl8IqaBdUA9T+GeylSEIjDFWwkGKh23ef58S4cH+CB+4 QSuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=kINe0IWr90RBHgOAjYvlhVKzPYz79JHCEDd5CCbeejk=; b=CIEupMIYn4xxyBAhcqH8d++013xAh/7vC1v/8HAkn5zgL7y4iTzTx++ESUFFblUQzd y67h5yXIy+aPpyyZMc/eEBD5+EikNPPw7ukNKxejUfTI9nRQByv5diUzu4YYy8bVTUUc IQ7Hoy0FccehQre3oeie0rzSE87WYZoouN26Q6auH2H7KUB1yJ59UfUgi+7Pnrp10qkG /WgF7LDCrICBk7O5VMf/Ng/+92CFLAnzWHr3gyo4YpP5dlBDXOfIHOyIUeH3iRcsatq9 J/b3yWcYfb1ubF+R2ORJ9mQNyEVYz/ufZMRFd5tir9hBIOlJfyLEdleYZamrP2a30rK6 eCYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=OsS0vN4g; 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 s5si21382398plq.291.2021.10.13.09.03.55; Wed, 13 Oct 2021 09:04:45 -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=20210112 header.b=OsS0vN4g; 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 S236499AbhJMQBJ (ORCPT + 99 others); Wed, 13 Oct 2021 12:01:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236295AbhJMQA7 (ORCPT ); Wed, 13 Oct 2021 12:00:59 -0400 Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5307C061753 for ; Wed, 13 Oct 2021 08:58:55 -0700 (PDT) Received: by mail-qk1-x749.google.com with SMTP id c14-20020a37e10e000000b0045f3f44539eso2228102qkm.14 for ; Wed, 13 Oct 2021 08:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=kINe0IWr90RBHgOAjYvlhVKzPYz79JHCEDd5CCbeejk=; b=OsS0vN4gyNtNRBwMG8bFigYCqkq3NooTKR7YjqqinRU1RPJxKLUz47JA1C3v8vh/1I yfLpGr6j0uvRc5U+NVL8ceUMekYzc6PXHJPkoBCbo1LcBSWP61RnabYuvsYnc/ELrilQ u1wd9tD4HSNnUO/mKylza3pmeVGPserwu8e5b/QisNp5m8+YGH/CKaDdVOS8tLMBDbgt MpYKA1gHhlXQUV9f7nJf/mP68j2oIb0ukvdNI9FTnhBF2i3H4OLN/A8vej7da8eZuWaI wwUjRR5U0HVYHzA3Xes9MbWGfxBccnUtmJ2XCEdoCqEeznbLJ/RjkfghxkDOCf3POi/I wnAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=kINe0IWr90RBHgOAjYvlhVKzPYz79JHCEDd5CCbeejk=; b=pXK7IwCvmhv5Y7c7Gk9bR6FLBT2V/giG8agYc4T7lCl8WrxtnwNTIlsMDhFke3fySj 2LBMCp/eWW+k1M4QThnPqQ/shsSlikx8aOkWPjFaOG8/2xjhY9ZcBgsTJKMWg0THw9Pb 0wcm7n1UNmOIPyXDMjCS1d0ByaWLoiSBHsgMFVJThcbsQpXBprx+wAwtW+xwUo/Y2a1y ezG5TDAP/cjHazzFzRxiK1XL4nU5OTisNd+5bhbo7V5nVRgftmxN+eRUnK/GXofY0ZT8 dkOhANuKNCEPhMfx4xEvWa9iA/GzDe/lfAmv+Q7DGI+Y3n6FOCc7nIjfu0TAwP93t0dj gi4Q== X-Gm-Message-State: AOAM530bTxG5FAU6V9tzgw1gmkRIGdkAoPoaahCAT0Gk25EpQGnSz60c iW9+H0iY+EcWzaRhZAAU1iEtvuknEPz7 X-Received: from luke.lon.corp.google.com ([2a00:79e0:d:210:65b5:73d3:1558:b9ae]) (user=qperret job=sendgmr) by 2002:ac8:5994:: with SMTP id e20mr43717qte.331.1634140734872; Wed, 13 Oct 2021 08:58:54 -0700 (PDT) Date: Wed, 13 Oct 2021 16:58:24 +0100 In-Reply-To: <20211013155831.943476-1-qperret@google.com> Message-Id: <20211013155831.943476-10-qperret@google.com> Mime-Version: 1.0 References: <20211013155831.943476-1-qperret@google.com> X-Mailer: git-send-email 2.33.0.882.g93a45727a2-goog Subject: [PATCH 09/16] KVM: arm64: Hook up ->page_count() for hypervisor stage-1 page-table From: Quentin Perret To: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Fuad Tabba , David Brazdil Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Will Deacon kvm_pgtable_hyp_unmap() relies on the ->page_count() function callback being provided by the memory-management operations for the page-table. Wire up this callback for the hypervisor stage-1 page-table. Signed-off-by: Will Deacon Signed-off-by: Quentin Perret --- arch/arm64/kvm/hyp/nvhe/setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c index ad89801dfed7..98b39facae04 100644 --- a/arch/arm64/kvm/hyp/nvhe/setup.c +++ b/arch/arm64/kvm/hyp/nvhe/setup.c @@ -246,6 +246,7 @@ void __noreturn __pkvm_init_finalise(void) .virt_to_phys = hyp_virt_to_phys, .get_page = hpool_get_page, .put_page = hpool_put_page, + .page_count = hyp_page_count, }; pkvm_pgtable.mm_ops = &pkvm_pgtable_mm_ops; -- 2.33.0.882.g93a45727a2-goog