KVM: ARM: Reintroduce trace_kvm_hvc
authorChristoffer Dall <cdall@cs.columbia.edu>
Thu, 21 Feb 2013 19:26:10 +0000 (11:26 -0800)
committerChristoffer Dall <cdall@cs.columbia.edu>
Wed, 6 Mar 2013 23:48:43 +0000 (15:48 -0800)
This one got lost in the move to handle_exit, so let's reintroduce it
using an accessor to the immediate value field like the other ones.

Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>
arch/arm/include/asm/kvm_emulate.h
arch/arm/kvm/handle_exit.c

index e14268c77af073e485f46efed383026139725782..9cb2fe17cf3af2ee170af0277e9ecd806ba2db07 100644 (file)
@@ -158,4 +158,9 @@ static inline u8 kvm_vcpu_trap_get_fault(struct kvm_vcpu *vcpu)
        return kvm_vcpu_get_hsr(vcpu) & HSR_FSC_TYPE;
 }
 
+static inline u32 kvm_vcpu_hvc_get_imm(struct kvm_vcpu *vcpu)
+{
+       return kvm_vcpu_get_hsr(vcpu) & HSR_HVC_IMM_MASK;
+}
+
 #endif /* __ARM_KVM_EMULATE_H__ */
index f1cc3a8a9c7e8d4c9a91a1e87614b8ac311d4a78..301301808c4eb7c22940204e84bab991e863e5d9 100644 (file)
@@ -23,6 +23,8 @@
 #include <asm/kvm_mmu.h>
 #include <asm/kvm_psci.h>
 
+#include "trace.h"
+
 typedef int (*exit_handle_fn)(struct kvm_vcpu *, struct kvm_run *);
 
 static int handle_svc_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run)
@@ -35,6 +37,9 @@ static int handle_svc_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run)
 
 static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
 {
+       trace_kvm_hvc(*vcpu_pc(vcpu), *vcpu_reg(vcpu, 0),
+                     kvm_vcpu_hvc_get_imm(vcpu));
+
        if (kvm_psci_call(vcpu))
                return 1;
 
This page took 0.026944 seconds and 5 git commands to generate.