From: Sean Christopherson <seanjc@google.com>
To: Yu Zhang <yu.c.zhang@linux.intel.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: X86: Use the common definition - 'GPA_INVALID' for X86
Date: Tue, 13 Dec 2022 05:52:20 +0000 [thread overview]
Message-ID: <Y5gTFPxUTXDsQb5p@google.com> (raw)
In-Reply-To: <20221209023622.274715-1-yu.c.zhang@linux.intel.com>
On Fri, Dec 09, 2022, Yu Zhang wrote:
> KVM already has a 'GPA_INVALID' defined as (~(gpa_t)0) in
> kvm_types.h, and it is used by ARM and X86 xen code. We do
> not need a replicated 'INVALID_GPA' for X86 specifically.
> Just replace it with the common one.
>
> Tested by rebuilding KVM.
>
> No functional change intended.
>
> Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
> ---
> arch/x86/include/asm/kvm_host.h | 2 -
> arch/x86/kvm/hyperv.c | 2 +-
> arch/x86/kvm/mmu/paging_tmpl.h | 6 +--
> arch/x86/kvm/svm/nested.c | 4 +-
> arch/x86/kvm/svm/svm.c | 4 +-
> arch/x86/kvm/vmx/nested.c | 66 ++++++++++++++++-----------------
> arch/x86/kvm/vmx/sgx.c | 2 +-
> arch/x86/kvm/vmx/vmx.c | 6 +--
> arch/x86/kvm/x86.c | 18 ++++-----
> 9 files changed, 54 insertions(+), 56 deletions(-)
What if we rename GPA_INVALID to INVALID_GPA and modify _those_ users? I have
a slight preference for INVALID_GPA, and we also have INVALID_PAGE. It'll also
yield a smaller diff.
EVMPTR_INVALID is the counter argument, but that's more of an error code than a
semi-arbitrary value, e.g. there's also EVMPTR_MAP_PENDING.
$ git grep GPA_INVALID | wc -l
17
$ git grep INVALID_GPA | wc -l
55
next prev parent reply other threads:[~2022-12-13 5:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 2:36 [PATCH] KVM: X86: Use the common definition - 'GPA_INVALID' for X86 Yu Zhang
2022-12-13 5:52 ` Sean Christopherson [this message]
2022-12-13 9:26 ` Yu Zhang
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=Y5gTFPxUTXDsQb5p@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yu.c.zhang@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox