From: Hollis Blanchard Date: Wed, 5 Nov 2008 15:36:24 +0000 (-0600) Subject: KVM: ppc: improve trap emulation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fcfdbd266a41d3e41d17666de410a24995fde03a;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git KVM: ppc: improve trap emulation set ESR[PTR] when emulating a guest trap. This allows Linux guests to properly handle WARN_ON() (i.e. detect that it's a non-fatal trap). Also remove debugging printk in trap emulation. Signed-off-by: Hollis Blanchard Signed-off-by: Avi Kivity --- diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index 814f1e687857..4c30fa0c31ea 100644 --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c @@ -74,8 +74,8 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu) int advance = 1; switch (get_op(inst)) { - case 3: /* trap */ - printk("trap!\n"); + case 3: /* trap */ + vcpu->arch.esr |= ESR_PTR; kvmppc_core_queue_program(vcpu); advance = 0; break;