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=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 A3ACEC433DF for ; Thu, 27 Aug 2020 16:26:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5977822B4D for ; Thu, 27 Aug 2020 16:26:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZtEfMuJM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5977822B4D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=aOJnfymjUSvxjk/zKyB1pTZFVzt382eCkzYXWpcDxZU=; b=ZtEfMuJMUsFbCBEkj0397pmvT H0GJ28JT6oxQsSzWOgDfDzKmCb7rSubzB/VlbY8yrCYfNlvgd71f8HSmWvYTEgUauUGCJ/iJ1u/6b lqPeaXUVo/CriTAjrQvJv/0MSB5ky/dmJHGLw7pJY1oPlMu6Ed6AseYQXVO1+ajP+ilioVsiYBrGN jLmWozT3ceRQrxo6Viw4Ll9Bgjbe6NTG4obLqhFf4Yrs0h0A5P4xhxF4ke2TsTwj2Ksz7Qv3F5yGs IBvPvxyfnHpsxNCF9NygDa3TnKdPGFG6M7jemjPZ1oKiotBw+U4239FKvvPwvRWyjOoWOAtFLeHn8 0c7mcaqKg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBKiA-0004KP-1F; Thu, 27 Aug 2020 16:25:14 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBKi7-0004Jm-Mw for linux-arm-kernel@lists.infradead.org; Thu, 27 Aug 2020 16:25:12 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ACE0631B; Thu, 27 Aug 2020 09:25:06 -0700 (PDT) Received: from [192.168.0.110] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DB1673F66B; Thu, 27 Aug 2020 09:25:05 -0700 (PDT) Subject: Re: [PATCH v3 00/21] KVM: arm64: Rewrite page-table code and fault handling To: Will Deacon , kvmarm@lists.cs.columbia.edu References: <20200825093953.26493-1-will@kernel.org> From: Alexandru Elisei Message-ID: <2281278d-03fe-d824-2a51-b494417f7c8b@arm.com> Date: Thu, 27 Aug 2020 17:26:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200825093953.26493-1-will@kernel.org> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200827_122511_845658_29AEF211 X-CRM114-Status: GOOD ( 17.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, Catalin Marinas 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 Hi Will, I've been looking into pinning guest memory for KVM SPE, so I like to think that the stage 2 page table code is not entirely alien to me. I'll do my best to review the series, I hope you'll find it useful. Thanks, Alex On 8/25/20 10:39 AM, Will Deacon wrote: > Hello folks, > > This is version three of the KVM page-table rework that I previously posted > here: > > v1: https://lore.kernel.org/r/20200730153406.25136-1-will@kernel.org > v2: https://lore.kernel.org/r/20200818132818.16065-1-will@kernel.org > > Changes since v2 include: > > * Rebased onto -rc2, which includes the conflicting OOM blocking fixes > * Dropped the patch trying to "fix" the memcache in kvm_phys_addr_ioremap() > > Cheers, > > Will > > Cc: Marc Zyngier > Cc: Quentin Perret > Cc: James Morse > Cc: Suzuki Poulose > Cc: Catalin Marinas > Cc: Gavin Shan > Cc: kernel-team@android.com > Cc: linux-arm-kernel@lists.infradead.org > > --->8 > > Quentin Perret (4): > KVM: arm64: Add support for stage-2 write-protect in generic > page-table > KVM: arm64: Convert write-protect operation to generic page-table API > KVM: arm64: Add support for stage-2 cache flushing in generic > page-table > KVM: arm64: Convert memslot cache-flushing code to generic page-table > API > > Will Deacon (17): > KVM: arm64: Remove kvm_mmu_free_memory_caches() > KVM: arm64: Add stand-alone page-table walker infrastructure > KVM: arm64: Add support for creating kernel-agnostic stage-1 page > tables > KVM: arm64: Use generic allocator for hyp stage-1 page-tables > KVM: arm64: Add support for creating kernel-agnostic stage-2 page > tables > KVM: arm64: Add support for stage-2 map()/unmap() in generic > page-table > KVM: arm64: Convert kvm_phys_addr_ioremap() to generic page-table API > KVM: arm64: Convert kvm_set_spte_hva() to generic page-table API > KVM: arm64: Convert unmap_stage2_range() to generic page-table API > KVM: arm64: Add support for stage-2 page-aging in generic page-table > KVM: arm64: Convert page-aging and access faults to generic page-table > API > KVM: arm64: Add support for relaxing stage-2 perms in generic > page-table code > KVM: arm64: Convert user_mem_abort() to generic page-table API > KVM: arm64: Check the pgt instead of the pgd when modifying page-table > KVM: arm64: Remove unused page-table code > KVM: arm64: Remove unused 'pgd' field from 'struct kvm_s2_mmu' > KVM: arm64: Don't constrain maximum IPA size based on host > configuration > > arch/arm64/include/asm/kvm_host.h | 2 +- > arch/arm64/include/asm/kvm_mmu.h | 221 +--- > arch/arm64/include/asm/kvm_pgtable.h | 279 ++++ > arch/arm64/include/asm/pgtable-hwdef.h | 23 - > arch/arm64/include/asm/pgtable-prot.h | 19 - > arch/arm64/include/asm/stage2_pgtable.h | 215 ---- > arch/arm64/kvm/arm.c | 2 +- > arch/arm64/kvm/hyp/Makefile | 2 +- > arch/arm64/kvm/hyp/pgtable.c | 860 +++++++++++++ > arch/arm64/kvm/mmu.c | 1566 +++-------------------- > arch/arm64/kvm/reset.c | 38 +- > 11 files changed, 1326 insertions(+), 1901 deletions(-) > create mode 100644 arch/arm64/include/asm/kvm_pgtable.h > create mode 100644 arch/arm64/kvm/hyp/pgtable.c > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel