mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 19:15:04 +07:00
b764bb1c50
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>
27 lines
683 B
C
27 lines
683 B
C
/*
|
|
* Performance event support - s390 specific definitions.
|
|
*
|
|
* Copyright IBM Corp. 2009, 2012
|
|
* Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
|
|
* Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
|
|
*/
|
|
|
|
#include <asm/cpu_mf.h>
|
|
|
|
/* CPU-measurement counter facility */
|
|
#define PERF_CPUM_CF_MAX_CTR 256
|
|
|
|
/* Per-CPU flags for PMU states */
|
|
#define PMU_F_RESERVED 0x1000
|
|
#define PMU_F_ENABLED 0x2000
|
|
|
|
#ifdef CONFIG_64BIT
|
|
|
|
/* Perf callbacks */
|
|
struct pt_regs;
|
|
extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
|
|
extern unsigned long perf_misc_flags(struct pt_regs *regs);
|
|
#define perf_misc_flags(regs) perf_misc_flags(regs)
|
|
|
|
#endif /* CONFIG_64BIT */
|