From patchwork Tue Jun 8 11:45:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Perret X-Patchwork-Id: 12306659 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=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 A277DC47082 for ; Tue, 8 Jun 2021 12:15:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 73F6E61246 for ; Tue, 8 Jun 2021 12:15:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 73F6E61246 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Mime-Version: Message-Id:Date: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=4VgVv27XZV65/WGOb+YXkUNPYDc4eQj6RCTvXn+n+1M=; b=n4c IxFwo8nlSfJdoUA7doCcq6mYo9cdNXOiOs3JYZPEVNYZ36fzYOdxwMKwQuLDWOaWOINqrKNi4k3Ua ASPRt1oNkwWpglBfxMhLqDPtf91j04Xc2Iqt8fGSvmGzi/BHFT/JX+48Ss+NZQAZUEM0vKgRSwUwB RJAXjRcxfc4P2qPPxFD6GyB3NVHkSJLh3x7D38MEFfeDVsEcydoT3g4CDNnz9vGRsZJP3VZ9tKty8 G64QoVXaouvYJPzx/vo1GPxdNAbfeELexmDtfI/FqoYeMupFI/flwQw0VAxGi/NTBUu4T6EgzIsy/ v1rv78P55sQ6qLpOvoaTE2zSKYiKcrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqac9-008GMP-TJ; Tue, 08 Jun 2021 12:13:50 +0000 Received: from mail-wr1-f73.google.com ([209.85.221.73]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqaBe-0086c1-Ms for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 11:46:28 +0000 Received: by mail-wr1-f73.google.com with SMTP id h104-20020adf90710000b029010de8455a3aso9337716wrh.12 for ; Tue, 08 Jun 2021 04:46:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=vVP6MnE5jtfCRNBSFEk8Tts1aw1n4jW8xd82TUR2TLU=; b=bsninEwjms+mWvprSOPlfQ4X/AFVMRBlxagtmZ/Wb9PNB3vao021HDHSnPOnN1bbG8 c/k1nJyU8KGyKg1CHj50UHzW9860yE4GUoBteLsOMatA76Lnku3N9/7yQFSdd+cu5tux 1SOqFVEshQtQlXFDUf63YvlroPYZPvMZ1fAiSZhJwcR+rtqz4AEfZ7lL6lcqyYN9SeZk o4cGRh/9uY15ziLA+Tvu3lz2eJUlm4PJC9zpyFs1VslISm3QD3Xsj0cgmyVUt8FAIg89 GoKfasGi/ePTYi1DRf5IbMaWAjvN7QRM4W2XfRJnlvP/FrdhyMmyOUrGuUXgV8WSVN8J 0AoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=vVP6MnE5jtfCRNBSFEk8Tts1aw1n4jW8xd82TUR2TLU=; b=aLPn2EoiKiQy10XKPsMTFsk7IwARY5YPiszmYFHZY/Maps0EBc1JP2IPczasqEXkKO 86vZE0bkpKG6Jj4+NSKaI9qpeTctIIp0PqrDXLsUOtuNIc/ylmnZWCqrzgrYblEyxu1v F12d1KP92Vh6D5QXQNro5xjadD182A1+PyMqdnxBHLL9QMOXVWnWSdv1XsVN3aEBMzGq RJbCtdGiRI8WDXWkvSZnREr9wi17jxA+ZE/d0r/HcPSx74UF4DpO0VojN9AsBfrzgZWc e3cFrWJK123wGAyXbBlDC16SPGCKhL2gQ5l+F/WP0LVvzhN0Z4CJ6oJ3yd+ktPhxryra eDVw== X-Gm-Message-State: AOAM530Qa69mHIUj+pPgkhAEZI5VSgfDljeKlw089ItUZspIWul97X1P 4j2SCff6eGfpcpbB7fl2RTTy7WHzbTQH X-Google-Smtp-Source: ABdhPJxnQTZBsAgtPXFz17t2riToek8ZifdE5myRG5kTzUVYdJXzhpzMu8D3AEklq9Tq4ufpuZnb/AOKJ/Uu X-Received: from r2d2-qp.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1652]) (user=qperret job=sendgmr) by 2002:a7b:c013:: with SMTP id c19mr3738933wmb.158.1623152723285; Tue, 08 Jun 2021 04:45:23 -0700 (PDT) Date: Tue, 8 Jun 2021 11:45:11 +0000 Message-Id: <20210608114518.748712-1-qperret@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.32.0.rc1.229.g3e70b5a671-goog Subject: [PATCH v3 0/7] KVM: arm64: Reduce hyp_vmemmap overhead From: Quentin Perret To: maz@kernel.org, will@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, suzuki.poulose@arm.com Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com, linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210608_044626_795531_60442562 X-CRM114-Status: GOOD ( 10.78 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi all, This is a v3 of the patch series previously posted here: https://lore.kernel.org/r/20210602094347.3730846-1-qperret@google.com Please refer to the cover letter of v1 for the context and motivation behind the series. Changes since v2: - Rebased on kvmarm/next Thanks, Quentin Quentin Perret (7): KVM: arm64: Move hyp_pool locking out of refcount helpers KVM: arm64: Use refcount at hyp to check page availability KVM: arm64: Remove list_head from hyp_page KVM: arm64: Unify MMIO and mem host stage-2 pools KVM: arm64: Remove hyp_pool pointer from struct hyp_page KVM: arm64: Use less bits for hyp_page order KVM: arm64: Use less bits for hyp_page refcount arch/arm64/kvm/hyp/include/nvhe/gfp.h | 45 +------ arch/arm64/kvm/hyp/include/nvhe/mem_protect.h | 2 +- arch/arm64/kvm/hyp/include/nvhe/memory.h | 7 +- arch/arm64/kvm/hyp/include/nvhe/mm.h | 13 +- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 60 +++++----- arch/arm64/kvm/hyp/nvhe/page_alloc.c | 112 +++++++++++++----- arch/arm64/kvm/hyp/nvhe/setup.c | 30 +++-- arch/arm64/kvm/hyp/reserved_mem.c | 3 +- 8 files changed, 145 insertions(+), 127 deletions(-)