]> git.karo-electronics.de Git - linux-beck.git/commitdiff
KVM: PPC: booke: add GS documentation for program interrupt
authorAlexander Graf <agraf@suse.de>
Mon, 20 Feb 2012 11:33:22 +0000 (12:33 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 8 Apr 2012 09:55:19 +0000 (12:55 +0300)
The comment for program interrupts triggered when using bookehv was
misleading. Update it to mention why MSR_GS indicates that we have
to inject an interrupt into the guest again, not emulate it.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/kvm/booke.c

index af02d9dbd9510f4c281d14a37dea2724a3dbe268..7df3f3ae71d9e6d906b108605f09d79be7332e73 100644 (file)
@@ -685,8 +685,14 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
 
        case BOOKE_INTERRUPT_PROGRAM:
                if (vcpu->arch.shared->msr & (MSR_PR | MSR_GS)) {
-                       /* Program traps generated by user-level software must be handled
-                        * by the guest kernel. */
+                       /*
+                        * Program traps generated by user-level software must
+                        * be handled by the guest kernel.
+                        *
+                        * In GS mode, hypervisor privileged instructions trap
+                        * on BOOKE_INTERRUPT_HV_PRIV, not here, so these are
+                        * actual program interrupts, handled by the guest.
+                        */
                        kvmppc_core_queue_program(vcpu, vcpu->arch.fault_esr);
                        r = RESUME_GUEST;
                        kvmppc_account_exit(vcpu, USR_PR_INST);