aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-03-24 16:48:28 -0400
committerAvi Kivity <avi@redhat.com>2010-05-17 05:17:07 -0400
commitca7f4203b9b66e12d0d9968ff7dfe781f3a9695a (patch)
treeddec3225d7f7a2ab2d0cdaf4ff55725e547206d1 /arch/powerpc/kvm/book3s.c
parent1c85e73303fa70cd6bc2bf138484acb4ffe30efd (diff)
KVM: PPC: Implement alignment interrupt
Mac OS X has some applications - namely the Finder - that require alignment interrupts to work properly. So we need to implement them. But the spec for 970 and 750 also looks different. While 750 requires the DSISR and DAR fields to reflect some instruction bits (DSISR) and the fault address (DAR), the 970 declares this as an optional feature. So we need to reconstruct DSISR and DAR manually. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r--arch/powerpc/kvm/book3s.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
index c058f1a5c095..de12202fe1c6 100644
--- a/arch/powerpc/kvm/book3s.c
+++ b/arch/powerpc/kvm/book3s.c
@@ -906,6 +906,16 @@ program_interrupt:
906 } 906 }
907 break; 907 break;
908 } 908 }
909 case BOOK3S_INTERRUPT_ALIGNMENT:
910 if (kvmppc_read_inst(vcpu) == EMULATE_DONE) {
911 to_book3s(vcpu)->dsisr = kvmppc_alignment_dsisr(vcpu,
912 vcpu->arch.last_inst);
913 vcpu->arch.dear = kvmppc_alignment_dar(vcpu,
914 vcpu->arch.last_inst);
915 kvmppc_book3s_queue_irqprio(vcpu, exit_nr);
916 }
917 r = RESUME_GUEST;
918 break;
909 case BOOK3S_INTERRUPT_MACHINE_CHECK: 919 case BOOK3S_INTERRUPT_MACHINE_CHECK:
910 case BOOK3S_INTERRUPT_TRACE: 920 case BOOK3S_INTERRUPT_TRACE:
911 kvmppc_book3s_queue_irqprio(vcpu, exit_nr); 921 kvmppc_book3s_queue_irqprio(vcpu, exit_nr);