diff options
author | Niklas Schnelle <schnelle@linux.ibm.com> | 2021-02-24 11:29:36 +0100 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2021-04-05 11:30:57 +0200 |
commit | 408f2c9c15682fc21b645fdec1f726492e235c4b (patch) | |
tree | bea1b7656319b70e404c1c3ca3d2c810ecfab3ae /Documentation/s390 | |
parent | 652d40b2f8bec14957295f999e3d329c3b53390f (diff) | |
download | linux-stable-408f2c9c15682fc21b645fdec1f726492e235c4b.tar.gz linux-stable-408f2c9c15682fc21b645fdec1f726492e235c4b.tar.bz2 linux-stable-408f2c9c15682fc21b645fdec1f726492e235c4b.zip |
s390/pci: expose UID uniqueness guarantee
On s390 each PCI device has a user-defined ID (UID) exposed under
/sys/bus/pci/devices/<dev>/uid. This ID was designed to serve as the PCI
device's primary index and to match the device within Linux to the
device configured in the hypervisor. To serve as a primary identifier
the UID must be unique within the Linux instance, this is guaranteed by
the platform if and only if the UID Uniqueness Checking flag is set
within the CLP List PCI Functions response.
While the UID has been exposed to userspace since commit ac4995b9d570
("s390/pci: add some new arch specific pci attributes") whether or not
the platform guarantees its uniqueness for the lifetime of the Linux
instance while defined is not visible from userspace. Remedy this by
exposing this as a per device attribute at
/sys/bus/pci/devices/<dev>/uid_is_unique
Keeping this a per device attribute allows for maximum flexibility if we
ever end up with some devices not having a UID or not enjoying the
guaranteed uniqueness.
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Viktor Mihajlovski <mihajlov@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'Documentation/s390')
-rw-r--r-- | Documentation/s390/pci.rst | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Documentation/s390/pci.rst b/Documentation/s390/pci.rst index 492850bff316..8157f0cddbc2 100644 --- a/Documentation/s390/pci.rst +++ b/Documentation/s390/pci.rst @@ -50,7 +50,8 @@ Entries specific to zPCI functions and entries that hold zPCI information. * /sys/bus/pci/slots/XXXXXXXX The slot entries are set up using the function identifier (FID) of the - PCI function. + PCI function. The format depicted as XXXXXXXX above is 8 hexadecimal digits + with 0 padding and lower case hexadecimal digitis. - /sys/bus/pci/slots/XXXXXXXX/power @@ -88,8 +89,15 @@ Entries specific to zPCI functions and entries that hold zPCI information. is attached to. - uid - The unique identifier (UID) is defined when configuring an LPAR and is - unique in the LPAR. + The user identifier (UID) may be defined as part of the machine + configuration or the z/VM or KVM guest configuration. If the accompanying + uid_is_unique attribute is 1 the platform guarantees that the UID is unique + within that instance and no devices with the same UID can be attached + during the lifetime of the system. + + - uid_is_unique + Indicates whether the user identifier (UID) is guaranteed to be and remain + unique within this Linux instance. - pfip/segmentX The segments determine the isolation of a function. |