* [kvm-ppc-devel] [PATCH] [3/3] kvmppc: make tlb tracing configurable
@ 2008-04-14 12:23 ehrhardt
0 siblings, 0 replies; only message in thread
From: ehrhardt @ 2008-04-14 12:23 UTC (permalink / raw)
To: kvm-ppc
From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
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 <ehrhardt@linux.vnet.ibm.com>
---
[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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-14 12:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-14 12:23 [kvm-ppc-devel] [PATCH] [3/3] kvmppc: make tlb tracing configurable ehrhardt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.