aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/booke.c
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2008-11-05 09:36:18 -0600
committerAvi Kivity <avi@redhat.com>2008-12-31 16:52:22 +0200
commitdb93f5745d836f81cef0b4101a7c2685eeb55efb (patch)
tree970b0dfc93dbbe25eb988b008bbbeffd866f3f23 /arch/powerpc/kvm/booke.c
parent5cbb5106f50b4515815cd32cf944958c0d4da83f (diff)
downloadkernel_samsung_crespo-db93f5745d836f81cef0b4101a7c2685eeb55efb.zip
kernel_samsung_crespo-db93f5745d836f81cef0b4101a7c2685eeb55efb.tar.gz
kernel_samsung_crespo-db93f5745d836f81cef0b4101a7c2685eeb55efb.tar.bz2
KVM: ppc: create struct kvm_vcpu_44x and introduce container_of() accessor
This patch doesn't yet move all 44x-specific data into the new structure, but is the first step down that path. In the future we may also want to create a struct kvm_vcpu_booke. Based on patch from Liu Yu <yu.liu@freescale.com>. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r--arch/powerpc/kvm/booke.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index c619d1b..883e9db 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -573,7 +573,7 @@ int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu,
return kvmppc_core_vcpu_translate(vcpu, tr);
}
-static int kvmppc_booke_init(void)
+int kvmppc_booke_init(void)
{
unsigned long ivor[16];
unsigned long max_ivor = 0;
@@ -618,14 +618,11 @@ static int kvmppc_booke_init(void)
flush_icache_range(kvmppc_booke_handlers,
kvmppc_booke_handlers + max_ivor + kvmppc_handler_len);
- return kvm_init(NULL, sizeof(struct kvm_vcpu), THIS_MODULE);
+ return 0;
}
-static void __exit kvmppc_booke_exit(void)
+void __exit kvmppc_booke_exit(void)
{
free_pages(kvmppc_booke_handlers, VCPU_SIZE_ORDER);
kvm_exit();
}
-
-module_init(kvmppc_booke_init)
-module_exit(kvmppc_booke_exit)