Skip to content

Commit f4128a7

Browse files
author
Mete Durlu
committed
s390/pci: Fix zpci_bus_is_isolated_vf() for non-VFs
JIRA: https://issues.redhat.com/browse/RHEL-88818 commit 8691abd Author: Niklas Schnelle <schnelle@linux.ibm.com> Date: Thu Mar 20 17:26:12 2025 +0100 s390/pci: Fix zpci_bus_is_isolated_vf() for non-VFs For non-VFs, zpci_bus_is_isolated_vf() should return false because they aren't VFs. While zpci_iov_find_parent_pf() specifically checks if a function is a VF, it then simply returns that there is no parent. The simplistic check for a parent then leads to these functions being confused with isolated VFs and isolating them on their own domain even if sibling PFs should share the domain. Fix this by explicitly checking if a function is not a VF. Note also that at this point the case where RIDs are ignored is already handled and in this case all PCI functions get isolated by being detected in zpci_bus_is_multifunction_root(). Cc: stable@vger.kernel.org Fixes: 2844ddb ("s390/pci: Fix handling of isolated VFs") Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Mete Durlu <mdurlu@redhat.com>
1 parent d85f34b commit f4128a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/s390/pci/pci_bus.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,9 @@ static bool zpci_bus_is_isolated_vf(struct zpci_bus *zbus, struct zpci_dev *zdev
335335
{
336336
struct pci_dev *pdev;
337337

338+
if (!zdev->vfn)
339+
return false;
340+
338341
pdev = zpci_iov_find_parent_pf(zbus, zdev);
339342
if (!pdev)
340343
return true;

0 commit comments

Comments
 (0)