diff options
author | Hollis Blanchard <hollisb@us.ibm.com> | 2008-11-05 10:36:24 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:52:24 -0500 |
commit | fcfdbd266a41d3e41d17666de410a24995fde03a (patch) | |
tree | f37ca0b9eaec03193608447bf5107e6149fe62a8 /arch/powerpc/kvm | |
parent | d4cf3892e50b8e35341086a4fe2bb8a3989b55d4 (diff) |
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 <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/emulate.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
74 | int advance = 1; | 74 | int advance = 1; |
75 | 75 | ||
76 | switch (get_op(inst)) { | 76 | switch (get_op(inst)) { |
77 | case 3: /* trap */ | 77 | case 3: /* trap */ |
78 | printk("trap!\n"); | 78 | vcpu->arch.esr |= ESR_PTR; |
79 | kvmppc_core_queue_program(vcpu); | 79 | kvmppc_core_queue_program(vcpu); |
80 | advance = 0; | 80 | advance = 0; |
81 | break; | 81 | break; |