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 CBB9AC49EA5 for ; Wed, 23 Jun 2021 20:53:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A651E610A0 for ; Wed, 23 Jun 2021 20:53:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229922AbhFWUz1 (ORCPT ); Wed, 23 Jun 2021 16:55:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44184 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229796AbhFWUzZ (ORCPT ); Wed, 23 Jun 2021 16:55:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624481586; 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=9n3NgC3GAu3lDi6hAVapBvNOzF/zUAHWZGT/SQUjfn8=; b=arf5DbcBcm92Nv7Ac/acwSDw6/wUpxUeZt8M71eWhwzie5rEFtQqIiS1P7f1kvMsspoie6 QGCp8uCInzqH3SrLkqTyp3DkBlfh+4wx+U3VM9L6QpAhqAN17NdihFADC7XK0NBZS0p8XP t62vIOYz3LuB9b2xs9IgwHSW6BKKJKg= 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-232-sodyH3z4OO-JcgZhRjbp0g-1; Wed, 23 Jun 2021 16:53:05 -0400 X-MC-Unique: sodyH3z4OO-JcgZhRjbp0g-1 Received: by mail-ed1-f71.google.com with SMTP id y18-20020a0564022712b029038ffac1995eso2008868edd.12 for ; Wed, 23 Jun 2021 13:53:05 -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=9n3NgC3GAu3lDi6hAVapBvNOzF/zUAHWZGT/SQUjfn8=; b=qar2rOP1sESZnae4gjH1ET5C3w7J4URsQGJvSDPxV5Tx5KtLdMtTghqCpi86kKzlcD 9pxDcYMRKblEoMM+vV3rvNL/rj5y5+Mp4vC3QtqZ6yDB2mXyq6wzLxB31Y0r6AuHPkPS XXcqe8m49WjKZTaKwhPUJvxQH8SD3Rjl2np24z1zm8zJ1F69G8hOYuXLl60g1gMYElIL JCslhUWqbkVBdgcFDPCOucnw6JfRlWjNFmEXxzFMcRAP5c+NZm2SLxndJsr1XdHrBxnt LjmFshl+xpVzow6XzAzSiU+syUdIGu3ecLVyrQwpSrUuwCAIRQX7thqFi/t0B2TmyBSA W5og== X-Gm-Message-State: AOAM530v9CyXKfncrIFgKcj4CO3P836rA6sLbVlwaHdteujcQ5P3pQI4 bzIHZyJs/bCFy4PeXK6HbOfdlxN3CM65MfFu4CtZQc3mf80cFvcsSEI0FxpddhxHHbFlKwf2oUH OSMqXKeezBoKeetVqCktfih/P X-Received: by 2002:a17:907:9854:: with SMTP id jj20mr1868385ejc.365.1624481584366; Wed, 23 Jun 2021 13:53:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMe8FJ9wIRFyAgHMyMvQXoIdX9CLLTCkw4YE+5D5Tm+jGV+RsdTr7SgoZV9o6Y/HIs60T5nQ== X-Received: by 2002:a17:907:9854:: with SMTP id jj20mr1868376ejc.365.1624481584214; Wed, 23 Jun 2021 13:53:04 -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 s5sm613146edi.93.2021.06.23.13.53.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 13:53:03 -0700 (PDT) Subject: Re: [PATCH 25/54] KVM: x86/mmu: Add helpers to query mmu_role bits To: Sean Christopherson Cc: Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yu Zhang , Maxim Levitsky References: <20210622175739.3610207-1-seanjc@google.com> <20210622175739.3610207-26-seanjc@google.com> <1babfd1c-bee1-12e5-a9d9-9507891efdfd@redhat.com> From: Paolo Bonzini Message-ID: <1c1cc822-4604-9e04-dd4c-e5005bfee7c5@redhat.com> Date: Wed, 23 Jun 2021 22:53:02 +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 23/06/21 22:47, Sean Christopherson wrote: >> What do you think about calling these is_mmu_##name? The point of having >> these helpers is that the register doesn't count, and they return the >> effective value (e.g. false in most EPT cases). > > I strongly prefer to keep in the name, both to match the mmu_role bits and > to make it a bit more clear that it's reflective (modified) register state, as > opposed to PTEs or even something else entirely. E.g. I always struggled to > remember the purpose of mmu->nx flag. No problem. I do disagree that it's register state ("modified" seems to be more than a parenthetical remark), but not enough to argue about it and even less to do the work to rename the accessors. Paolo