Skip to content
  1. Jul 22, 2020
    • Madhavan Srinivasan's avatar
      powerpc/xmon: Add PowerISA v3.1 PMU SPRs · 1979ae8c
      Madhavan Srinivasan authored
      
      
      PowerISA v3.1 added three new perfromance
      monitoring unit (PMU) speical purpose register (SPR).
      They are Monitor Mode Control Register 3 (MMCR3),
      Sampled Instruction Event Register 2 (SIER2),
      Sampled Instruction Event Register 3 (SIER3).
      
      Patch here adds a new dump function dump_310_sprs
      to print these SPR values.
      
      Signed-off-by: default avatarMadhavan Srinivasan <maddy@linux.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/1594996707-3727-7-git-send-email-atrajeev@linux.vnet.ibm.com
      1979ae8c
    • Athira Rajeev's avatar
      KVM: PPC: Book3S HV: Save/restore new PMU registers · 5752fe0b
      Athira Rajeev authored
      
      
      Power ISA v3.1 has added new performance monitoring unit (PMU) special
      purpose registers (SPRs). They are:
      
      Monitor Mode Control Register 3 (MMCR3)
      Sampled Instruction Event Register A (SIER2)
      Sampled Instruction Event Register B (SIER3)
      
      Add support to save/restore these new SPRs while entering/exiting
      guest. Also include changes to support KVM_REG_PPC_MMCR3/SIER2/SIER3.
      Add new SPRs to KVM API documentation.
      
      Signed-off-by: default avatarAthira Rajeev <atrajeev@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/1594996707-3727-6-git-send-email-atrajeev@linux.vnet.ibm.com
      5752fe0b
    • Madhavan Srinivasan's avatar
      powerpc/perf: Add support for ISA3.1 PMU SPRs · c718547e
      Madhavan Srinivasan authored
      
      
      PowerISA v3.1 includes new performance monitoring unit(PMU)
      special purpose registers (SPRs). They are
      
      Monitor Mode Control Register 3 (MMCR3)
      Sampled Instruction Event Register 2 (SIER2)
      Sampled Instruction Event Register 3 (SIER3)
      
      MMCR3 is added for further sampling related configuration
      control. SIER2/SIER3 are added to provide additional
      information about the sampled instruction.
      
      Patch adds new PPMU flag called "PPMU_ARCH_31" to support handling of
      these new SPRs, updates the struct thread_struct to include these new
      SPRs, include MMCR3 in struct mmcr_regs. This is needed to support
      programming of MMCR3 SPR during event_enable/disable. Patch also adds
      the sysfs support for the MMCR3 SPR along with SPRN_ macros for these
      new pmu SPRs.
      
      Signed-off-by: default avatarMadhavan Srinivasan <maddy@linux.ibm.com>
      [mpe: Rename to PPMU_ARCH_31 as noted by jpn]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/1594996707-3727-5-git-send-email-atrajeev@linux.vnet.ibm.com
      c718547e
    • Athira Rajeev's avatar
      powerpc/perf: Update Power PMU cache_events to u64 type · 9d4fc86d
      Athira Rajeev authored
      
      
      Events of type PERF_TYPE_HW_CACHE was described for Power PMU
      as: int (*cache_events)[type][op][result];
      
      where type, op, result values unpacked from the event attribute config
      value is used to generate the raw event code at runtime.
      
      So far the event code values which used to create these cache-related
      events were within 32 bit and `int` type worked. In power10,
      some of the event codes are of 64-bit value and hence update the
      Power PMU cache_events to `u64` type in `power_pmu` struct.
      Also propagate this change to existing all PMU driver code paths
      which are using ppmu->cache_events.
      
      Signed-off-by: default avatarAthira Rajeev <atrajeev@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/1594996707-3727-4-git-send-email-atrajeev@linux.vnet.ibm.com
      9d4fc86d
    • Athira Rajeev's avatar
      KVM: PPC: Book3S HV: Cleanup updates for kvm vcpu MMCR · 7e4a145e
      Athira Rajeev authored
      
      
      Currently `kvm_vcpu_arch` stores all Monitor Mode Control registers
      in a flat array in order: mmcr0, mmcr1, mmcra, mmcr2, mmcrs
      Split this to give mmcra and mmcrs its own entries in vcpu and
      use a flat array for mmcr0 to mmcr2. This patch implements this
      cleanup to make code easier to read.
      
      Signed-off-by: default avatarAthira Rajeev <atrajeev@linux.vnet.ibm.com>
      [mpe: Fix MMCRA/MMCR2 uapi breakage as noted by paulus]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/1594996707-3727-3-git-send-email-atrajeev@linux.vnet.ibm.com
      7e4a145e
  2. Jul 21, 2020
  3. Jul 20, 2020