aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-02-16 08:24:03 -0500
committerAvi Kivity <avi@redhat.com>2012-04-08 05:55:03 -0400
commitd1ff54992d3008f4253ab3176913bb85d770e935 (patch)
tree2a295950753d1b306c978febf13ced46fbf47025 /arch
parentacab05290696db0a5431a9ad171be649ab56e87b (diff)
KVM: PPC: booke: deliver program int on emulation failure
When we fail to emulate an instruction for the guest, we better go in and tell it that we failed to emulate it, by throwing an illegal instruction exception. Please beware that we basically never get around to telling the guest that we failed thanks to the debugging code right above it. If user space however decides that it wants to ignore the debug, we would at least do "the right thing" afterwards. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kvm/booke.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 17d5318e6e4..9979be1d7ff 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -545,13 +545,13 @@ static int emulation_exit(struct kvm_run *run, struct kvm_vcpu *vcpu)
545 return RESUME_HOST; 545 return RESUME_HOST;
546 546
547 case EMULATE_FAIL: 547 case EMULATE_FAIL:
548 /* XXX Deliver Program interrupt to guest. */
549 printk(KERN_CRIT "%s: emulation at %lx failed (%08x)\n", 548 printk(KERN_CRIT "%s: emulation at %lx failed (%08x)\n",
550 __func__, vcpu->arch.pc, vcpu->arch.last_inst); 549 __func__, vcpu->arch.pc, vcpu->arch.last_inst);
551 /* For debugging, encode the failing instruction and 550 /* For debugging, encode the failing instruction and
552 * report it to userspace. */ 551 * report it to userspace. */
553 run->hw.hardware_exit_reason = ~0ULL << 32; 552 run->hw.hardware_exit_reason = ~0ULL << 32;
554 run->hw.hardware_exit_reason |= vcpu->arch.last_inst; 553 run->hw.hardware_exit_reason |= vcpu->arch.last_inst;
554 kvmppc_core_queue_program(vcpu, ESR_PIL);
555 return RESUME_HOST; 555 return RESUME_HOST;
556 556
557 default: 557 default: