Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp647206pxj; Thu, 10 Jun 2021 09:19:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygX8ov6nVh3DveJjMF+XYseAOXVvq+3bWUMhOpnBybY3QHHQZ8khmJmkhfUO1K9wnXwYxq X-Received: by 2002:a17:906:6ad0:: with SMTP id q16mr401683ejs.286.1623341963163; Thu, 10 Jun 2021 09:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623341963; cv=none; d=google.com; s=arc-20160816; b=NpzOlXxvkg/Q6BvVTzHXufauGM7qSD9661tCW9Zhg0g6uFXnJzOQfbaDUaUDUT+uoY d4r3wxOAL8Q1pnfU/Tmn4KRltd1QfP0ComPtSZ/CuiaSR7bYavaKpfjifY3YtnDHiTg7 mQuSsDJaxoz1yg8YvZcEJk9pxynzFAtS2aCv2FHnfqbF1w9gw4L+jf4EmoW4pGZQl8Qw HHRbml4sHlCPotEq1spJT9zJhOFyJ2KhUTkQuX2BBnCSOCYFhNzJEdosicPtTw/yWW8B 0IJNlEstOCuRDcUsI9u9XJ3kMhlKYbB2o2QJuHY5rYq1RGa7ixTGtqfMP5LAsBVJLmYf mkIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ZV1bVT+oVuvRwSag1zc65v0K9NM/OVSkL9nei36QNwU=; b=04YtBL3adew8K6hVbepE45NdhqHJUKTYg1exyL4uCCZqn2Ol0irf08YUBuK2VhUVMp CY/v2hYWsEyrpYBq4ziptWxpBEdbSDfNPJMoE6h/J3wkwqye9i+1adhyyfV6lyZZGLTt E4FOcpfqhPbIruG2dlNpLa4diWXWl3yaHoCB0XJNwQbg/ghqcAmqTcROeJWzjnTs1L87 KVULDqFy9ZgqC/VTBzwePt9uSjTV0PPjEhlSIsxeiWGmJHTqy2rGZnSee75xhR05RPUN rgBGUQc3zSGl9PpboJpyAHKEco4SyTbifxeUqdI1Yhylz5NkhTAeag2mIXG2K0OgVVFE ojZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Js/uGmJG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e27si2898730ejl.653.2021.06.10.09.18.58; Thu, 10 Jun 2021 09:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Js/uGmJG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230343AbhFJQTh (ORCPT + 99 others); Thu, 10 Jun 2021 12:19:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26978 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbhFJQTg (ORCPT ); Thu, 10 Jun 2021 12:19:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623341860; 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=ZV1bVT+oVuvRwSag1zc65v0K9NM/OVSkL9nei36QNwU=; b=Js/uGmJGGPc4MTjKtvj2vppBlaeKorOapUPP2LQVjS96tlptWd7lCK982NMtMWSVwtb96R zoGxoiyVCGqevUUhtSYfDq/6U23aMjpnqgJ9Srdgyn74iaOpFo4CcP+2IhrIGRmCxjzsEM IlLOctNxhwtoY2p6GrMGndYIKRjJ4Qk= 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-50-rk7GBxvqP_KQpGTyP83wUw-1; Thu, 10 Jun 2021 12:17:38 -0400 X-MC-Unique: rk7GBxvqP_KQpGTyP83wUw-1 Received: by mail-wr1-f69.google.com with SMTP id h10-20020a5d688a0000b0290119c2ce2499so1168474wru.19 for ; Thu, 10 Jun 2021 09:17:38 -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=ZV1bVT+oVuvRwSag1zc65v0K9NM/OVSkL9nei36QNwU=; b=Z2ZwYL7oZB9Ms3IB87GdLXEToMqM6owLxYnAfGO798cCc5ylnYJZ2uHrwmV3R1dy/c Q8OjgLHUI7tT7xFKhea2P1eK5/mTS43obKXRUbBAcjUlQs1p9QkRwglQYgw6aLHRptfi IWlT3GpwvH+vqT2f52tK9a/MLu6i6tJCkkWZp0rNLYgVVjUDlRVfwCYLjpYos4EguqTs bjuGHJ7VOOOl2eneP3jg08/KzejYOINBpHRDRcYdZSXs7l47NEZzWNPaMuZERBtcfhg1 cOkC5Pdcqy5D1xcQWB0pUrlNu3ES012cIagKulzelo/jKougbcsyBMgQBtry6+y3MVNN XUkQ== X-Gm-Message-State: AOAM532H4j6999TjWGlepO8S8VVtP1OFMxUyb/VNjGbUs406h1F7UvqU Q3VXfiEERonXbU79ObujAQc0Nbtkjw1reujundn+zjF5/R2t6rTdwX39i5TpE9PR5GHrWMUPFWC HaSl4PnlzVC096y2XKzIDXNUuT4lTtQy+QGr2CWXn1Npr5K7HsuetRKdACEJW+Y0Qjv1Ome7jbv 9g X-Received: by 2002:a05:600c:4f4e:: with SMTP id m14mr15919088wmq.157.1623341857388; Thu, 10 Jun 2021 09:17:37 -0700 (PDT) X-Received: by 2002:a05:600c:4f4e:: with SMTP id m14mr15919044wmq.157.1623341857072; Thu, 10 Jun 2021 09:17:37 -0700 (PDT) Received: from ?IPv6:2001:b07:add:ec09:c399:bc87:7b6c:fb2a? ([2001:b07:add:ec09:c399:bc87:7b6c:fb2a]) by smtp.gmail.com with ESMTPSA id 25sm9762200wmk.20.2021.06.10.09.17.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Jun 2021 09:17:36 -0700 (PDT) Subject: Re: [PATCH v3 2/8] KVM: Integrate gfn_to_memslot_approx() into search_memslots() To: Sean Christopherson , "Maciej S. Szmigiero" Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Igor Mammedov , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Huacai Chen , Aleksandar Markovic , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: From: Paolo Bonzini Message-ID: Date: Thu, 10 Jun 2021 18:17: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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/05/21 23:24, Sean Christopherson wrote: > An alternative to modifying the PPC code would be to make the existing > search_memslots() a wrapper to __search_memslots(), with the latter taking > @approx. Let's just modify PPC to use __gfn_to_memslot instead of search_memslots(). __gfn_to_memslot() has never introduced any functionality over search_memslots(), ever since search_memslots() was introduced in 2011. Paolo > We might also want to make this __always_inline to improve the likelihood of the > compiler optimizing away @approx. I doubt it matters in practice... >