aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/booke.c
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2008-11-05 10:36:18 -0500
committerAvi Kivity <avi@redhat.com>2008-12-31 09:52:22 -0500
commitdb93f5745d836f81cef0b4101a7c2685eeb55efb (patch)
tree970b0dfc93dbbe25eb988b008bbbeffd866f3f23 /arch/powerpc/kvm/booke.c
parent5cbb5106f50b4515815cd32cf944958c0d4da83f (diff)
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 c619d1b912c5..883e9db5f00c 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,
573 return kvmppc_core_vcpu_translate(vcpu, tr); 573 return kvmppc_core_vcpu_translate(vcpu, tr);
574} 574}
575 575
576static int kvmppc_booke_init(void) 576int kvmppc_booke_init(void)
577{ 577{
578 unsigned long ivor[16]; 578 unsigned long ivor[16];
579 unsigned long max_ivor = 0; 579 unsigned long max_ivor = 0;
@@ -618,14 +618,11 @@ static int kvmppc_booke_init(void)
618 flush_icache_range(kvmppc_booke_handlers, 618 flush_icache_range(kvmppc_booke_handlers,
619 kvmppc_booke_handlers + max_ivor + kvmppc_handler_len); 619 kvmppc_booke_handlers + max_ivor + kvmppc_handler_len);
620 620
621 return kvm_init(NULL, sizeof(struct kvm_vcpu), THIS_MODULE); 621 return 0;
622} 622}
623 623
624static void __exit kvmppc_booke_exit(void) 624void __exit kvmppc_booke_exit(void)
625{ 625{
626 free_pages(kvmppc_booke_handlers, VCPU_SIZE_ORDER); 626 free_pages(kvmppc_booke_handlers, VCPU_SIZE_ORDER);
627 kvm_exit(); 627 kvm_exit();
628} 628}
629
630module_init(kvmppc_booke_init)
631module_exit(kvmppc_booke_exit)