diff options
author | Zhang Xiantao <xiantao.zhang@intel.com> | 2007-11-14 07:09:30 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:53:02 -0500 |
commit | 97896d04a14669b146c17d779b81ec7a339deeb3 (patch) | |
tree | 73853232d2f935fcc35ecf3cd21cfbb278e94be4 /drivers/kvm | |
parent | d825ed0a97b8e82597dd652bfe51fed3fa9b3c9a (diff) |
KVM: Portability: Move kvm_x86_ops to x86.c
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Acked-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm')
-rw-r--r-- | drivers/kvm/kvm_main.c | 1 | ||||
-rw-r--r-- | drivers/kvm/x86.c | 2 | ||||
-rw-r--r-- | drivers/kvm/x86.h | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 6aaba79f8c5a..47a76c3a4c81 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -55,7 +55,6 @@ static LIST_HEAD(vm_list); | |||
55 | 55 | ||
56 | static cpumask_t cpus_hardware_enabled; | 56 | static cpumask_t cpus_hardware_enabled; |
57 | 57 | ||
58 | struct kvm_x86_ops *kvm_x86_ops; | ||
59 | struct kmem_cache *kvm_vcpu_cache; | 58 | struct kmem_cache *kvm_vcpu_cache; |
60 | EXPORT_SYMBOL_GPL(kvm_vcpu_cache); | 59 | EXPORT_SYMBOL_GPL(kvm_vcpu_cache); |
61 | 60 | ||
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index 4282a0fb2962..2edc53ec8b3b 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c | |||
@@ -44,6 +44,8 @@ | |||
44 | 44 | ||
45 | #define STAT_OFFSET(x) offsetof(struct kvm_vcpu, stat.x) | 45 | #define STAT_OFFSET(x) offsetof(struct kvm_vcpu, stat.x) |
46 | 46 | ||
47 | struct kvm_x86_ops *kvm_x86_ops; | ||
48 | |||
47 | struct kvm_stats_debugfs_item debugfs_entries[] = { | 49 | struct kvm_stats_debugfs_item debugfs_entries[] = { |
48 | { "pf_fixed", STAT_OFFSET(pf_fixed) }, | 50 | { "pf_fixed", STAT_OFFSET(pf_fixed) }, |
49 | { "pf_guest", STAT_OFFSET(pf_guest) }, | 51 | { "pf_guest", STAT_OFFSET(pf_guest) }, |
diff --git a/drivers/kvm/x86.h b/drivers/kvm/x86.h index 663b822b4ddb..ec32c26a5118 100644 --- a/drivers/kvm/x86.h +++ b/drivers/kvm/x86.h | |||
@@ -85,6 +85,8 @@ struct kvm_vcpu { | |||
85 | struct x86_emulate_ctxt emulate_ctxt; | 85 | struct x86_emulate_ctxt emulate_ctxt; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | extern struct kvm_x86_ops *kvm_x86_ops; | ||
89 | |||
88 | int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code); | 90 | int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code); |
89 | 91 | ||
90 | static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) | 92 | static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) |