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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 7E6A1C48BDF for ; Thu, 24 Jun 2021 10:45:09 +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 474F7613FD for ; Thu, 24 Jun 2021 10:45:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 474F7613FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:Message-Id:MIME-Version:In-Reply-To: References:Cc:To:Subject:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=owS1g+5MnF92GSNWQl+nMk2s6wStWD2qRe51e1KmXqs=; b=dxW30ENdfttF/2 1Hyp3jeVAIhgsD/BMHswpdP4C/2ctirYgyT3Kk0bu/GkQtxIkl+5jtnafjVZfrBlombiScg7RrwRB Sm2+qhvXzpqtY98bZvKug7pBCsusvwbISqzNaROZkqHRckB01XA+EXb52wBNuk1EbSJqFD+YkRhaN lFL+jRhLWAh0IpUN6VFhA5yP0/tkddLlU+XuRmBHJJlGmE1jYntmJds6lbch36CTetT1bjpWS1ara PgW1c8wpi921qvab+Shh9lnHRQhH8o7TeFV1AVCn0n60RMO7TndFp+EA6bzmCtnNCLDvXr0uRZxIn sr0RiwWp4UqrQ4OfqBEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwMph-00ECpZ-3g; Thu, 24 Jun 2021 10:43:41 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwMpc-00ECn5-E6 for linux-arm-kernel@lists.infradead.org; Thu, 24 Jun 2021 10:43:37 +0000 Received: by mail-pl1-x630.google.com with SMTP id y21so2740991plb.4 for ; Thu, 24 Jun 2021 03:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=Ntmvbr4Rsn/lopxAADIIDgcNErNmU/zbadQcByBiYK4=; b=Uzc43caEhY2Ti31+lpHHW0AZ5sLCVj6W+n4t/ez5IgVzQkVZOibK2DIWQ0+CAuzt9U PpuIA4kDsyK3chDvHhxE+YawXhAPb2eWGecCvYilJeif5bW1AWaPBDm7W4vYjxTYq4eX vsAbVyUYfQJDK46zRrnjfoRU3RdSuUfndWfij+20vPjPzE9a8Ky+gzwBiWuGHYujrH97 b1g8G9j+MqQ6oKRgvSqRRvZdf9oww+7IytooiBQtjKLAdCQfMAXpO/dc/FMWyHkr12JS ZqabhMCopqc94H8G+WPpptqvIqeO4Wfi2qlPKFQXomh5RWpLJ4WGRgIbJ4SL7OebaZ9b Cu7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=Ntmvbr4Rsn/lopxAADIIDgcNErNmU/zbadQcByBiYK4=; b=FlAC6SAGFgiLx3qVrlQueP6Ptdgq4zuFr+g+FcMzn92+0FV57EhhuM7IgkWOyLKPp4 wppskGS0UC9o7fhx6qIUHOk6K8u2i2kiGCzNY22/EXeEvpiJtQYG/CV4cOt7hWawdplW 4UowIfJHhVooUfj3Ulcr0PUuaczUpOyPx+ambsL+H0HUaGE0mRJgILVS1esa22D/ZosD 7uds0GJqqnYk2kZIJUbWmB/t76+LZ3115Se+BAgARapEqKXggW6ZtSJM/kcoxuWt8NrD w4FscmYU0bar1bg621AH5bltn7elwZ1kVbGOXVwF+A/LQ+AEBk4GWsYlsSDt5Z88quK1 RKlw== X-Gm-Message-State: AOAM532xqUxKcGXndo7Zrn1cLT1CgHX5+8ah0WjSSYRXKu35+CqbXMAZ iammNjaC5fCqLrBlOfocEoM= X-Google-Smtp-Source: ABdhPJwSbcPeLeFEknq5SPs1K9/7wAZ9//Y8XUJsBm0HOgxDXNJ+d8W1kIX2/TWCimMS0wf9W28w6Q== X-Received: by 2002:a17:90a:ce87:: with SMTP id g7mr14492750pju.189.1624531415692; Thu, 24 Jun 2021 03:43:35 -0700 (PDT) Received: from localhost (60-242-147-73.tpgi.com.au. [60.242.147.73]) by smtp.gmail.com with ESMTPSA id n12sm2540624pfu.5.2021.06.24.03.43.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 03:43:35 -0700 (PDT) Date: Thu, 24 Jun 2021 20:43:29 +1000 From: Nicholas Piggin Subject: Re: [PATCH 3/6] KVM: x86/mmu: avoid struct page in MMU To: Marc Zyngier Cc: Aleksandar Markovic , Alexandru Elisei , Huacai Chen , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, James Morse , Jim Mattson , Joerg Roedel , kvmarm@lists.cs.columbia.edu, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Paul Mackerras , Paolo Bonzini , Sean Christopherson , David Stevens , Suzuki K Poulose , Vitaly Kuznetsov , Wanpeng Li , Will Deacon , Zhenyu Wang , Zhi Wang References: <20210624035749.4054934-1-stevensd@google.com> <20210624035749.4054934-4-stevensd@google.com> <1624524744.2sr7o7ix86.astroid@bobo.none> <87mtrfinks.wl-maz@kernel.org> In-Reply-To: <87mtrfinks.wl-maz@kernel.org> MIME-Version: 1.0 Message-Id: <1624531381.4bht02wxsj.astroid@bobo.none> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210624_034336_539282_BD2D3871 X-CRM114-Status: GOOD ( 12.15 ) 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 Excerpts from Marc Zyngier's message of June 24, 2021 8:06 pm: > On Thu, 24 Jun 2021 09:58:00 +0100, > Nicholas Piggin wrote: >> >> Excerpts from David Stevens's message of June 24, 2021 1:57 pm: >> > From: David Stevens >> > out_unlock: >> > if (is_tdp_mmu_root(vcpu->kvm, vcpu->arch.mmu->root_hpa)) >> > read_unlock(&vcpu->kvm->mmu_lock); >> > else >> > write_unlock(&vcpu->kvm->mmu_lock); >> > - kvm_release_pfn_clean(pfn); >> > + if (pfnpg.page) >> > + put_page(pfnpg.page); >> > return r; >> > } >> >> How about >> >> kvm_release_pfn_page_clean(pfnpg); > > I'm not sure. I always found kvm_release_pfn_clean() ugly, because it > doesn't mark the page 'clean'. I find put_page() more correct. > > Something like 'kvm_put_pfn_page()' would make more sense, but I'm so > bad at naming things that I could just as well call it 'bob()'. That seems like a fine name to me. A little better than bob. Thanks, Nick _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel