Commit 30b9fd75 authored by K V P, Satyanarayana's avatar K V P, Satyanarayana Committed by Jason Zeng
Browse files

vfio/pci: Add DVSEC PCI Extended Config Capability to user visible list.

mainline inclusion
from mainline-v6.4-rc1
commit 6467d074
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8C8B4
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6467d0740a2b2a1fc18b5d9dbc86a9705dbc2cf9



-------------------------------------

Intel-SIG: commit 6467d074  vfio/pci: Add DVSEC PCI Extended Config
Capability to user visible list
Backport SPR and EMR IOMMU PCIe related upstream bugfixes to kernel 5.10.

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.

Signed-off-by: default avatarK 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: default avatarAlex Williamson <alex.williamson@redhat.com>
(cherry picked from commit 6467d074)
Signed-off-by: default avatarEthan Zhao <haifeng.zhao@linux.intel.com>
parent 1ba9ddea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment