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.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,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 658A7C49EA6 for ; Thu, 24 Jun 2021 10:14:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 403C9613F9 for ; Thu, 24 Jun 2021 10:14:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232141AbhFXKQS (ORCPT ); Thu, 24 Jun 2021 06:16:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:25949 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232063AbhFXKQR (ORCPT ); Thu, 24 Jun 2021 06:16:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624529638; 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=qgeFYkU0pR1Q1xO1W6kYeH0XfpPQ577wwQcLewdoy9I=; b=b0fBbGzUviuQWfG53+goimeZRXTChoucFs+qI1i9RJR4XZyTa1ZGw8UqJzSyIcMkGTMFVg 6VoaTSU+n5SwskP/dAJiEJGwagjVmCVvXn217lhglUDClZ7cXy2m4yIbxh9luqdTYwC7cW dr+e+S3qgEhuu9aB4i6O79C31zvuLZ0= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-332-bM4SZh9VPyidYyYEAfs_zQ-1; Thu, 24 Jun 2021 06:13:56 -0400 X-MC-Unique: bM4SZh9VPyidYyYEAfs_zQ-1 Received: by mail-wr1-f69.google.com with SMTP id k3-20020a5d62830000b029011a69a4d069so2005511wru.21 for ; Thu, 24 Jun 2021 03:13:56 -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=qgeFYkU0pR1Q1xO1W6kYeH0XfpPQ577wwQcLewdoy9I=; b=XviTpssk2vcuP8Vx2e9mGMDVw74ba7crnl1pfDK3FWlgiDI2P3+gEbObY5UsibAIXu KHDl2+YcJGmFHXFpLm0xAfGD0HcjRNqOQHmfYPk5sVotUHZFoeIAg/+KDGRx1Dnc4R3x w50MfxjnoOzPg+nLhnHvvUBawdQD0143ps0PMT+R1TnEM/rqNEslPhBS23QWT9PT7a6T r3OVw5y3tmPDde8/O/kKw7XcuKQcUcji63lk2cldu9GWvSQYOEurPMORjX9WUKva0d86 H04a1WGf24F14D/hp2tXxLLuHIPIvM4+qVY4GI8cx1PqFrmrvqpoMnJaueNGlRi2JqjS 7ajQ== X-Gm-Message-State: AOAM530+fEcbv5/C1PLcoNhvOZ8J3nNexRTReVhOlkwMB+CldB8YKMXg qbs8CBAaHDKDBp9UVfTCt5OHbrYj1+LK41Wl+1zHGPdRJ5aekawl2q6r94leAx/0dFWHDjlQsnK uTKi8hlF0APcd X-Received: by 2002:adf:e80c:: with SMTP id o12mr3526079wrm.425.1624529635766; Thu, 24 Jun 2021 03:13:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwystGI+L9gOrbELlIiJWJblqcplIdniKN++kkqVaKxE8NfJktozv1x7SoGv2eSTMa2UzUKpw== X-Received: by 2002:adf:e80c:: with SMTP id o12mr3526053wrm.425.1624529635607; Thu, 24 Jun 2021 03:13:55 -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 q19sm8207562wmc.44.2021.06.24.03.13.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Jun 2021 03:13:55 -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> <201b68a7-10ea-d656-0c1e-5511b1f22674@redhat.com> <1624528342.s2ezcyp90x.astroid@bobo.none> From: Paolo Bonzini Message-ID: Date: Thu, 24 Jun 2021 12:13:52 +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: <1624528342.s2ezcyp90x.astroid@bobo.none> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 24/06/21 11:57, Nicholas Piggin wrote: >> 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. > > If all callers were updated that is one thing, but from the changelog > it sounds like that would not happen and there would be some gfn_to_pfn > users left over. In this patches there are, so yeah the plan is to always change the callers to the new way. > But yes in the end you would either need to make gfn_to_pfn never return > a page found via follow_pte, or change all callers to the new way. If > the plan is for the latter then I guess that's fine.