NACK/Cmnt: [SRU][N][PATCH 1/1] s390/pci: Fix zpci_bus_is_isolated_vf() for non-VFs

Hui Wang hui.wang at canonical.com
Mon May 26 10:29:39 UTC 2025


On 5/26/25 17:43, Zixing Liu wrote:
> From: Niklas Schnelle <schnelle at linux.ibm.com>
Missing BugLink here.
> 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 at vger.kernel.org
> Fixes: 2844ddbd540f ("s390/pci: Fix handling of isolated VFs")
> Signed-off-by: Niklas Schnelle <schnelle at linux.ibm.com>
> Reviewed-by: Halil Pasic <pasic at linux.ibm.com>
> Signed-off-by: Vasily Gorbik <gor at linux.ibm.com>
> (cherry picked from commit 8691abd3afaadd816a298503ec1a759df1305d2e)
> Signed-off-by: Zixing Liu <zixing.liu at canonical.com>
> ---
>   arch/s390/pci/pci_bus.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/arch/s390/pci/pci_bus.c b/arch/s390/pci/pci_bus.c
> index c38546829345..23c27c632013 100644
> --- a/arch/s390/pci/pci_bus.c
> +++ b/arch/s390/pci/pci_bus.c
> @@ -335,6 +335,9 @@ static bool zpci_bus_is_isolated_vf(struct zpci_bus *zbus, struct zpci_dev *zdev
>   {
>   	struct pci_dev *pdev;
>   
> +	if (!zdev->vfn)
> +		return false;
> +
>   	pdev = zpci_iov_find_parent_pf(zbus, zdev);
>   	if (!pdev)
>   		return true;



More information about the kernel-team mailing list