diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2013-10-07 12:47:59 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-10-17 09:45:35 -0400 |
commit | 2ba9f0d8875073a2ed802fca0c25c9bfc4338439 (patch) | |
tree | ffe49a40ff604985c5f3f159ba336bdd90cb98cd /arch/powerpc | |
parent | dba291f2ceacb833063179530eeb83a317a6cc95 (diff) |
kvm: powerpc: book3s: Support building HV and PR KVM as module
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
[agraf: squash in compile fix]
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kvm/Kconfig | 6 | ||||
-rw-r--r-- | arch/powerpc/kvm/Makefile | 11 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 12 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_emulate.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_pr.c | 5 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_rtas.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_xics.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/emulate.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 10 |
10 files changed, 42 insertions, 9 deletions
diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig index a96d7c32f785..8aeeda1ff42a 100644 --- a/arch/powerpc/kvm/Kconfig +++ b/arch/powerpc/kvm/Kconfig | |||
@@ -73,7 +73,7 @@ config KVM_BOOK3S_64 | |||
73 | If unsure, say N. | 73 | If unsure, say N. |
74 | 74 | ||
75 | config KVM_BOOK3S_64_HV | 75 | config KVM_BOOK3S_64_HV |
76 | bool "KVM support for POWER7 and PPC970 using hypervisor mode in host" | 76 | tristate "KVM support for POWER7 and PPC970 using hypervisor mode in host" |
77 | depends on KVM_BOOK3S_64 | 77 | depends on KVM_BOOK3S_64 |
78 | select KVM_BOOK3S_HV_POSSIBLE | 78 | select KVM_BOOK3S_HV_POSSIBLE |
79 | select MMU_NOTIFIER | 79 | select MMU_NOTIFIER |
@@ -94,8 +94,8 @@ config KVM_BOOK3S_64_HV | |||
94 | If unsure, say N. | 94 | If unsure, say N. |
95 | 95 | ||
96 | config KVM_BOOK3S_64_PR | 96 | config KVM_BOOK3S_64_PR |
97 | bool "KVM support without using hypervisor mode in host" | 97 | tristate "KVM support without using hypervisor mode in host" |
98 | depends on KVM_BOOK3S_64 && !KVM_BOOK3S_64_HV | 98 | depends on KVM_BOOK3S_64 |
99 | select KVM_BOOK3S_PR_POSSIBLE | 99 | select KVM_BOOK3S_PR_POSSIBLE |
100 | ---help--- | 100 | ---help--- |
101 | Support running guest kernels in virtual machines on processors | 101 | Support running guest kernels in virtual machines on processors |
diff --git a/arch/powerpc/kvm/Makefile b/arch/powerpc/kvm/Makefile index fa17b337bb96..ce569b6bf4d8 100644 --- a/arch/powerpc/kvm/Makefile +++ b/arch/powerpc/kvm/Makefile | |||
@@ -56,7 +56,7 @@ kvm-objs-$(CONFIG_KVM_E500MC) := $(kvm-e500mc-objs) | |||
56 | kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) := \ | 56 | kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) := \ |
57 | book3s_64_vio_hv.o | 57 | book3s_64_vio_hv.o |
58 | 58 | ||
59 | kvm-book3s_64-objs-$(CONFIG_KVM_BOOK3S_64_PR) := \ | 59 | kvm-pr-y := \ |
60 | fpu.o \ | 60 | fpu.o \ |
61 | book3s_paired_singles.o \ | 61 | book3s_paired_singles.o \ |
62 | book3s_pr.o \ | 62 | book3s_pr.o \ |
@@ -76,7 +76,7 @@ kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \ | |||
76 | book3s_rmhandlers.o | 76 | book3s_rmhandlers.o |
77 | endif | 77 | endif |
78 | 78 | ||
79 | kvm-book3s_64-objs-$(CONFIG_KVM_BOOK3S_64_HV) += \ | 79 | kvm-hv-y += \ |
80 | book3s_hv.o \ | 80 | book3s_hv.o \ |
81 | book3s_hv_interrupts.o \ | 81 | book3s_hv_interrupts.o \ |
82 | book3s_64_mmu_hv.o | 82 | book3s_64_mmu_hv.o |
@@ -84,13 +84,15 @@ kvm-book3s_64-objs-$(CONFIG_KVM_BOOK3S_64_HV) += \ | |||
84 | kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \ | 84 | kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \ |
85 | book3s_hv_rm_xics.o | 85 | book3s_hv_rm_xics.o |
86 | 86 | ||
87 | kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HV) += \ | 87 | ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE |
88 | kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \ | ||
88 | book3s_hv_rmhandlers.o \ | 89 | book3s_hv_rmhandlers.o \ |
89 | book3s_hv_rm_mmu.o \ | 90 | book3s_hv_rm_mmu.o \ |
90 | book3s_hv_ras.o \ | 91 | book3s_hv_ras.o \ |
91 | book3s_hv_builtin.o \ | 92 | book3s_hv_builtin.o \ |
92 | book3s_hv_cma.o \ | 93 | book3s_hv_cma.o \ |
93 | $(kvm-book3s_64-builtin-xics-objs-y) | 94 | $(kvm-book3s_64-builtin-xics-objs-y) |
95 | endif | ||
94 | 96 | ||
95 | kvm-book3s_64-objs-$(CONFIG_KVM_XICS) += \ | 97 | kvm-book3s_64-objs-$(CONFIG_KVM_XICS) += \ |
96 | book3s_xics.o | 98 | book3s_xics.o |
@@ -131,4 +133,7 @@ obj-$(CONFIG_KVM_E500MC) += kvm.o | |||
131 | obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o | 133 | obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o |
132 | obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o | 134 | obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o |
133 | 135 | ||
136 | obj-$(CONFIG_KVM_BOOK3S_64_PR) += kvm-pr.o | ||
137 | obj-$(CONFIG_KVM_BOOK3S_64_HV) += kvm-hv.o | ||
138 | |||
134 | obj-y += $(kvm-book3s_64-builtin-objs-y) | 139 | obj-y += $(kvm-book3s_64-builtin-objs-y) |
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 493aff77f84e..39d2994f9d27 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c | |||
@@ -170,28 +170,32 @@ void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec) | |||
170 | printk(KERN_INFO "Queueing interrupt %x\n", vec); | 170 | printk(KERN_INFO "Queueing interrupt %x\n", vec); |
171 | #endif | 171 | #endif |
172 | } | 172 | } |
173 | 173 | EXPORT_SYMBOL_GPL(kvmppc_book3s_queue_irqprio); | |
174 | 174 | ||
175 | void kvmppc_core_queue_program(struct kvm_vcpu *vcpu, ulong flags) | 175 | void kvmppc_core_queue_program(struct kvm_vcpu *vcpu, ulong flags) |
176 | { | 176 | { |
177 | /* might as well deliver this straight away */ | 177 | /* might as well deliver this straight away */ |
178 | kvmppc_inject_interrupt(vcpu, BOOK3S_INTERRUPT_PROGRAM, flags); | 178 | kvmppc_inject_interrupt(vcpu, BOOK3S_INTERRUPT_PROGRAM, flags); |
179 | } | 179 | } |
180 | EXPORT_SYMBOL_GPL(kvmppc_core_queue_program); | ||
180 | 181 | ||
181 | void kvmppc_core_queue_dec(struct kvm_vcpu *vcpu) | 182 | void kvmppc_core_queue_dec(struct kvm_vcpu *vcpu) |
182 | { | 183 | { |
183 | kvmppc_book3s_queue_irqprio(vcpu, BOOK3S_INTERRUPT_DECREMENTER); | 184 | kvmppc_book3s_queue_irqprio(vcpu, BOOK3S_INTERRUPT_DECREMENTER); |
184 | } | 185 | } |
186 | EXPORT_SYMBOL_GPL(kvmppc_core_queue_dec); | ||
185 | 187 | ||
186 | int kvmppc_core_pending_dec(struct kvm_vcpu *vcpu) | 188 | int kvmppc_core_pending_dec(struct kvm_vcpu *vcpu) |
187 | { | 189 | { |
188 | return test_bit(BOOK3S_IRQPRIO_DECREMENTER, &vcpu->arch.pending_exceptions); | 190 | return test_bit(BOOK3S_IRQPRIO_DECREMENTER, &vcpu->arch.pending_exceptions); |
189 | } | 191 | } |
192 | EXPORT_SYMBOL_GPL(kvmppc_core_pending_dec); | ||
190 | 193 | ||
191 | void kvmppc_core_dequeue_dec(struct kvm_vcpu *vcpu) | 194 | void kvmppc_core_dequeue_dec(struct kvm_vcpu *vcpu) |
192 | { | 195 | { |
193 | kvmppc_book3s_dequeue_irqprio(vcpu, BOOK3S_INTERRUPT_DECREMENTER); | 196 | kvmppc_book3s_dequeue_irqprio(vcpu, BOOK3S_INTERRUPT_DECREMENTER); |
194 | } | 197 | } |
198 | EXPORT_SYMBOL_GPL(kvmppc_core_dequeue_dec); | ||
195 | 199 | ||
196 | void kvmppc_core_queue_external(struct kvm_vcpu *vcpu, | 200 | void kvmppc_core_queue_external(struct kvm_vcpu *vcpu, |
197 | struct kvm_interrupt *irq) | 201 | struct kvm_interrupt *irq) |
@@ -329,6 +333,7 @@ int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu) | |||
329 | 333 | ||
330 | return 0; | 334 | return 0; |
331 | } | 335 | } |
336 | EXPORT_SYMBOL_GPL(kvmppc_core_prepare_to_enter); | ||
332 | 337 | ||
333 | pfn_t kvmppc_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn, bool writing, | 338 | pfn_t kvmppc_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn, bool writing, |
334 | bool *writable) | 339 | bool *writable) |
@@ -354,6 +359,7 @@ pfn_t kvmppc_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn, bool writing, | |||
354 | 359 | ||
355 | return gfn_to_pfn_prot(vcpu->kvm, gfn, writing, writable); | 360 | return gfn_to_pfn_prot(vcpu->kvm, gfn, writing, writable); |
356 | } | 361 | } |
362 | EXPORT_SYMBOL_GPL(kvmppc_gfn_to_pfn); | ||
357 | 363 | ||
358 | static int kvmppc_xlate(struct kvm_vcpu *vcpu, ulong eaddr, bool data, | 364 | static int kvmppc_xlate(struct kvm_vcpu *vcpu, ulong eaddr, bool data, |
359 | bool iswrite, struct kvmppc_pte *pte) | 365 | bool iswrite, struct kvmppc_pte *pte) |
@@ -421,6 +427,7 @@ int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, | |||
421 | 427 | ||
422 | return EMULATE_DONE; | 428 | return EMULATE_DONE; |
423 | } | 429 | } |
430 | EXPORT_SYMBOL_GPL(kvmppc_st); | ||
424 | 431 | ||
425 | int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, | 432 | int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, |
426 | bool data) | 433 | bool data) |
@@ -451,6 +458,7 @@ nopte: | |||
451 | mmio: | 458 | mmio: |
452 | return EMULATE_DO_MMIO; | 459 | return EMULATE_DO_MMIO; |
453 | } | 460 | } |
461 | EXPORT_SYMBOL_GPL(kvmppc_ld); | ||
454 | 462 | ||
455 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | 463 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) |
456 | { | 464 | { |
@@ -706,6 +714,7 @@ void kvmppc_set_msr(struct kvm_vcpu *vcpu, u64 msr) | |||
706 | { | 714 | { |
707 | kvmppc_ops->set_msr(vcpu, msr); | 715 | kvmppc_ops->set_msr(vcpu, msr); |
708 | } | 716 | } |
717 | EXPORT_SYMBOL_GPL(kvmppc_set_msr); | ||
709 | 718 | ||
710 | int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) | 719 | int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) |
711 | { | 720 | { |
@@ -787,6 +796,7 @@ int kvm_unmap_hva(struct kvm *kvm, unsigned long hva) | |||
787 | { | 796 | { |
788 | return kvmppc_ops->unmap_hva(kvm, hva); | 797 | return kvmppc_ops->unmap_hva(kvm, hva); |
789 | } | 798 | } |
799 | EXPORT_SYMBOL_GPL(kvm_unmap_hva); | ||
790 | 800 | ||
791 | int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned long end) | 801 | int kvm_unmap_hva_range(struct kvm *kvm, unsigned long start, unsigned long end) |
792 | { | 802 | { |
diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c index b9841ad844fb..99d40f8977e8 100644 --- a/arch/powerpc/kvm/book3s_emulate.c +++ b/arch/powerpc/kvm/book3s_emulate.c | |||
@@ -172,7 +172,7 @@ int kvmppc_core_emulate_op_pr(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
172 | vcpu->arch.mmu.tlbie(vcpu, addr, large); | 172 | vcpu->arch.mmu.tlbie(vcpu, addr, large); |
173 | break; | 173 | break; |
174 | } | 174 | } |
175 | #ifdef CONFIG_KVM_BOOK3S_64_PR | 175 | #ifdef CONFIG_PPC_BOOK3S_64 |
176 | case OP_31_XOP_FAKE_SC1: | 176 | case OP_31_XOP_FAKE_SC1: |
177 | { | 177 | { |
178 | /* SC 1 papr hypercalls */ | 178 | /* SC 1 papr hypercalls */ |
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 0782c8688c8b..9e954a81c078 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/vmalloc.h> | 52 | #include <linux/vmalloc.h> |
53 | #include <linux/highmem.h> | 53 | #include <linux/highmem.h> |
54 | #include <linux/hugetlb.h> | 54 | #include <linux/hugetlb.h> |
55 | #include <linux/module.h> | ||
55 | 56 | ||
56 | #include "book3s.h" | 57 | #include "book3s.h" |
57 | 58 | ||
@@ -2215,3 +2216,4 @@ static void kvmppc_book3s_exit_hv(void) | |||
2215 | 2216 | ||
2216 | module_init(kvmppc_book3s_init_hv); | 2217 | module_init(kvmppc_book3s_init_hv); |
2217 | module_exit(kvmppc_book3s_exit_hv); | 2218 | module_exit(kvmppc_book3s_exit_hv); |
2219 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index ca6c73d2ee77..7f583a482161 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm/book3s_pr.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/sched.h> | 40 | #include <linux/sched.h> |
41 | #include <linux/vmalloc.h> | 41 | #include <linux/vmalloc.h> |
42 | #include <linux/highmem.h> | 42 | #include <linux/highmem.h> |
43 | #include <linux/module.h> | ||
43 | 44 | ||
44 | #include "book3s.h" | 45 | #include "book3s.h" |
45 | 46 | ||
@@ -918,7 +919,7 @@ program_interrupt: | |||
918 | ulong cmd = kvmppc_get_gpr(vcpu, 3); | 919 | ulong cmd = kvmppc_get_gpr(vcpu, 3); |
919 | int i; | 920 | int i; |
920 | 921 | ||
921 | #ifdef CONFIG_KVM_BOOK3S_64_PR | 922 | #ifdef CONFIG_PPC_BOOK3S_64 |
922 | if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) { | 923 | if (kvmppc_h_pr(vcpu, cmd) == EMULATE_DONE) { |
923 | r = RESUME_GUEST; | 924 | r = RESUME_GUEST; |
924 | break; | 925 | break; |
@@ -1582,3 +1583,5 @@ static void kvmppc_book3s_exit_pr(void) | |||
1582 | 1583 | ||
1583 | module_init(kvmppc_book3s_init_pr); | 1584 | module_init(kvmppc_book3s_init_pr); |
1584 | module_exit(kvmppc_book3s_exit_pr); | 1585 | module_exit(kvmppc_book3s_exit_pr); |
1586 | |||
1587 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/powerpc/kvm/book3s_rtas.c b/arch/powerpc/kvm/book3s_rtas.c index 3219ba895246..cf95cdef73c9 100644 --- a/arch/powerpc/kvm/book3s_rtas.c +++ b/arch/powerpc/kvm/book3s_rtas.c | |||
@@ -260,6 +260,7 @@ fail: | |||
260 | */ | 260 | */ |
261 | return rc; | 261 | return rc; |
262 | } | 262 | } |
263 | EXPORT_SYMBOL_GPL(kvmppc_rtas_hcall); | ||
263 | 264 | ||
264 | void kvmppc_rtas_tokens_free(struct kvm *kvm) | 265 | void kvmppc_rtas_tokens_free(struct kvm *kvm) |
265 | { | 266 | { |
diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc/kvm/book3s_xics.c index cef3de96ff6c..c3c832b27ee5 100644 --- a/arch/powerpc/kvm/book3s_xics.c +++ b/arch/powerpc/kvm/book3s_xics.c | |||
@@ -840,6 +840,7 @@ int kvmppc_xics_hcall(struct kvm_vcpu *vcpu, u32 req) | |||
840 | 840 | ||
841 | return rc; | 841 | return rc; |
842 | } | 842 | } |
843 | EXPORT_SYMBOL_GPL(kvmppc_xics_hcall); | ||
843 | 844 | ||
844 | 845 | ||
845 | /* -- Initialisation code etc. -- */ | 846 | /* -- Initialisation code etc. -- */ |
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 81762eb7957e..de9a340d22ed 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
@@ -483,3 +483,4 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
483 | 483 | ||
484 | return emulated; | 484 | return emulated; |
485 | } | 485 | } |
486 | EXPORT_SYMBOL_GPL(kvmppc_emulate_instruction); | ||
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 874a2a5e6cec..9aaa07efa4b6 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -126,6 +126,7 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) | |||
126 | 126 | ||
127 | return r; | 127 | return r; |
128 | } | 128 | } |
129 | EXPORT_SYMBOL_GPL(kvmppc_prepare_to_enter); | ||
129 | 130 | ||
130 | int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) | 131 | int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) |
131 | { | 132 | { |
@@ -179,6 +180,7 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) | |||
179 | 180 | ||
180 | return r; | 181 | return r; |
181 | } | 182 | } |
183 | EXPORT_SYMBOL_GPL(kvmppc_kvm_pv); | ||
182 | 184 | ||
183 | int kvmppc_sanity_check(struct kvm_vcpu *vcpu) | 185 | int kvmppc_sanity_check(struct kvm_vcpu *vcpu) |
184 | { | 186 | { |
@@ -207,6 +209,7 @@ out: | |||
207 | vcpu->arch.sane = r; | 209 | vcpu->arch.sane = r; |
208 | return r ? 0 : -EINVAL; | 210 | return r ? 0 : -EINVAL; |
209 | } | 211 | } |
212 | EXPORT_SYMBOL_GPL(kvmppc_sanity_check); | ||
210 | 213 | ||
211 | int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu) | 214 | int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu) |
212 | { | 215 | { |
@@ -241,6 +244,7 @@ int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
241 | 244 | ||
242 | return r; | 245 | return r; |
243 | } | 246 | } |
247 | EXPORT_SYMBOL_GPL(kvmppc_emulate_mmio); | ||
244 | 248 | ||
245 | int kvm_arch_hardware_enable(void *garbage) | 249 | int kvm_arch_hardware_enable(void *garbage) |
246 | { | 250 | { |
@@ -665,6 +669,7 @@ int kvmppc_handle_load(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
665 | 669 | ||
666 | return EMULATE_DO_MMIO; | 670 | return EMULATE_DO_MMIO; |
667 | } | 671 | } |
672 | EXPORT_SYMBOL_GPL(kvmppc_handle_load); | ||
668 | 673 | ||
669 | /* Same as above, but sign extends */ | 674 | /* Same as above, but sign extends */ |
670 | int kvmppc_handle_loads(struct kvm_run *run, struct kvm_vcpu *vcpu, | 675 | int kvmppc_handle_loads(struct kvm_run *run, struct kvm_vcpu *vcpu, |
@@ -726,6 +731,7 @@ int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
726 | 731 | ||
727 | return EMULATE_DO_MMIO; | 732 | return EMULATE_DO_MMIO; |
728 | } | 733 | } |
734 | EXPORT_SYMBOL_GPL(kvmppc_handle_store); | ||
729 | 735 | ||
730 | int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) | 736 | int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run) |
731 | { | 737 | { |
@@ -1074,22 +1080,26 @@ long kvmppc_alloc_lpid(void) | |||
1074 | 1080 | ||
1075 | return lpid; | 1081 | return lpid; |
1076 | } | 1082 | } |
1083 | EXPORT_SYMBOL_GPL(kvmppc_alloc_lpid); | ||
1077 | 1084 | ||
1078 | void kvmppc_claim_lpid(long lpid) | 1085 | void kvmppc_claim_lpid(long lpid) |
1079 | { | 1086 | { |
1080 | set_bit(lpid, lpid_inuse); | 1087 | set_bit(lpid, lpid_inuse); |
1081 | } | 1088 | } |
1089 | EXPORT_SYMBOL_GPL(kvmppc_claim_lpid); | ||
1082 | 1090 | ||
1083 | void kvmppc_free_lpid(long lpid) | 1091 | void kvmppc_free_lpid(long lpid) |
1084 | { | 1092 | { |
1085 | clear_bit(lpid, lpid_inuse); | 1093 | clear_bit(lpid, lpid_inuse); |
1086 | } | 1094 | } |
1095 | EXPORT_SYMBOL_GPL(kvmppc_free_lpid); | ||
1087 | 1096 | ||
1088 | void kvmppc_init_lpid(unsigned long nr_lpids_param) | 1097 | void kvmppc_init_lpid(unsigned long nr_lpids_param) |
1089 | { | 1098 | { |
1090 | nr_lpids = min_t(unsigned long, KVMPPC_NR_LPIDS, nr_lpids_param); | 1099 | nr_lpids = min_t(unsigned long, KVMPPC_NR_LPIDS, nr_lpids_param); |
1091 | memset(lpid_inuse, 0, sizeof(lpid_inuse)); | 1100 | memset(lpid_inuse, 0, sizeof(lpid_inuse)); |
1092 | } | 1101 | } |
1102 | EXPORT_SYMBOL_GPL(kvmppc_init_lpid); | ||
1093 | 1103 | ||
1094 | int kvm_arch_init(void *opaque) | 1104 | int kvm_arch_init(void *opaque) |
1095 | { | 1105 | { |