public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] KVM: x86: Remove some unused declarations
@ 2024-08-30  2:25 Yue Haibing
  2024-08-30  3:54 ` Sean Christopherson
  2024-09-10  4:56 ` Sean Christopherson
  0 siblings, 2 replies; 4+ messages in thread
From: Yue Haibing @ 2024-08-30  2:25 UTC (permalink / raw)
  To: seanjc, pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa
  Cc: kvm, linux-kernel, yuehaibing

Commit 238adc77051a ("KVM: Cleanup LAPIC interface") removed
kvm_lapic_get_base() but leave declaration.

And other two declarations were never implenmented since introduction.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
 arch/x86/kvm/lapic.h            | 1 -
 arch/x86/kvm/mmu.h              | 2 --
 arch/x86/kvm/mmu/mmu_internal.h | 2 --
 3 files changed, 5 deletions(-)

diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
index 7ef8ae73e82d..7c95eedd771e 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -96,7 +96,6 @@ u64 kvm_lapic_get_cr8(struct kvm_vcpu *vcpu);
 void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8);
 void kvm_lapic_set_eoi(struct kvm_vcpu *vcpu);
 void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value);
-u64 kvm_lapic_get_base(struct kvm_vcpu *vcpu);
 void kvm_recalculate_apic_map(struct kvm *kvm);
 void kvm_apic_set_version(struct kvm_vcpu *vcpu);
 void kvm_apic_after_set_mcg_cap(struct kvm_vcpu *vcpu);
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
index 4341e0e28571..9dc5dd43ae7f 100644
--- a/arch/x86/kvm/mmu.h
+++ b/arch/x86/kvm/mmu.h
@@ -223,8 +223,6 @@ static inline u8 permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
 
 bool kvm_mmu_may_ignore_guest_pat(void);
 
-int kvm_arch_write_log_dirty(struct kvm_vcpu *vcpu);
-
 int kvm_mmu_post_init_vm(struct kvm *kvm);
 void kvm_mmu_pre_destroy_vm(struct kvm *kvm);
 
diff --git a/arch/x86/kvm/mmu/mmu_internal.h b/arch/x86/kvm/mmu/mmu_internal.h
index 1721d97743e9..1469a1d9782d 100644
--- a/arch/x86/kvm/mmu/mmu_internal.h
+++ b/arch/x86/kvm/mmu/mmu_internal.h
@@ -349,8 +349,6 @@ int kvm_mmu_max_mapping_level(struct kvm *kvm,
 void kvm_mmu_hugepage_adjust(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault);
 void disallowed_hugepage_adjust(struct kvm_page_fault *fault, u64 spte, int cur_level);
 
-void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc);
-
 void track_possible_nx_huge_page(struct kvm *kvm, struct kvm_mmu_page *sp);
 void untrack_possible_nx_huge_page(struct kvm *kvm, struct kvm_mmu_page *sp);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] KVM: x86: Remove some unused declarations
  2024-08-30  2:25 [PATCH -next] KVM: x86: Remove some unused declarations Yue Haibing
@ 2024-08-30  3:54 ` Sean Christopherson
  2024-08-31  1:15   ` Yue Haibing
  2024-09-10  4:56 ` Sean Christopherson
  1 sibling, 1 reply; 4+ messages in thread
From: Sean Christopherson @ 2024-08-30  3:54 UTC (permalink / raw)
  To: Yue Haibing
  Cc: pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa, kvm,
	linux-kernel

On Fri, Aug 30, 2024, Yue Haibing wrote:
> Commit 238adc77051a ("KVM: Cleanup LAPIC interface") removed
> kvm_lapic_get_base() but leave declaration.
> 
> And other two declarations were never implenmented since introduction.
> 
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> ---
>  arch/x86/kvm/lapic.h            | 1 -
>  arch/x86/kvm/mmu.h              | 2 --
>  arch/x86/kvm/mmu/mmu_internal.h | 2 --
>  3 files changed, 5 deletions(-)
> 
> diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
> index 7ef8ae73e82d..7c95eedd771e 100644
> --- a/arch/x86/kvm/lapic.h
> +++ b/arch/x86/kvm/lapic.h
> @@ -96,7 +96,6 @@ u64 kvm_lapic_get_cr8(struct kvm_vcpu *vcpu);
>  void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8);
>  void kvm_lapic_set_eoi(struct kvm_vcpu *vcpu);
>  void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value);
> -u64 kvm_lapic_get_base(struct kvm_vcpu *vcpu);

Ha!  I have an APIC base cleanup series that I'm about to post that modifies
these APIs and does a similar cleanup.  I might defer deleting this declaration
to that series, purely for branch orginization purposes.  Hmm, or maybe I'll
split this into two patches.

Anyways, just an FYI that I might tweak this slightly.  No action needed on your
end, I'll get this applied for 6.12, one way or another.

>  void kvm_recalculate_apic_map(struct kvm *kvm);
>  void kvm_apic_set_version(struct kvm_vcpu *vcpu);
>  void kvm_apic_after_set_mcg_cap(struct kvm_vcpu *vcpu);
> diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
> index 4341e0e28571..9dc5dd43ae7f 100644
> --- a/arch/x86/kvm/mmu.h
> +++ b/arch/x86/kvm/mmu.h
> @@ -223,8 +223,6 @@ static inline u8 permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
>  
>  bool kvm_mmu_may_ignore_guest_pat(void);
>  
> -int kvm_arch_write_log_dirty(struct kvm_vcpu *vcpu);
> -
>  int kvm_mmu_post_init_vm(struct kvm *kvm);
>  void kvm_mmu_pre_destroy_vm(struct kvm *kvm);
>  
> diff --git a/arch/x86/kvm/mmu/mmu_internal.h b/arch/x86/kvm/mmu/mmu_internal.h
> index 1721d97743e9..1469a1d9782d 100644
> --- a/arch/x86/kvm/mmu/mmu_internal.h
> +++ b/arch/x86/kvm/mmu/mmu_internal.h
> @@ -349,8 +349,6 @@ int kvm_mmu_max_mapping_level(struct kvm *kvm,
>  void kvm_mmu_hugepage_adjust(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault);
>  void disallowed_hugepage_adjust(struct kvm_page_fault *fault, u64 spte, int cur_level);
>  
> -void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc);
> -
>  void track_possible_nx_huge_page(struct kvm *kvm, struct kvm_mmu_page *sp);
>  void untrack_possible_nx_huge_page(struct kvm *kvm, struct kvm_mmu_page *sp);
>  
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] KVM: x86: Remove some unused declarations
  2024-08-30  3:54 ` Sean Christopherson
@ 2024-08-31  1:15   ` Yue Haibing
  0 siblings, 0 replies; 4+ messages in thread
From: Yue Haibing @ 2024-08-31  1:15 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa, kvm,
	linux-kernel

On 2024/8/30 11:54, Sean Christopherson wrote:
> On Fri, Aug 30, 2024, Yue Haibing wrote:
>> Commit 238adc77051a ("KVM: Cleanup LAPIC interface") removed
>> kvm_lapic_get_base() but leave declaration.
>>
>> And other two declarations were never implenmented since introduction.
>>
>> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
>> ---
>>  arch/x86/kvm/lapic.h            | 1 -
>>  arch/x86/kvm/mmu.h              | 2 --
>>  arch/x86/kvm/mmu/mmu_internal.h | 2 --
>>  3 files changed, 5 deletions(-)
>>
>> diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
>> index 7ef8ae73e82d..7c95eedd771e 100644
>> --- a/arch/x86/kvm/lapic.h
>> +++ b/arch/x86/kvm/lapic.h
>> @@ -96,7 +96,6 @@ u64 kvm_lapic_get_cr8(struct kvm_vcpu *vcpu);
>>  void kvm_lapic_set_tpr(struct kvm_vcpu *vcpu, unsigned long cr8);
>>  void kvm_lapic_set_eoi(struct kvm_vcpu *vcpu);
>>  void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value);
>> -u64 kvm_lapic_get_base(struct kvm_vcpu *vcpu);
> 
> Ha!  I have an APIC base cleanup series that I'm about to post that modifies
> these APIs and does a similar cleanup.  I might defer deleting this declaration
> to that series, purely for branch orginization purposes.  Hmm, or maybe I'll
> split this into two patches.
> 
> Anyways, just an FYI that I might tweak this slightly.  No action needed on your
> end, I'll get this applied for 6.12, one way or another.

Got it, thanks!
> 
>>  void kvm_recalculate_apic_map(struct kvm *kvm);
>>  void kvm_apic_set_version(struct kvm_vcpu *vcpu);
>>  void kvm_apic_after_set_mcg_cap(struct kvm_vcpu *vcpu);
>> diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
>> index 4341e0e28571..9dc5dd43ae7f 100644
>> --- a/arch/x86/kvm/mmu.h
>> +++ b/arch/x86/kvm/mmu.h
>> @@ -223,8 +223,6 @@ static inline u8 permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
>>  
>>  bool kvm_mmu_may_ignore_guest_pat(void);
>>  
>> -int kvm_arch_write_log_dirty(struct kvm_vcpu *vcpu);
>> -
>>  int kvm_mmu_post_init_vm(struct kvm *kvm);
>>  void kvm_mmu_pre_destroy_vm(struct kvm *kvm);
>>  
>> diff --git a/arch/x86/kvm/mmu/mmu_internal.h b/arch/x86/kvm/mmu/mmu_internal.h
>> index 1721d97743e9..1469a1d9782d 100644
>> --- a/arch/x86/kvm/mmu/mmu_internal.h
>> +++ b/arch/x86/kvm/mmu/mmu_internal.h
>> @@ -349,8 +349,6 @@ int kvm_mmu_max_mapping_level(struct kvm *kvm,
>>  void kvm_mmu_hugepage_adjust(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault);
>>  void disallowed_hugepage_adjust(struct kvm_page_fault *fault, u64 spte, int cur_level);
>>  
>> -void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc);
>> -
>>  void track_possible_nx_huge_page(struct kvm *kvm, struct kvm_mmu_page *sp);
>>  void untrack_possible_nx_huge_page(struct kvm *kvm, struct kvm_mmu_page *sp);
>>  
>> -- 
>> 2.34.1
>>
> .

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] KVM: x86: Remove some unused declarations
  2024-08-30  2:25 [PATCH -next] KVM: x86: Remove some unused declarations Yue Haibing
  2024-08-30  3:54 ` Sean Christopherson
@ 2024-09-10  4:56 ` Sean Christopherson
  1 sibling, 0 replies; 4+ messages in thread
From: Sean Christopherson @ 2024-09-10  4:56 UTC (permalink / raw)
  To: Sean Christopherson, pbonzini, tglx, mingo, bp, dave.hansen, x86,
	hpa, Yue Haibing
  Cc: kvm, linux-kernel

On Fri, 30 Aug 2024 10:25:37 +0800, Yue Haibing wrote:
> Commit 238adc77051a ("KVM: Cleanup LAPIC interface") removed
> kvm_lapic_get_base() but leave declaration.
> 
> And other two declarations were never implenmented since introduction.
 

Applied to kvm-x86 misc (I have yet to post my APIC cleanups), thanks!

[1/1] KVM: x86: Remove some unused declarations
      https://github.com/kvm-x86/linux/commit/4ca077f26d88

--
https://github.com/kvm-x86/linux/tree/next

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-10  4:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30  2:25 [PATCH -next] KVM: x86: Remove some unused declarations Yue Haibing
2024-08-30  3:54 ` Sean Christopherson
2024-08-31  1:15   ` Yue Haibing
2024-09-10  4:56 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox