KVM: ppc: deliver INTERRUPT_FP_UNAVAIL to the guest
authorChristian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Tue, 29 Apr 2008 16:18:23 +0000 (18:18 +0200)
committerAvi Kivity <avi@qumranet.com>
Sun, 4 May 2008 11:44:45 +0000 (14:44 +0300)
This patch adds the delivery of INTERRUPT_FP_UNAVAIL exceptions to the guest.
It's needed if a guest uses ppc binaries using the Floating point instructions.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Acked-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/powerpc/kvm/booke_guest.c

index b3db6f4576ad36698c36d605e2b2d3fcbbcda887..712d89a28c46205f0f7fbfebfc4df03daf148192 100644 (file)
@@ -339,6 +339,11 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
                }
                break;
 
+       case BOOKE_INTERRUPT_FP_UNAVAIL:
+               kvmppc_queue_exception(vcpu, exit_nr);
+               r = RESUME_GUEST;
+               break;
+
        case BOOKE_INTERRUPT_DATA_STORAGE:
                vcpu->arch.dear = vcpu->arch.fault_dear;
                vcpu->arch.esr = vcpu->arch.fault_esr;