From mboxrd@z Thu Jan 1 00:00:00 1970 From: ehrhardt@linux.vnet.ibm.com Subject: [PATCH 5/5] kvmppc: kvmtrace: trace powerpc instruction emulation Date: Mon, 7 Jul 2008 15:56:53 +0200 Message-ID: <1215439013-11480-6-git-send-email-ehrhardt@linux.vnet.ibm.com> References: <1215439013-11480-1-git-send-email-ehrhardt@linux.vnet.ibm.com> Cc: hollisb@us.ibm.com, avi@qumranet.com, kvm-ppc@vger.kernel.org, ehrhardt@linux.vnet.ibm.com To: kvm@vger.kernel.org Return-path: Received: from mtagate1.de.ibm.com ([195.212.29.150]:27299 "EHLO mtagate1.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752945AbYGGN5L (ORCPT ); Mon, 7 Jul 2008 09:57:11 -0400 In-Reply-To: <1215439013-11480-1-git-send-email-ehrhardt@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: From: Christian Ehrhardt This patch adds trace points for the instruction emulation on embedded powerpc utilizing the KVM_TRACE interface. The userspace portion to map and analyze the new ppc trace records will follow soon. Signed-off-by: Christian Ehrhardt --- [diffstat] arch/powerpc/kvm/emulate.c | 4 ++++ include/linux/kvm.h | 1 + 2 files changed, 5 insertions(+) [diff] diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c --- a/arch/powerpc/kvm/emulate.c +++ b/arch/powerpc/kvm/emulate.c @@ -769,6 +769,10 @@ break; } + KVMTRACE_4D(PPC_INSTR, vcpu, + inst, vcpu->arch.pc, emulated, + (__u32)current_kernel_time().tv_nsec, entryexit); + if (advance) vcpu->arch.pc += 4; /* Advance past emulated instruction. */ diff --git a/include/linux/kvm.h b/include/linux/kvm.h --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -473,5 +473,6 @@ #define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16) #define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17) #define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18) +#define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19) #endif