All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: x86@kernel.org, kvm@vger.kernel.org,
	Ben Gardon <bgardon@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] KVM: x86/mmu: Remove the repeated declaration
Date: Wed, 26 May 2021 14:45:54 +0000	[thread overview]
Message-ID: <YK5fIpDl79xk6jb4@google.com> (raw)
In-Reply-To: <b0e4d53e-c59e-bebc-a6c3-22f89e1c0a5f@hisilicon.com>

On Wed, May 26, 2021, Shaokun Zhang wrote:
> Hi Sean,
> 
> On 2021/5/26 0:09, Sean Christopherson wrote:
> > Rather than simply delete the extra declaration, what about converting this to
> > static inline and opportunistically deleting the duplicate?  The implementation
> 
> It seems that you want to make it static inline in mmu_internal.h, right?

Yep.

> > is a single operation and this is MMU-internal, i.e. there's no need to export
> > and limited exposure of nx_huge_pages to other code.
> 
> If is_nx_huge_page_enabled is inline in mmu_internal.h, nx_huge_pages will be
> external in mmu_internal.h and exposed to other code. Do I miss something?

Yes, it will be theoretically exposed to other code, but as the name suggests,
mmu_internal.h should not be included by anything outside of mmu/, and of course
we can reject patches that try to access nx_guest_pages directly.

      reply	other threads:[~2021-05-26 14:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  2:43 [PATCH] KVM: x86/mmu: Remove the repeated declaration Shaokun Zhang
2021-05-25 16:09 ` Sean Christopherson
2021-05-26  6:09   ` Shaokun Zhang
2021-05-26 14:45     ` Sean Christopherson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YK5fIpDl79xk6jb4@google.com \
    --to=seanjc@google.com \
    --cc=bgardon@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=x86@kernel.org \
    --cc=zhangshaokun@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.