]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390,perf: Detect if perf samples belong to KVM host or guest
authorHeinz Graalfs <graalfs@linux.vnet.ibm.com>
Wed, 12 Jun 2013 11:54:56 +0000 (13:54 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 17 Jun 2013 15:10:23 +0000 (17:10 +0200)
commit98a6b8bc7ee97a9061e9689b80bc5cd23faf42d9
tree3437841e26cc513f55f6366aebf533f57bbaea6e
parent88e734555c6adfddde3be1555342261da90ccb55
KVM: s390,perf: Detect if perf samples belong to KVM host or guest

This patch is based on an original patch of David Hildenbrand.

The perf core implementation calls architecture specific code in order
to ask for specific information for a particular sample:

perf_instruction_pointer()
When perf core code asks for the instruction pointer, architecture
specific code must detect if a KVM guest was running when the sample
was taken. A sample can be associated with a  KVM guest when the PSW
supervisor state bit is set and the PSW instruction pointer part
contains the address of 'sie_exit'.
A KVM guest's instruction pointer information is then retrieved via
gpsw entry pointed to by the sie control-block.

perf_misc_flags()
perf code code calls this function in order to associate the kernel
vs. user state infomation with a particular sample. Architecture
specific code must also first detectif a KVM guest was running
at the time the sample was taken.

Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/s390/include/asm/kvm_host.h
arch/s390/include/asm/perf_event.h
arch/s390/kernel/entry64.S
arch/s390/kernel/perf_event.c
arch/s390/kernel/s390_ksyms.c