From mboxrd@z Thu Jan 1 00:00:00 1970 From: ehrhardt@linux.vnet.ibm.com Date: Mon, 14 Apr 2008 12:23:58 +0000 Subject: [kvm-ppc-devel] [PATCH] [3/3] kvmppc: make tlb tracing configurable Message-Id: <12081758441736-git-send-email-ehrhardt@linux.vnet.ibm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org From: Christian Ehrhardt This patch adds a config option to allow users to enable/disable the relayfs base tracing of tlb activities added by Hollis in the patch kvmppc_relay.diff. This patch aligns the behavior of this debug tracing with the two instruction tracings I added, all would then be configurable via .config as needed. This patch is intended to be fold into kvmppc_relay.diff and re-adds the select RELAY which should be ok now, because this is a separate config symbol. Signed-off-by: Christian Ehrhardt --- [diffstat] 44x_tlb.c | 2 ++ Kconfig | 8 ++++++++ powerpc.c | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/44x_tlb.c b/arch/powerpc/kvm/44x_tlb.c --- a/arch/powerpc/kvm/44x_tlb.c +++ b/arch/powerpc/kvm/44x_tlb.c @@ -45,6 +45,7 @@ struct tlb_record { void kvmppc_44x_tlb_trace(int action, int index, struct tlbe *tlbe, int ref) { +#ifdef CONFIG_KVM_POWERPC_440_TRACE_TLB struct tlb_record record = { .action = action, .tlb_index = index, @@ -56,6 +57,7 @@ void kvmppc_44x_tlb_trace(int action, in }; relay_write(kvmppc_44x_tlb_chan, &record, sizeof(record)); +#endif } static u32 kvmppc_44x_tlb_shadow_attrib(u32 attrib, int usermode) diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig --- a/arch/powerpc/kvm/Kconfig +++ b/arch/powerpc/kvm/Kconfig @@ -58,6 +58,14 @@ config KVM_POWERPC_440_TRACE_INSTRUCTION channel. If unsure, say N. +config KVM_POWERPC_440_TRACE_TLB + bool "ppc440 guest tlb activity tracing" + depends on KVM && 44x && KVM_POWERPC_440 + select RELAY + ---help--- + Adds the complete tracing of the tlb activities via a relayfs channel. + If unsure, say N. + config KVM_PPC_VIRTIO bool "Virtio Support" select VIRTIO diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1129,10 +1129,12 @@ static struct sysrq_key_op sysrq_kvm_op int kvm_arch_init(void *opaque) { +#ifdef CONFIG_KVM_POWERPC_440_TRACE_TLB kvmppc_44x_tlb_chan = relay_open("44x_tlb", kvm_debugfs_dir, 64, 64, &relay_callbacks, NULL); if (!kvmppc_44x_tlb_chan) - printk("relay_open failed\n"); + printk(KERN_ERR"relay_open failed\n"); +#endif #ifdef CONFIG_KVM_POWERPC_440_TRACE_INSTRUCTIONS kvmppc_44x_instr_chan = relay_open("44x_instr", kvm_debugfs_dir, 64, ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel