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=-17.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 5BB61C4332B for ; Mon, 15 Mar 2021 16:32:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C38E64F33 for ; Mon, 15 Mar 2021 16:32:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231740AbhCOQbj (ORCPT ); Mon, 15 Mar 2021 12:31:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:50666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233118AbhCOQbO (ORCPT ); Mon, 15 Mar 2021 12:31:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4077264F2A; Mon, 15 Mar 2021 16:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615825874; bh=z4NG2AwrvKp1rnGS0SnMJpQVrKZy6B5wV36WyKhoKEo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tyt+CaZLBoLOKlgYe6sqDGdASlo2gRzBQ+4lDt1Z7Tzr1mCndmIzDb2TXpey2Nbg4 5bWEAEWryYnRe4wowJCAUc1QEee1xbU9dqctOglt4WC536c8iLm1vvZuFsWk5rhWEw drmFCiy+bHWWLhnDQwtl1FTAqcCBZgmumzZvIs+t+0k4VwliM1L9cZLaRBWNqU8W4G K//s+7Z91kz8PIDC8y24LSW1moBBJwSZC0usRSUlgzvFgLKEOSnY0NcPzuemBLuHQw adv65R533Yx5o4pv0LMMsyYb3CU5YSiSIH64GKnwAhh+HOBLfwtIII6RpEC7wiK92G hINYWbd8VDEjg== Date: Mon, 15 Mar 2021 16:31:07 +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, seanjc@google.com, mate.toth-pal@arm.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, tabba@google.com, ardb@kernel.org, mark.rutland@arm.com, dbrazdil@google.com Subject: Re: [PATCH v5 31/36] KVM: arm64: Add kvm_pgtable_stage2_find_range() Message-ID: <20210315163107.GA3430@willie-the-truck> References: <20210315143536.214621-1-qperret@google.com> <20210315143536.214621-32-qperret@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210315143536.214621-32-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 Mon, Mar 15, 2021 at 02:35:31PM +0000, Quentin Perret wrote: > Since the host stage 2 will be identity mapped, and since it will own > most of memory, it would preferable for performance to try and use large > block mappings whenever that is possible. To ease this, introduce a new > helper in the KVM page-table code which allows to search for large > ranges of available IPA space. This will be used in the host memory > abort path to greedily idmap large portion of the PA space. > > Signed-off-by: Quentin Perret > --- > arch/arm64/include/asm/kvm_pgtable.h | 29 +++++++++ > arch/arm64/kvm/hyp/pgtable.c | 89 ++++++++++++++++++++++++++-- > 2 files changed, 114 insertions(+), 4 deletions(-) Acked-by: Will Deacon Will 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.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 9EBE3C433DB for ; Mon, 15 Mar 2021 16:31:20 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 1DE3264E42 for ; Mon, 15 Mar 2021 16:31:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DE3264E42 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B50CD4B602; Mon, 15 Mar 2021 12:31:19 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sb6rkL2S0mAB; Mon, 15 Mar 2021 12:31:17 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B12804B632; Mon, 15 Mar 2021 12:31:17 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0B2A54B61B for ; Mon, 15 Mar 2021 12:31:16 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qOcYswPTrfTf for ; Mon, 15 Mar 2021 12:31:15 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 277314B602 for ; Mon, 15 Mar 2021 12:31:15 -0400 (EDT) Received: by mail.kernel.org (Postfix) with ESMTPSA id 4077264F2A; Mon, 15 Mar 2021 16:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615825874; bh=z4NG2AwrvKp1rnGS0SnMJpQVrKZy6B5wV36WyKhoKEo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tyt+CaZLBoLOKlgYe6sqDGdASlo2gRzBQ+4lDt1Z7Tzr1mCndmIzDb2TXpey2Nbg4 5bWEAEWryYnRe4wowJCAUc1QEee1xbU9dqctOglt4WC536c8iLm1vvZuFsWk5rhWEw drmFCiy+bHWWLhnDQwtl1FTAqcCBZgmumzZvIs+t+0k4VwliM1L9cZLaRBWNqU8W4G K//s+7Z91kz8PIDC8y24LSW1moBBJwSZC0usRSUlgzvFgLKEOSnY0NcPzuemBLuHQw adv65R533Yx5o4pv0LMMsyYb3CU5YSiSIH64GKnwAhh+HOBLfwtIII6RpEC7wiK92G hINYWbd8VDEjg== Date: Mon, 15 Mar 2021 16:31:07 +0000 From: Will Deacon To: Quentin Perret Subject: Re: [PATCH v5 31/36] KVM: arm64: Add kvm_pgtable_stage2_find_range() Message-ID: <20210315163107.GA3430@willie-the-truck> References: <20210315143536.214621-1-qperret@google.com> <20210315143536.214621-32-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210315143536.214621-32-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: android-kvm@google.com, catalin.marinas@arm.com, mate.toth-pal@arm.com, seanjc@google.com, tabba@google.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Mon, Mar 15, 2021 at 02:35:31PM +0000, Quentin Perret wrote: > Since the host stage 2 will be identity mapped, and since it will own > most of memory, it would preferable for performance to try and use large > block mappings whenever that is possible. To ease this, introduce a new > helper in the KVM page-table code which allows to search for large > ranges of available IPA space. This will be used in the host memory > abort path to greedily idmap large portion of the PA space. > > Signed-off-by: Quentin Perret > --- > arch/arm64/include/asm/kvm_pgtable.h | 29 +++++++++ > arch/arm64/kvm/hyp/pgtable.c | 89 ++++++++++++++++++++++++++-- > 2 files changed, 114 insertions(+), 4 deletions(-) Acked-by: Will Deacon Will _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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.7 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,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 DC072C433DB for ; Mon, 15 Mar 2021 16:33: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 70CE064E42 for ; Mon, 15 Mar 2021 16:33:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70CE064E42 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=8N1Kg5cSe0rnNATCtQ6lyTOmJ4JScfO4Z2Ibg38dOjs=; b=RoYiYgmPIuDoJy3MS9PiYMuDJ r8hdgN4nunhC6X07K3CsbmxTbcnfWUs5SP4JMAuVTToBWaF1wPUXzaWR/DRWxP0zP9DvU+9RqEAyq Y8m6FYMCQVfWfvzUt7GCvVYaNdob1YcmjG7G6+46VBlx78Zq6BxH3CXL0vc5wekTqZ83aXoL4XLpG GUJwbVACNhi9PsCSUx0qqBjxyg9HpTXSFmq7yOYuH+98JJDVKAOv5CSyl9L8YBX8P/BrQooZS+21k NH3UM3I7d579KUygWK3sSRorRuX6uu31uwTFklTZSqv0zeZx0FWtTNHJsRBYbBv4AgVnRiTm0WeuE F5zlUeabw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lLq7n-00GM8y-3A; Mon, 15 Mar 2021 16:31:23 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lLq7g-00GM85-Bd for linux-arm-kernel@lists.infradead.org; Mon, 15 Mar 2021 16:31:20 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4077264F2A; Mon, 15 Mar 2021 16:31:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615825874; bh=z4NG2AwrvKp1rnGS0SnMJpQVrKZy6B5wV36WyKhoKEo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tyt+CaZLBoLOKlgYe6sqDGdASlo2gRzBQ+4lDt1Z7Tzr1mCndmIzDb2TXpey2Nbg4 5bWEAEWryYnRe4wowJCAUc1QEee1xbU9dqctOglt4WC536c8iLm1vvZuFsWk5rhWEw drmFCiy+bHWWLhnDQwtl1FTAqcCBZgmumzZvIs+t+0k4VwliM1L9cZLaRBWNqU8W4G K//s+7Z91kz8PIDC8y24LSW1moBBJwSZC0usRSUlgzvFgLKEOSnY0NcPzuemBLuHQw adv65R533Yx5o4pv0LMMsyYb3CU5YSiSIH64GKnwAhh+HOBLfwtIII6RpEC7wiK92G hINYWbd8VDEjg== Date: Mon, 15 Mar 2021 16:31:07 +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, seanjc@google.com, mate.toth-pal@arm.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, tabba@google.com, ardb@kernel.org, mark.rutland@arm.com, dbrazdil@google.com Subject: Re: [PATCH v5 31/36] KVM: arm64: Add kvm_pgtable_stage2_find_range() Message-ID: <20210315163107.GA3430@willie-the-truck> References: <20210315143536.214621-1-qperret@google.com> <20210315143536.214621-32-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210315143536.214621-32-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210315_163119_046768_8E96C6DE X-CRM114-Status: GOOD ( 11.05 ) 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 Mon, Mar 15, 2021 at 02:35:31PM +0000, Quentin Perret wrote: > Since the host stage 2 will be identity mapped, and since it will own > most of memory, it would preferable for performance to try and use large > block mappings whenever that is possible. To ease this, introduce a new > helper in the KVM page-table code which allows to search for large > ranges of available IPA space. This will be used in the host memory > abort path to greedily idmap large portion of the PA space. > > Signed-off-by: Quentin Perret > --- > arch/arm64/include/asm/kvm_pgtable.h | 29 +++++++++ > arch/arm64/kvm/hyp/pgtable.c | 89 ++++++++++++++++++++++++++-- > 2 files changed, 114 insertions(+), 4 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