summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAlexander Graf2012-02-20 12:33:22 +0100
committerAvi Kivity2012-04-08 11:55:19 +0200
commit0268597c811ccf55e0bda20907c1a9e6001365cf (patch)
treeed38fdd7caba11212817214906f2c25f8fc80c1f /arch/powerpc
parentKVM: PPC: booke: Readd debug abort code for machine check (diff)
downloadkernel-qcow2-linux-0268597c811ccf55e0bda20907c1a9e6001365cf.tar.gz
kernel-qcow2-linux-0268597c811ccf55e0bda20907c1a9e6001365cf.tar.xz
kernel-qcow2-linux-0268597c811ccf55e0bda20907c1a9e6001365cf.zip
KVM: PPC: booke: add GS documentation for program interrupt
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kvm/booke.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index af02d9dbd951..7df3f3ae71d9 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -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);