Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: Move kvm_guest_init out of generic code

Currently x86 is the only architecture that uses kvm_guest_init(). With
PowerPC we're getting a second user, but the signature is different there
and we don't need to export it, as it uses the normal kernel init framework.

So let's move the x86 specific definition of that function over to the x86
specfic header file.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>

authored by

Alexander Graf and committed by
Avi Kivity
ba492962 5fc87407

+6 -5
+6
arch/x86/include/asm/kvm_para.h
··· 158 158 return cpuid_eax(KVM_CPUID_FEATURES); 159 159 } 160 160 161 + #ifdef CONFIG_KVM_GUEST 162 + void __init kvm_guest_init(void); 163 + #else 164 + #define kvm_guest_init() do { } while (0) 161 165 #endif 166 + 167 + #endif /* __KERNEL__ */ 162 168 163 169 #endif /* _ASM_X86_KVM_PARA_H */
-5
include/linux/kvm_para.h
··· 26 26 #include <asm/kvm_para.h> 27 27 28 28 #ifdef __KERNEL__ 29 - #ifdef CONFIG_KVM_GUEST 30 - void __init kvm_guest_init(void); 31 - #else 32 - #define kvm_guest_init() do { } while (0) 33 - #endif 34 29 35 30 static inline int kvm_para_has_feature(unsigned int feature) 36 31 {