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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 00C49C2BA83 for ; Wed, 12 Feb 2020 16:28:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CEC9F20724 for ; Wed, 12 Feb 2020 16:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727923AbgBLQ2S (ORCPT ); Wed, 12 Feb 2020 11:28:18 -0500 Received: from mga09.intel.com ([134.134.136.24]:21720 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbgBLQ2R (ORCPT ); Wed, 12 Feb 2020 11:28:17 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2020 08:28:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,433,1574150400"; d="scan'208";a="237752817" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by orsmga006.jf.intel.com with ESMTP; 12 Feb 2020 08:28:16 -0800 Date: Wed, 12 Feb 2020 08:28:16 -0800 From: Sean Christopherson To: Paolo Bonzini Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/7] KVM: x86/mmu: Rename kvm_mmu->get_cr3() to ->get_guest_cr3_or_eptp() Message-ID: <20200212162816.GB15617@linux.intel.com> References: <20200207173747.6243-1-sean.j.christopherson@intel.com> <20200207173747.6243-7-sean.j.christopherson@intel.com> <1424348b-7f09-513a-960b-6d15ac3a9ae4@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424348b-7f09-513a-960b-6d15ac3a9ae4@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 12, 2020 at 01:00:59PM +0100, Paolo Bonzini wrote: > On 07/02/20 18:37, Sean Christopherson wrote: > > Rename kvm_mmu->get_cr3() to call out that it is retrieving a guest > > value, as opposed to kvm_mmu->set_cr3(), which sets a host value, and to > > note that it will return L1's EPTP when nested EPT is in use. Hopefully > > the new name will also make it more obvious that L1's nested_cr3 is > > returned in SVM's nested NPT case. > > > > No functional change intended. > > Should we call it "get_pgd", since that is how Linux calls the top-level > directory? I always get confused by PUD/PMD, but as long as we only > keep one /p.d/ moniker it should be fine. Heh, I have the exact same sentiment. get_pgd() works for me.