From: Sean Christopherson <seanjc@google.com>
To: Like Xu <like.xu.linux@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/14] KVM: x86: Remove unnecessary export of kvm_vcpu_is_reset_bsp()
Date: Thu, 1 Dec 2022 02:07:15 +0000 [thread overview]
Message-ID: <Y4gMU3bKSE4Pu6Gk@google.com> (raw)
In-Reply-To: <20221114095606.39785-11-likexu@tencent.com>
On Mon, Nov 14, 2022, Like Xu wrote:
> From: Like Xu <likexu@tencent.com>
>
> Don't export x86's kvm_vcpu_is_reset_bsp(), the helper isn't used by
> KVM x86's vendor modules. Move up the code block out of existing
> callers' need.
Again, no. kvm_vcpu_is_reset_bsp() is declared by kvm_vcpu_is_reset_bsp(). The
lack of "static" is the first clue, and the fact that KVM compiles without issue
today is the second clue. EXPORT_SYMBOL_GPL() only affects resolving module
dependencies, it doesn't provide any information to the compiler about function
prototypes.
> Signed-off-by: Like Xu <likexu@tencent.com>
> ---
> arch/x86/kvm/x86.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index f325710a4f25..f3cb3e02bfa6 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -11496,6 +11496,11 @@ int kvm_arch_vcpu_precreate(struct kvm *kvm, unsigned int id)
> return static_call(kvm_x86_vcpu_precreate)(kvm);
> }
>
> +bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu)
> +{
> + return vcpu->kvm->arch.bsp_vcpu_id == vcpu->vcpu_id;
> +}
> +
> int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
> {
> struct page *page;
> @@ -11993,12 +11998,6 @@ int kvm_arch_check_processor_compat(void *opaque)
> return ops->check_processor_compatibility();
> }
>
> -bool kvm_vcpu_is_reset_bsp(struct kvm_vcpu *vcpu)
> -{
> - return vcpu->kvm->arch.bsp_vcpu_id == vcpu->vcpu_id;
> -}
> -EXPORT_SYMBOL_GPL(kvm_vcpu_is_reset_bsp);
> -
> bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu)
> {
> return (vcpu->arch.apic_base & MSR_IA32_APICBASE_BSP) != 0;
> --
> 2.38.1
>
next prev parent reply other threads:[~2022-12-01 2:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 9:55 [PATCH 00/14] KVM: x86: Remove unnecessary exported symbols Like Xu
2022-11-14 9:55 ` [PATCH 01/14] KVM: x86: Remove unnecessary export of kvm_cpu_has_pending_timer() Like Xu
2022-11-14 9:55 ` [PATCH 02/14] KVM: x86: Remove unnecessary export of kvm_inject_pending_timer_irqs() Like Xu
2022-11-14 9:55 ` [PATCH 03/14] KVM: x86: Remove unnecessary export of kvm_get_apic_base() Like Xu
2022-11-14 9:55 ` [PATCH 04/14] KVM: x86: Remove unnecessary export of kvm_set_apic_base() Like Xu
2022-11-14 9:55 ` [PATCH 05/14] KVM: x86: Remove unnecessary export of kvm_inject_page_fault() Like Xu
2022-12-01 2:04 ` Sean Christopherson
2022-12-01 2:08 ` Like Xu
2022-11-14 9:55 ` [PATCH 06/14] KVM: x86: Remove unnecessary export of kvm_inject_nmi() Like Xu
2022-12-01 2:04 ` Sean Christopherson
2022-11-14 9:55 ` [PATCH 07/14] KVM: x86: Remove unnecessary export of kvm_require_cpl() Like Xu
2022-11-14 9:56 ` [PATCH 08/14] KVM: x86: Remove unnecessary export of kvm_emulate_as_nop() Like Xu
2022-11-14 9:56 ` [PATCH 09/14] KVM: x86: Remove unnecessary export of kvm_scale_tsc() Like Xu
2022-11-14 9:56 ` [PATCH 10/14] KVM: x86: Remove unnecessary export of kvm_vcpu_is_reset_bsp() Like Xu
2022-12-01 2:07 ` Sean Christopherson [this message]
2022-12-02 18:31 ` Paolo Bonzini
2022-11-14 9:56 ` [PATCH 11/14] KVM: x86: Remove unnecessary export of kvm_hv_assist_page_enabled() Like Xu
2022-11-14 9:56 ` [PATCH 12/14] KVM: x86: Remove unnecessary export of kvm_can_use_hv_timer() Like Xu
2022-11-14 9:56 ` [PATCH 13/14] KVM: x86: Remove unnecessary export of kvm_lapic_hv_timer_in_use() Like Xu
2022-11-14 9:56 ` [PATCH 14/14] KVM: x86: Remove unnecessary export of kvm_apic_update_apicv() Like Xu
2022-12-02 18:37 ` [PATCH 00/14] KVM: x86: Remove unnecessary exported symbols Paolo Bonzini
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=Y4gMU3bKSE4Pu6Gk@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=like.xu.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.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.