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=-5.6 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 27A64C48BDF for ; Thu, 24 Jun 2021 09:44:23 +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 D32D6613C3 for ; Thu, 24 Jun 2021 09:44:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D32D6613C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=s5et9gZe3ebBqpup0Q1mo7UzjftxY/9x4IG7XDOk9f8=; b=iWzXhLcHOagySJx2SYDr2cHGtr /5JPcF9tOFJwHpfHsPH8N1dbdibAuYuHtiDV2zUtXlyQOZBH/p+IL8Qx0oqICjzsp1/qr4Rdl1OyS PGMC7fwXCQajshNkGsKsFCMS4RtOjS38laLrqaliWV/ZlIx6dp1LeqE6oKWFVim2bmRPGlQroSxqj ZWqDr+su6GxUOnpNHFqbV07t9+Phs/FfdYuj2GZviodrAKjqOnbmBDRzJBxk60T0gNswfnaITrwTX q6PZ+bkXGiafW8ZB0iYplZW6c9TN9tVDQezvFyuv6+NrUq/k//+LIc5ozgTLUDC1E8YfYBaSYdGkf FfLEs2Ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwLsj-00DmYy-1b; Thu, 24 Jun 2021 09:42:45 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwLse-00DmWw-Ng for linux-arm-kernel@lists.infradead.org; Thu, 24 Jun 2021 09:42:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624527759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jyD4vH5kMZavgg+0al23ybbW1mNcrfB3c+Wxr6kYX38=; b=Dg09Q1JBF1FT2yGNlpUzg5ZmMVjnOBAvUUr/3l3rEgNzCEWl6NxXAbpZOaTky7eftJRdKJ oLpHNwtWiHd3s5w1WybrIvw/U5xAXkcr7IYk7Yf6x3VaO8BxsZglrteqpEmK2bmTaeJjz8 YWZIaYY8hOjiyj/sr/s0Lnv4p8Zlgy0= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-421-gRgUGceHOfunOpzH6p4HjA-1; Thu, 24 Jun 2021 05:42:38 -0400 X-MC-Unique: gRgUGceHOfunOpzH6p4HjA-1 Received: by mail-ed1-f71.google.com with SMTP id h11-20020a50ed8b0000b02903947b9ca1f3so3051534edr.7 for ; Thu, 24 Jun 2021 02:42:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=jyD4vH5kMZavgg+0al23ybbW1mNcrfB3c+Wxr6kYX38=; b=h6FRiIqT6AtfviwAhN2S2i5t/3cklsT97gCbtTf6wn9BkMHb01bTU2kbFpuCeVlwvJ r6rMu4bebMiQOeWYs9a9yNEAkkwHszzvvEV1PS7NBLJ3jRf4BDdWqv1fYhn3AEq2Rju5 2f5WCMDk41HuiweGCf/10ZdKZuZBxBnsivWCho5d8h0iT72b0kDj0DnGCKqZJmvsPMDK o4BNjaF4J4vXkcJYF6CPgrYa87nckFRQJ+yGCHUpJKIADhzafQsYh0GMa3V4xTDg4pf0 bQA3Y2r8h0B4PhN5i0rvuqQawLYBkleeeVsbmswJkdEqIyxj3Y+YT5uLDdrcMDMu7V06 6Z9g== X-Gm-Message-State: AOAM530lAvsSEC40ZJgqK+Ntl48pqWWU9uOtxX6GqkjzJHGo7Gd8pf/J epyu5YzSQnsqul2EMlKVpy4TTsHKWY0nRsGbRDRpEdlhh3mT94HXNzz2nj2/JDu6sP0lfuJjtFj 1Pm0VcPpjyJfVnGW43iShzew41C3E4XLOjGA= X-Received: by 2002:a05:6402:54c:: with SMTP id i12mr5909976edx.64.1624527756950; Thu, 24 Jun 2021 02:42:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUADYaxbQu5a0ZM6V5UX0tysDgP0Lb+XMxpzsUfVTNQ4yl7MEG7UQrmtC4bLiXvUVljS3Ohw== X-Received: by 2002:a05:6402:54c:: with SMTP id i12mr5909945edx.64.1624527756727; Thu, 24 Jun 2021 02:42:36 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id jz27sm944475ejc.33.2021.06.24.02.42.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Jun 2021 02:42:35 -0700 (PDT) Subject: Re: [PATCH 2/6] KVM: mmu: also return page from gfn_to_pfn To: Nicholas Piggin , Aleksandar Markovic , Huacai Chen , Marc Zyngier , Paul Mackerras , David Stevens , Zhenyu Wang , Zhi Wang Cc: Alexandru Elisei , 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, Sean Christopherson , Suzuki K Poulose , Vitaly Kuznetsov , Wanpeng Li , Will Deacon References: <20210624035749.4054934-1-stevensd@google.com> <20210624035749.4054934-3-stevensd@google.com> <1624524331.zsin3qejl9.astroid@bobo.none> From: Paolo Bonzini Message-ID: <201b68a7-10ea-d656-0c1e-5511b1f22674@redhat.com> Date: Thu, 24 Jun 2021 11:42:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <1624524331.zsin3qejl9.astroid@bobo.none> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210624_024240_911552_53A6B3E6 X-CRM114-Status: GOOD ( 14.41 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 24/06/21 10:52, Nicholas Piggin wrote: >> For now, wrap all calls to gfn_to_pfn functions in the new helper >> function. Callers which don't need the page struct will be updated in >> follow-up patches. > Hmm. You mean callers that do need the page will be updated? Normally > if there will be leftover users that don't need the struct page then > you would go the other way and keep the old call the same, and add a new > one (gfn_to_pfn_page) just for those that need it. Needing kvm_pfn_page_unwrap is a sign that something might be buggy, so it's a good idea to move the short name to the common case and the ugly kvm_pfn_page_unwrap(gfn_to_pfn(...)) for the weird one. In fact I'm not sure there should be any kvm_pfn_page_unwrap in the end. Paolo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel