Skip to contentSkip to conversation

KVM: x86: Unexport x86_fpu_cache and make it static

PATCH Superseded Sean Christopherson 2 participants 2 messages Jan 27, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: x86: Unexport x86_fpu_cache and make it static

Make x86_fpu_cache static now that FPU allocation and destruction is handled entirely by common x86 code.

---

Pretty sure I meant to include this in the vCPU creation cleanup, but completely forgot about it.

 arch/x86/include/asm/kvm_host.h | 1 -
 arch/x86/kvm/x86.c              | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/x86/include/asm/kvm_host.h +0 -1
index 77d206a93658..f300a250ab51 100644
@@ -1266,7 +1266,6 @@ struct kvm_arch_async_pf {
 };
 
 extern struct kvm_x86_ops *kvm_x86_ops;
-extern struct kmem_cache *x86_fpu_cache;
 
 #define __KVM_HAVE_ARCH_VM_ALLOC
 static inline struct kvm *kvm_arch_alloc_vm(void)
arch/x86/kvm/x86.c +1 -2
index 7e3f1d937224..78b7e1f08845 100644
@@ -227,8 +227,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
 
 u64 __read_mostly host_xcr0;
 
-struct kmem_cache *x86_fpu_cache;
-EXPORT_SYMBOL_GPL(x86_fpu_cache);
+static struct kmem_cache *x86_fpu_cache;
 
 static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt);
 
Signature · 1 line
2.24.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Sean Christopherson

Make x86_fpu_cache static now that FPU allocation and destruction is handled entirely by common x86 code.

git grep on kvm/next agrees :-)

Quoted 1 line
Quoted 34 lines

---

Pretty sure I meant to include this in the vCPU creation cleanup, but completely forgot about it.

 arch/x86/include/asm/kvm_host.h | 1 -
 arch/x86/kvm/x86.c              | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/x86/include/asm/kvm_host.h +0 -1
index 77d206a93658..f300a250ab51 100644
@@ -1266,7 +1266,6 @@ struct kvm_arch_async_pf {
 };
 
 extern struct kvm_x86_ops *kvm_x86_ops;
-extern struct kmem_cache *x86_fpu_cache;
 
 #define __KVM_HAVE_ARCH_VM_ALLOC
 static inline struct kvm *kvm_arch_alloc_vm(void)
arch/x86/kvm/x86.c +1 -2
index 7e3f1d937224..78b7e1f08845 100644
@@ -227,8 +227,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
 
 u64 __read_mostly host_xcr0;
 
-struct kmem_cache *x86_fpu_cache;
-EXPORT_SYMBOL_GPL(x86_fpu_cache);
+static struct kmem_cache *x86_fpu_cache;
 
 static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt);
Signature · 1 line
Vitaly