Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp237916ybj; Wed, 6 May 2020 16:16:06 -0700 (PDT) X-Google-Smtp-Source: APiQypJjumK4cDIdgOUCUhIv49MnyhhItD0JCuYQApm38lQQvoJ83iuNss8UfEeBaV8b9s+2dp36 X-Received: by 2002:a05:6402:d0a:: with SMTP id eb10mr9098030edb.60.1588806966573; Wed, 06 May 2020 16:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588806966; cv=none; d=google.com; s=arc-20160816; b=nJhOpclU8oAnUDSBiGZOmhqDhLYnf8AZbEuK7rVWPmkTFUDrAkPAkG/MQPztqVPiFM kTx2q+Z51FpucFSuRxLdJI0Ahsy7Dc5XJ1UPbRm1sUwxyLaD+gqcXN5b2W7V7/L0I+Dh SgEsPu0ivlKcuG4FmPDQiNeNV0lNoEQz44kWSdb1CeshbJJA+LGLem1xUg96YdFj9POX m0xXkFrnQ6PTbG47yYkdCrvhWHL8y3V76nqLHryD5BIUlQ49PXtHBK9F6HCH28L5xOvK arshVETFkl3qgMmpMmP2ssngjj5xQXYAqQffDTHc+URFGpme2L+KouDco959T13P8bTd F6hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=0siSjrpy3BZX7PgCHeuzbzevuKifI2gLxv1pqLI+rQk=; b=E5ejkeFEs7P0WWG+eL3B/s+fOY7G/QQGWOSWfUg0S07yLmT2r7w8jBlVYzt5QHaYQ0 G82vO44/Uf/KKQSSXseg642eKlW5ZZWk+enmWLHZ/DWUgV5jehS+DTWr3xuAX6BsotU7 lkrvAgCdzWLnPFcEZ1Ir0IrrksrnovHdmg3CLv8Q+dDXbCgh67pYGVsmyizJMo5Zdid8 c7kNhiAtai9tARXWYY49CD4/U2OLryUwXDzhoHoQaH4GKfm4YWH/0/qLmJ/3GK4D/Kzq 4xQhTizSAdV1rO/0DFNRohaxetWgTPgPRjVdR0GzyUPKel1ofKf5f/KK6XrN+WA8KMEO slWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c10si2051844edn.51.2020.05.06.16.15.43; Wed, 06 May 2020 16:16:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729777AbgEFPmJ (ORCPT + 99 others); Wed, 6 May 2020 11:42:09 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50728 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729668AbgEFPmI (ORCPT ); Wed, 6 May 2020 11:42:08 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 046F2Qod060973; Wed, 6 May 2020 11:42:07 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 30uvm97051-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 May 2020 11:42:01 -0400 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 046FdOPj007467; Wed, 6 May 2020 11:41:46 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 30uvm9703w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 May 2020 11:41:45 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 046FexB6027812; Wed, 6 May 2020 15:41:42 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03ams.nl.ibm.com with ESMTP id 30s0g5sg8g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 May 2020 15:41:42 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 046FeUs065732886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 6 May 2020 15:40:30 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 08C35A404D; Wed, 6 May 2020 15:41:40 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D47A0A4055; Wed, 6 May 2020 15:41:39 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 6 May 2020 15:41:39 +0000 (GMT) From: Niklas Schnelle To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Pierre Morel , Peter Oberparleiter Subject: [RFC 0/2] Enable PF-VF linking with pdev->no_vf_scan (s390) Date: Wed, 6 May 2020 17:41:37 +0200 Message-Id: <20200506154139.90609-1-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-05-06_07:2020-05-05,2020-05-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 suspectscore=0 clxscore=1015 adultscore=0 bulkscore=0 malwarescore=0 phishscore=0 mlxlogscore=461 lowpriorityscore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005060117 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Kernel Hackers, the following series enables PF-VF linking for architectures using the pdev->no_vf_scan flag (currently just s390). This includes kernel internal linking with pdev->physfn as well as creation of the relevant sysfs links. The former are required for example by libvirt to manage VFs. The series consists of two patches against the featuress branch of git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git - PCI/IOV: Introduce pci_iov_sysfs_link() function This patch factors the sysfs link creation out of pci_iov_add_virtfn() and into a new pci_iov_sysfs_link() function. On its own it also applies cleanly on v5.7-rc4. - s390/pci: create links between PFs and VFs This patch makes use of the pci_iov_sysfs_link() function introduced in the first patch to create the sysfs PF-VF links. It exploits recent work for multi-function support on s390 that gives us the real devfnto identify the parent PF of a given VF. Apart from these s390 specific support contained within arch/s390/ it also removes the fencing off of pci_iov_remove_virtfn() by the pdev->no_vf_scan flag making use of the common code path for clean VF removal. While this is common code s390 is currently the only case where pdev->no_vf_scan is true I can of course split this into a separate patch if requested but wanted to keep this together for the discussion. Best regards and your feedback is welcome, Niklas Schnelle Niklas Schnelle (2): PCI/IOV: Introduce pci_iov_sysfs_link() function s390/pci: create links between PFs and VFs arch/s390/include/asm/pci.h | 3 +- arch/s390/include/asm/pci_clp.h | 3 +- arch/s390/pci/pci_bus.c | 69 ++++++++++++++++++++++++++++++++- arch/s390/pci/pci_clp.c | 1 + drivers/pci/iov.c | 39 ++++++++++++------- include/linux/pci.h | 8 ++++ 6 files changed, 105 insertions(+), 18 deletions(-) -- 2.17.1