Enable KVM TRACE support for PowerPC
PATCH 1/1 Enable KVM TRACE support for PowerPC
This set of patches adds the ability to compile and use kvm userspace tools with PowerPC. It also adds the ability for other archs to add support. Also added are new events into the format file. These have been submitted for inclusion into events defined in the kernel.
4 files changed, 13 insertions(+), 2 deletions(-) user/Makefile | 2 ++ user/config-powerpc.mak | 2 +- user/config-x86-common.mak | 1 - user/formats | 10 ++++++++++
PATCH 1/1 Fix building of kvmtrace tool for all archs
2 files changed, 2 insertions(+), 1 deletion(-) user/Makefile | 2 ++ user/config-x86-common.mak | 1 -
$(kvmtrace_objs) is defined in config-x86-common.mak. This needs to be moved to the common Makefile so everyone can build it. Also it is just one c file as opposed to multiple diffrering c files as with kvmctl.
user/Makefile +2 -0
@@ -33,6 +33,8 @@ autodepend-flags = -MMD -MF $(dir $*).$( LDFLAGS += -pthread -lrt +kvmtrace_objs= kvmtrace.o + kvmctl: $(kvmctl_objs) $(CC) $(LDFLAGS) $^ -o $@
user/config-x86-common.mak +0 -1
@@ -3,7 +3,6 @@ all: kvmctl kvmtrace test_cases all: kvmctl kvmtrace test_cases kvmctl_objs= main.o iotable.o ../libkvm/libkvm.a -kvmtrace_objs= kvmtrace.o balloon_ctl: balloon_ctl.o FLATLIBS = $(TEST_DIR)/libcflat.a $(libgcc)
PATCH 1/1 kvmtrace tool build by default for powerpc
In reply to Jerone Young1 file changed, 1 insertion(+), 1 deletion(-)
user/config-powerpc.mak | 2 +-
Patch adds kvmtrace to standard build in /user diretory for powerpc.
user/config-powerpc.mak +1 -1
@@ -18,7 +18,7 @@ testobjs := \ tests := $(addprefix test/powerpc/, $(testobjs)) -all: kvmctl $(tests) +all: kvmtrace kvmctl $(tests) kvmctl_objs = main-ppc.o iotable.o ../libkvm/libkvm.a
PATCH 1/1 Add new definitions to kvm trace format file
In reply to Jerone Young1 file changed, 10 insertions(+)
user/formats | 10 ++++++++++
This patch adds new defitions that are also defined in the kernel (or will be) to format file.
user/formats +10 -0
@@ -23,3 +23,13 @@ 0x00020013 %(tsc)d (+%(reltsc)8d) LMSW 0x00020013 %(tsc)d (+%(reltsc)8d) LMSW vcpu = 0x%(vcpu)08x pid = 0x%(pid)08x [ value = 0x%(1)08x ] 0x00020014 %(tsc)d (+%(reltsc)8d) APIC_ACCESS vcpu = 0x%(vcpu)08x pid = 0x%(pid)08x [ offset = 0x%(1)08x ] 0x00020015 %(tsc)d (+%(reltsc)8d) TDP_FAULT vcpu = 0x%(vcpu)08x pid = 0x%(pid)08x [ errorcode = 0x%(1)08x, virt = 0x%(3)08x %(2)08x ] +#context switch +0x00020016 %(tsc)d (+%(reltsc)8d) CONT_SWITCH vcpu = 0x%(vcpu)08x pid = 0x%(pid)08x +#tlb write +0x00020017 %(tsc)d (+%(reltsc)8d) TLB_WRITE vcpu = 0x%(vcpu)08x pid = 0x%(pid)08x [ index = 0x%(1)08x, tid = 0x%(2)08x, word1=0x%(3)08x, word2=0x%(4)08x, word3=0x%(5)08x ] +#tlb invalidate +0x00020018 %(tsc)d (+%(reltsc)8d) TLB_INVAL vcpu = 0x%(vcpu)08x pid = 0x%(pid)08x [ index = 0x%(1)08x, tid = 0x%(2)08x, word1=0x%(3)08x, word2=0x%(4)08x, word3=0x%(5)08x ] +#guest TLB write +0x00020019 %(tsc)d (+%(reltsc)8d) GTLB_WRITE vcpu = 0x%(vcpu)08x pid = 0x%(pid)08x [ index = 0x%(1)08x, tid = 0x%(2)08x, word1=0x%(3)08x, word2=0x%(4)08x, word3=0x%(5)08x ] +#shadow TLB write +0x00020020 %(tsc)d (+%(reltsc)8d) STLB_WRITE vcpu = 0x%(vcpu)08x pid = 0x%(pid)08x [ index = 0x%(1)08x, tid = 0x%(2)08x, word1=0x%(3)08x, word2=0x%(4)08x, word3=0x%(5)08x ]
Avi Kivity
AppliedQuoted 2 lines · Jerone Young
This set of patches adds the ability to compile and use kvm userspace tools with PowerPC. It also adds the ability for other archs to add support. Also added are new events into the format file. These have been submitted for inclusion into events defined in the kernel.
Applied all, thanks.
Signature · 1 line
Do not meddle in the internals of kernels, for they are subtle and quick to panic.