OpenCloudOS-Kernel/drivers/vfio
K V P, Satyanarayana d29e07dab1 vfio/pci: Add DVSEC PCI Extended Config Capability to user visible list.
commit 6467d0740a upstream.

The Designated Vendor-Specific Extended Capability (DVSEC Capability) is an
optional Extended Capability that is permitted to be implemented by any PCI
Express Function. This allows PCI Express component vendors to use
the Extended Capability mechanism to expose vendor-specific registers that can
be present in components by a variety of vendors. A DVSEC Capability structure
can tell vendor-specific software which features a particular component
supports.

An example usage of DVSEC is Intel Platform Monitoring Technology (PMT) for
enumerating and accessing hardware monitoring capabilities on a device.
PMT encompasses three device monitoring features, Telemetry (device metrics),
Watcher (sampling/tracing), and Crashlog. The DVSEC is used to discover these
features and provide a BAR offset to their registers with the Intel vendor code.

The current VFIO driver does not pass DVSEC capabilities to Virtual Machine (VM)
which makes PMT not to work inside the virtual machine. This series adds DVSEC
capability to user visible list to allow its use with VFIO. VFIO supports
passing of Vendor Specific Extended Capability (VSEC) and raw write access to
device. DVSEC also passed to VM in the same way as of VSEC.

Intel-SIG: commit 6467d0740a  vfio/pci: Add DVSEC PCI Extended Config
Capability to user visible list
Backport for SPR/EMR support.

Signed-off-by: K V P Satyanarayana <satyanarayana.k.v.p@intel.com>
Link: https://lore.kernel.org/r/20230317082222.3355912-1-satyanarayana.k.v.p@intel.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
(cherry picked from commit 6467d0740a)
[ Ethan Zhao: amend commit log ]
Signed-off-by: Ethan Zhao <haifeng.zhao@linux.intel.com>
2024-06-11 21:24:55 +08:00
..
mdev drivers/idxd: Fixup errors reported during DSA device migration 2024-06-11 21:18:02 +08:00
pci vfio/pci: Add DVSEC PCI Extended Config Capability to user visible list. 2024-06-11 21:24:55 +08:00
platform vfio: Use kconfig if XX/endif blocks instead of repeating 'depends on' 2024-06-11 21:15:48 +08:00
Kconfig vfio: Use kconfig if XX/endif blocks instead of repeating 'depends on' 2024-06-11 21:15:48 +08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vfio.c vfio: Remove struct vfio_device_ops open/release 2024-06-11 21:15:41 +08:00
vfio_iommu_spapr_tce.c vfio/spapr_tce: convert get_user_pages() --> pin_user_pages() 2024-06-11 21:14:58 +08:00
vfio_iommu_type1.c vfio: Support bind/unbind guest page table to default PASID 2024-06-11 21:16:37 +08:00
vfio_spapr_eeh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
virqfd.c vfio/virqfd: Drain events from eventfd in virqfd_wakeup() 2024-06-11 21:15:05 +08:00