Skip to contentSkip to conversation

kvmppc: make tlb tracing configurable

PATCH In review [email protected] 1 participant 1 message Apr 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 kvmppc: make tlb tracing configurable

From: Christian Ehrhardt <[email protected]>

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.

---

[diffstat]

 44x_tlb.c |    2 ++
 Kconfig   |    8 ++++++++
 powerpc.c |    4 +++-
 3 files changed, 13 insertions(+), 1 deletion(-)
arch/powerpc/kvm/44x_tlb.c +2 -0
@@ -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)
arch/powerpc/kvm/Kconfig +8 -0
@@ -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
arch/powerpc/kvm/powerpc.c +3 -1
@@ -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 [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel