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=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 21163C433E2 for ; Fri, 11 Sep 2020 13:25:43 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 783EE22224 for ; Fri, 11 Sep 2020 13:25:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="1NC+k8Xw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 783EE22224 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 D9AB24B359; Fri, 11 Sep 2020 09:25:41 -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 G+a5cwUOhf0a; Fri, 11 Sep 2020 09:25:39 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A3DFB4B346; Fri, 11 Sep 2020 09:25:39 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0319B4B2BC for ; Fri, 11 Sep 2020 09:25:39 -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 QUXtR0NicPoI for ; Fri, 11 Sep 2020 09:25:37 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id B89194B29F for ; Fri, 11 Sep 2020 09:25:37 -0400 (EDT) Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA515221E7; Fri, 11 Sep 2020 13:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599830736; bh=Th8A29FA5bf6LRE4qRi4qUHGGZelP8ofabVVMxsX9GE=; h=From:To:Cc:Subject:Date:From; b=1NC+k8Xwub06Psg2MXjdJQmTpgd+8QQckeOxptsUPar6hPITt8IYTme+Y0WkbMPDX DA1zXC+Lj0kSFFY2tXVsDtff5ZOiA5njs1jpdhG62qeo0gd2O9NRNSjOSG/LK8i45I cTrdG+pQVzYQDPtCstPR0BA564FBQYnIRm4hslMQ= From: Will Deacon To: kvmarm@lists.cs.columbia.edu Subject: [PATCH v5 00/21] KVM: arm64: Rewrite page-table code and fault handling Date: Fri, 11 Sep 2020 14:25:08 +0100 Message-Id: <20200911132529.19844-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: kernel-team@android.com, Marc Zyngier , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org 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 It's me again, with version five of the KVM page-table rework previously seen at: v1: https://lore.kernel.org/r/20200730153406.25136-1-will@kernel.org v2: https://lore.kernel.org/r/20200818132818.16065-1-will@kernel.org v3: https://lore.kernel.org/r/20200825093953.26493-1-will@kernel.org v4: https://lore.kernel.org/r/20200907152344.12978-1-will@kernel.org Changes since v4 include: * Add comments to the kerneldoc describing alignment behaviour for addresses and size parameters * Fix formatting of IPA size messages * Fix handling of unaligned addresses in kvm_phys_addr_ioremap() * Add DSB after zeroing stage-2 PGD pages * Add reviewer tags Once again, thanks to Alex, Gavin and Andrew for their comments. Will Cc: Marc Zyngier Cc: Quentin Perret Cc: James Morse Cc: Suzuki Poulose Cc: Catalin Marinas Cc: Gavin Shan Cc: Alexandru Elisei Cc: Andrew Scull 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 | 251 +--- arch/arm64/include/asm/kvm_pgtable.h | 309 ++++ arch/arm64/include/asm/pgtable-hwdef.h | 24 - 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 | 883 ++++++++++++ arch/arm64/kvm/mmu.c | 1748 ++++------------------- arch/arm64/kvm/reset.c | 40 +- 11 files changed, 1479 insertions(+), 2016 deletions(-) create mode 100644 arch/arm64/include/asm/kvm_pgtable.h create mode 100644 arch/arm64/kvm/hyp/pgtable.c -- 2.28.0.618.gf4bc123cb7-goog _______________________________________________ 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=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 7FB9EC43461 for ; Fri, 11 Sep 2020 13:27:46 +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 315FE2223E for ; Fri, 11 Sep 2020 13:27:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fVT/o33a"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="1NC+k8Xw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 315FE2223E 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=vAb1qVLsLg1h1nGXP2f5ZzVAZCSjYAFis4aYzstw/aM=; b=fVT/o33aYKzPzXVIg5F4bWt/fm P/oTsF+/z9XP07E1nQq0+fEZS/49dlP22m79yUy/vcIkeI4GoS5VL8GRnsrSqV3Aqt+p4CIeka1E9 eCakvfS/ro80DpBgZRcvw7lOOlmBuU4VBqiDs/jGT15qCfTL4syYkEC4nsxEiPfn231ZXdBRE5x8g HvN4EAa6pGmt7eULBrtswVIHsNaMT/azAkYYwvoDh5LFUeOTVAVuSdrwosi5GuIxGEjDDV7CX6Xbe ZSuY3qXPLT3wi7EFOl/yunD1ZbXLJ5FvGoOR4g+z75kW/dAW+JOvx2n0ydJifaryTptJG8Qxu5QDr X5QmgxEg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGj3c-0004Wm-TB; Fri, 11 Sep 2020 13:25:40 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGj3a-0004WB-EA for linux-arm-kernel@lists.infradead.org; Fri, 11 Sep 2020 13:25:39 +0000 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA515221E7; Fri, 11 Sep 2020 13:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599830736; bh=Th8A29FA5bf6LRE4qRi4qUHGGZelP8ofabVVMxsX9GE=; h=From:To:Cc:Subject:Date:From; b=1NC+k8Xwub06Psg2MXjdJQmTpgd+8QQckeOxptsUPar6hPITt8IYTme+Y0WkbMPDX DA1zXC+Lj0kSFFY2tXVsDtff5ZOiA5njs1jpdhG62qeo0gd2O9NRNSjOSG/LK8i45I cTrdG+pQVzYQDPtCstPR0BA564FBQYnIRm4hslMQ= From: Will Deacon To: kvmarm@lists.cs.columbia.edu Subject: [PATCH v5 00/21] KVM: arm64: Rewrite page-table code and fault handling Date: Fri, 11 Sep 2020 14:25:08 +0100 Message-Id: <20200911132529.19844-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200911_092538_593361_E7998C12 X-CRM114-Status: GOOD ( 13.19 ) 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: kernel-team@android.com, Gavin Shan , Suzuki Poulose , Marc Zyngier , Quentin Perret , Alexandru Elisei , James Morse , Andrew Scull , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org 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 It's me again, with version five of the KVM page-table rework previously seen at: v1: https://lore.kernel.org/r/20200730153406.25136-1-will@kernel.org v2: https://lore.kernel.org/r/20200818132818.16065-1-will@kernel.org v3: https://lore.kernel.org/r/20200825093953.26493-1-will@kernel.org v4: https://lore.kernel.org/r/20200907152344.12978-1-will@kernel.org Changes since v4 include: * Add comments to the kerneldoc describing alignment behaviour for addresses and size parameters * Fix formatting of IPA size messages * Fix handling of unaligned addresses in kvm_phys_addr_ioremap() * Add DSB after zeroing stage-2 PGD pages * Add reviewer tags Once again, thanks to Alex, Gavin and Andrew for their comments. Will Cc: Marc Zyngier Cc: Quentin Perret Cc: James Morse Cc: Suzuki Poulose Cc: Catalin Marinas Cc: Gavin Shan Cc: Alexandru Elisei Cc: Andrew Scull 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 | 251 +--- arch/arm64/include/asm/kvm_pgtable.h | 309 ++++ arch/arm64/include/asm/pgtable-hwdef.h | 24 - 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 | 883 ++++++++++++ arch/arm64/kvm/mmu.c | 1748 ++++------------------- arch/arm64/kvm/reset.c | 40 +- 11 files changed, 1479 insertions(+), 2016 deletions(-) create mode 100644 arch/arm64/include/asm/kvm_pgtable.h create mode 100644 arch/arm64/kvm/hyp/pgtable.c -- 2.28.0.618.gf4bc123cb7-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel