Skip to contentSkip to conversation

KVM: x86: Unexport x86_fpu_cache and make it static

PATCH Applied Sean Christopherson 2 participants 2 messages Jun 8, 2020 – Jun 9, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

---

v2: Rebased to kvm/queue, commit fb7333dfd812 ("KVM: SVM: fix calls ...").

 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 1da5858501ca..7030f2221259 100644
@@ -1306,7 +1306,6 @@ struct kvm_arch_async_pf {
 extern u64 __read_mostly host_efer;
 
 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 c26dd1363151..e19f7c486d64 100644
@@ -239,8 +239,7 @@ u64 __read_mostly host_xcr0;
 u64 __read_mostly supported_xcr0;
 EXPORT_SYMBOL_GPL(supported_xcr0);
 
-struct kmem_cache *x86_fpu_cache;
-EXPORT_SYMBOL_GPL(x86_fpu_cache);
+static struct kmem_cache *x86_fpu_cache;
 
 static struct kmem_cache *x86_emulator_cache;
 
Signature · 1 line
2.26.0
maintainer Applied
#1 lore raw
Quoted 30 lines · Sean Christopherson

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

---

v2: Rebased to kvm/queue, commit fb7333dfd812 ("KVM: SVM: fix calls ...").

 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 1da5858501ca..7030f2221259 100644
@@ -1306,7 +1306,6 @@ struct kvm_arch_async_pf {
 extern u64 __read_mostly host_efer;
 
 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 +0 -0
index c26dd1363151..e19f7c486d64 100644

arch/x86/kvm/x86.c u64 __read_mostly host_xcr0; · line 245

Quoted 9 lines
arch/x86/kvm/x86.c +1 -2
@@ -239,8 +239,7 @@ u64 __read_mostly host_xcr0;
 u64 __read_mostly supported_xcr0;
 EXPORT_SYMBOL_GPL(supported_xcr0);
 
-struct kmem_cache *x86_fpu_cache;
-EXPORT_SYMBOL_GPL(x86_fpu_cache);
+static struct kmem_cache *x86_fpu_cache;
 
 static struct kmem_cache *x86_emulator_cache;
 

Queued, thanks.

Paolo