diff options
author | Alexander Graf <agraf@suse.de> | 2010-01-09 21:27:32 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:35:49 -0500 |
commit | 5f2b105a1d6a137c8cfb2792b79128db965880a8 (patch) | |
tree | 2dbc8b513c8d9c2aea40804f9f31b34442d0be41 /arch/powerpc/kvm/emulate.c | |
parent | ff1ca3f983c4180018dbf5e02f2af06f86ef6d03 (diff) |
KVM: PPC: Pass through program interrupts
When we get a program interrupt in guest kernel mode, we try to emulate the
instruction.
If that doesn't fail, we report to the user and try again - at the exact same
instruction pointer. So if the guest kernel really does trigger an invalid
instruction, we loop forever.
So let's better go and forward program exceptions to the guest when we don't
know the instruction we're supposed to emulate.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/emulate.c')
-rw-r--r-- | arch/powerpc/kvm/emulate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 8b0ba0b69c2a..b905623735bd 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c | |||
@@ -476,6 +476,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) | |||
476 | advance = 0; | 476 | advance = 0; |
477 | printk(KERN_ERR "Couldn't emulate instruction 0x%08x " | 477 | printk(KERN_ERR "Couldn't emulate instruction 0x%08x " |
478 | "(op %d xop %d)\n", inst, get_op(inst), get_xop(inst)); | 478 | "(op %d xop %d)\n", inst, get_op(inst), get_xop(inst)); |
479 | kvmppc_core_queue_program(vcpu, 0); | ||
479 | } | 480 | } |
480 | } | 481 | } |
481 | 482 | ||