KVM: powerpc: convert marker probes to event trace
[pandora-kernel.git] / arch / powerpc / kvm / emulate.c
index a561d6e..7737146 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/kvm_ppc.h>
 #include <asm/disassemble.h>
 #include "timing.h"
+#include "trace.h"
 
 #define OP_TRAP 3
 
@@ -187,7 +188,9 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
                        case SPRN_SRR1:
                                vcpu->arch.gpr[rt] = vcpu->arch.srr1; break;
                        case SPRN_PVR:
-                               vcpu->arch.gpr[rt] = vcpu->arch.pvr; break;
+                               vcpu->arch.gpr[rt] = mfspr(SPRN_PVR); break;
+                       case SPRN_PIR:
+                               vcpu->arch.gpr[rt] = mfspr(SPRN_PIR); break;
 
                        /* Note: mftb and TBRL/TBWL are user-accessible, so
                         * the guest can always access the real TB anyways.
@@ -417,7 +420,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
                }
        }
 
-       KVMTRACE_3D(PPC_INSTR, vcpu, inst, (int)vcpu->arch.pc, emulated, entryexit);
+       trace_kvm_ppc_instr(inst, vcpu->arch.pc, emulated);
 
        if (advance)
                vcpu->arch.pc += 4; /* Advance past emulated instruction. */