All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] KVM: PPC: Pass through program interrupts
@ 2010-01-10  2:27 ` Alexander Graf
  0 siblings, 0 replies; 22+ messages in thread
From: Alexander Graf @ 2010-01-10  2:27 UTC (permalink / raw)
  To: kvm-u79uwXL29TY76Z2rM5mHXA; +Cc: kvm-ppc

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>
---
 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 8b0ba0b..b905623 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)
 			advance = 0;
 			printk(KERN_ERR "Couldn't emulate instruction 0x%08x "
 			       "(op %d xop %d)\n", inst, get_op(inst), get_xop(inst));
+			kvmppc_core_queue_program(vcpu, 0);
 		}
 	}
 
-- 
1.6.0.2


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-01-10 15:54 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-10  2:27 [PATCH 1/2] KVM: PPC: Pass through program interrupts Alexander Graf
2010-01-10  2:27 ` Alexander Graf
2010-01-10 12:22 ` Avi Kivity
2010-01-10 12:22   ` Avi Kivity
     [not found]   ` <4B49C684.8080407-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-01-10 12:32     ` Alexander Graf
2010-01-10 12:32       ` Alexander Graf
     [not found]       ` <3F51B03C-D36B-49F9-9AF3-EF5227DFAE3F-l3A5Bk7waGM@public.gmane.org>
2010-01-10 12:37         ` Avi Kivity
2010-01-10 12:37           ` Avi Kivity
     [not found]           ` <4B49CA20.6000303-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-01-10 12:46             ` Alexander Graf
2010-01-10 12:46               ` Alexander Graf
2010-01-10 14:26     ` Avi Kivity
2010-01-10 14:26       ` Avi Kivity
     [not found]       ` <4B49E391.60108-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-01-10 15:06         ` Alexander Graf
2010-01-10 15:06           ` Alexander Graf
     [not found]           ` <A5862364-1443-4A32-85B8-13B11B2E55DA-l3A5Bk7waGM@public.gmane.org>
2010-01-10 15:09             ` Avi Kivity
2010-01-10 15:09               ` Avi Kivity
     [not found]               ` <4B49EDBA.9040306-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-01-10 15:28                 ` Alexander Graf
2010-01-10 15:28                   ` Alexander Graf
     [not found]                   ` <A21E3A8F-81D1-468A-BE37-9CB5718E1FB8-l3A5Bk7waGM@public.gmane.org>
2010-01-10 15:37                     ` Avi Kivity
2010-01-10 15:37                       ` Avi Kivity
2010-01-10 15:54                       ` Avi Kivity
2010-01-10 15:54                         ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.