]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
KVM: s390: use pid of cpu thread for sampling tagging
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 9 Jul 2015 15:56:13 +0000 (17:56 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 3 Aug 2015 08:04:59 +0000 (10:04 +0200)
Right now we use the address of the sie control block as tag for
the sampling data. This is hard to get for users. Let's just use
the PID of the cpu thread to mark the hardware samples.

Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/entry.S
arch/s390/kernel/perf_cpum_sf.c

index 5a966dea937fb15e2bab269394865abcf78df13e..247b7aae4c6de0a332bf0b276b7224de00296307 100644 (file)
@@ -199,7 +199,7 @@ ENTRY(sie64a)
        jo      .Lsie_skip                      # exit if fp/vx regs changed
        tm      __LC_MACHINE_FLAGS+6,0x20       # MACHINE_FLAG_LPP
        jz      .Lsie_enter
-       .insn   s,0xb2800000,__SF_EMPTY(%r15)   # set guest id
+       .insn   s,0xb2800000,__LC_CURRENT_PID   # set guest id to pid
 .Lsie_enter:
        sie     0(%r14)
        tm      __LC_MACHINE_FLAGS+6,0x20       # MACHINE_FLAG_LPP
index afe05bfb7e008a723388ff6c39f2d83d5693ad65..b973972f6ba5cf8e995a01ef7ba869a4e520b5e8 100644 (file)
@@ -1019,12 +1019,9 @@ static int perf_push_sample(struct perf_event *event, struct sf_raw_sample *sfr)
                break;
        }
 
-       /* The host-program-parameter (hpp) contains the sie control
-        * block that is set by sie64a() in entry64.S.  Check if hpp
-        * refers to a valid control block and set sde_regs flags
-        * accordingly.  This would allow to use hpp values for other
-        * purposes too.
-        * For now, simply use a non-zero value as guest indicator.
+       /* The host-program-parameter (hpp) contains the pid of
+        * the CPU thread as set by sie64a() in entry.S.
+        * If non-zero assume a guest sample.
         */
        if (sfr->basic.hpp)
                sde_regs->in_guest = 1;