From: Zhang Xiantao Date: Wed, 14 Nov 2007 12:09:30 +0000 (+0800) Subject: KVM: Portability: Move kvm_x86_ops to x86.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97896d04a14669b146c17d779b81ec7a339deeb3;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git KVM: Portability: Move kvm_x86_ops to x86.c Signed-off-by: Zhang Xiantao Acked-by: Carsten Otte Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 6aaba79f8c5..47a76c3a4c8 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c @@ -55,7 +55,6 @@ static LIST_HEAD(vm_list); static cpumask_t cpus_hardware_enabled; -struct kvm_x86_ops *kvm_x86_ops; struct kmem_cache *kvm_vcpu_cache; EXPORT_SYMBOL_GPL(kvm_vcpu_cache); diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index 4282a0fb296..2edc53ec8b3 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -44,6 +44,8 @@ #define STAT_OFFSET(x) offsetof(struct kvm_vcpu, stat.x) +struct kvm_x86_ops *kvm_x86_ops; + struct kvm_stats_debugfs_item debugfs_entries[] = { { "pf_fixed", STAT_OFFSET(pf_fixed) }, { "pf_guest", STAT_OFFSET(pf_guest) }, diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h index 663b822b4dd..ec32c26a511 100644 --- a/drivers/kvm/x86.h +++ b/drivers/kvm/x86.h @@ -85,6 +85,8 @@ struct kvm_vcpu { struct x86_emulate_ctxt emulate_ctxt; }; +extern struct kvm_x86_ops *kvm_x86_ops; + int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code); static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu)