lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1593709517-108857-1-git-send-email-kan.liang@linux.intel.com>
Date:   Thu,  2 Jul 2020 10:05:10 -0700
From:   kan.liang@...ux.intel.com
To:     peterz@...radead.org, bhelgaas@...gle.com, mingo@...hat.com,
        linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Cc:     jeffrey.t.kirsher@...el.com, olof@...om.net,
        dan.j.williams@...el.com, ak@...ux.intel.com,
        Kan Liang <kan.liang@...ux.intel.com>
Subject: [PATCH 0/7] Support PCIe3 uncore PMU on Snow Ridge

From: Kan Liang <kan.liang@...ux.intel.com>

The Snow Ridge integrated PCIe3 uncore performance monitoring unit (PMU)
can be used to collect the performance data, e.g., the utilization
between the PCIe devices and the components (in M2IOSF) which are
responsible for translating and managing the requests to/from the
device. The performance data is very useful for analyzing the
performance of the PCIe devices.

The PCIe3 uncore PMU was once supported in the Linux kernel, but it was
removed by the commit id 2167f1625c2f ("perf/x86/intel/uncore: Remove
PCIe3 unit for SNR") due to the conflict between the PCIe Root Port
driver and the perf uncore driver. The counters of the PCIe3 uncore PMU
are located in the configuration space of the PCIe Root Port device,
which already has a bonded driver portdrv_pci. One device can only have
one bonded driver. The uncore driver is always failed to be loaded.

To re-enable the PCIe3 uncore PMU support in the uncore driver, a new
solution should be introduced, which has to meet the requirements as
below:
- must have a reliable way to find the PCIe Root Port device from the
  uncore driver;
- must be able to access the uncore counters of the PCIe Root Port
  device from the uncore driver;
- must support hotplug. When the PCIe Root Port device is removed, the
  uncore driver has to be notified and unregisters the PCIe3 uncore
  PMU.

A new platform device 'perf_uncore_pcieport' as a child device of the
PCIe Root Port device is introduced to address the issue, which:
- can be probed by a unique name, 'perf_uncore_pcieport'. The uncore
  driver is the only driver for the new platform device.
- can provide the struct pci_dev of its parent, aka the PCIe Root Port
  device. The struct pci_dev can be used by the uncore driver to
  register a PMU for accessing the counters in the PCIe Root Port
  device.
- can be notified if its parent PCIe Root Port device is removed.
  The uncore driver can unregister the PMU accordingly.

Kan Liang (7):
  PCI/portdrv: Create a platform device for the perf uncore driver
  perf/x86/intel/uncore: Factor out uncore_pci_get_die_info()
  perf/x86/intel/uncore: Factor out uncore_find_pmu_by_pci_dev()
  perf/x86/intel/uncore: Factor out uncore_pci_pmu_register()
  perf/x86/intel/uncore: Factor out uncore_pci_pmu_unregister()
  perf/x86/intel/uncore: Generic support for the platform device
  perf/x86/intel/uncore: Support PCIe3 unit on Snow Ridge

 arch/x86/events/intel/uncore.c       | 213 +++++++++++++++++++++++++----------
 arch/x86/events/intel/uncore.h       |  19 ++++
 arch/x86/events/intel/uncore_snbep.c |  60 ++++++++++
 drivers/pci/pcie/portdrv_pci.c       |  38 +++++++
 4 files changed, 271 insertions(+), 59 deletions(-)

-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ