Received: by 10.213.65.68 with SMTP id h4csp867526imn; Wed, 28 Mar 2018 14:34:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx49qqw90wLSqvUDFPH9vscFygk5PN26VnotE0uvB/XNAioHv2Sb3zgzoft47XXpnRn71tYkU X-Received: by 10.101.93.71 with SMTP id e7mr3578321pgt.171.1522272861638; Wed, 28 Mar 2018 14:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522272861; cv=none; d=google.com; s=arc-20160816; b=lH1X6su6/sFZcKY0A0Cbx4ev7YEoYkRx8o66AW4RyKZUVKD8rj639HvmSxD5Y7b/Ey sg6nfih74itqG38U3n+47Dpj6O5fYMaY3U+pgUP8SAdZCHy1rjQLA0gGDWdszf7vmG2s PdcZnyRCL/FPS5WLnsM8ptv9ZKHEbbdmpJuBP5qNd0MVX5RI+89+CRp54f7IrLDAoxGG rHvDGAY1/E3D2CT+hBmDVaG/dG7QMk8mMUXs7ESdHstZcJMvQb82+lhlol5YP3aibTxi HrYCtdo93e/DByBYje/6OBdzfI+ujxLtpGh0raAoHh2T7lGK9LRdkd/ATTop9pHjTE0l BKPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=2FmwJVdbp7iit+OWVkJpWF3hVGZCxo24tZFFtiCaB7I=; b=pQ8wpZAJq7FTipqxvRRlg2p14PNp7JNGWKhajQ5yHBc9Gx26wwTcsbG2RffwEm9TxY as4EFntEI5Frm+E2FhVqkAedqH0cNNodGaZdoJ5SYhf+vRYjc8rCCVULLEXwgH9/KsIa mp3Hgf817+7gfODPPfrDWkS81q8p40KYMfjXbrY7b2KJk1Bm/eCjw4wQxJ7Gw3/ZOsoJ I0JZsHb2UUkgx3bnFMHet7BDj7WZaii+3oY22SEOvuoJ9kygJqkV2buS2bC6y8zB5rIt wy7D7nIIA1pltz6HY61aZCnriuro6yiSjGZVHW3SwQpPgViuJ1OCeU2h9m72EbRc191S D39g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x12-v6si4227837plo.129.2018.03.28.14.34.07; Wed, 28 Mar 2018 14:34:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360AbeC1Vbp (ORCPT + 99 others); Wed, 28 Mar 2018 17:31:45 -0400 Received: from mga14.intel.com ([192.55.52.115]:51194 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752447AbeC1Vbn (ORCPT ); Wed, 28 Mar 2018 17:31:43 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2018 14:31:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,373,1517904000"; d="asc'?scan'208";a="29725099" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga006.jf.intel.com with ESMTP; 28 Mar 2018 14:31:42 -0700 Received: from orsmsx157.amr.corp.intel.com (10.22.240.23) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 28 Mar 2018 14:31:41 -0700 Received: from orsmsx101.amr.corp.intel.com ([169.254.8.10]) by ORSMSX157.amr.corp.intel.com ([169.254.9.109]) with mapi id 14.03.0319.002; Wed, 28 Mar 2018 14:31:41 -0700 From: "Rustad, Mark D" To: Alexander Duyck CC: "bhelgaas@google.com" , "Duyck, Alexander H" , "linux-pci@vger.kernel.org" , "virtio-dev@lists.oasis-open.org" , "kvm@vger.kernel.org" , "netdev@vger.kernel.org" , "Daly, Dan" , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , "Busch, Keith" , "netanel@amazon.com" , "ddutile@redhat.com" , "mheyne@amazon.de" , "Wang, Liang-min" , "dwmw2@infradead.org" , "hch@lst.de" , "dwmw@amazon.co.uk" Subject: Re: [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices Thread-Topic: [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices Thread-Index: AQHTvI1siq32SjdMxU+NwObgk2U5/6PmtI2A Date: Wed, 28 Mar 2018 21:31:40 +0000 Message-ID: <52734805-4A20-41C0-A46A-A8AFF8D79A72@intel.com> References: <20180315183449.3102.64791.stgit@localhost.localdomain> <20180315184132.3102.90947.stgit@localhost.localdomain> In-Reply-To: <20180315184132.3102.90947.stgit@localhost.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.233.80.200] Content-Type: multipart/signed; boundary="Apple-Mail=_67787A4F-EC56-438D-B41A-B2FB4E4FBB45"; protocol="application/pgp-signature"; micalg=pgp-sha256 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Apple-Mail=_67787A4F-EC56-438D-B41A-B2FB4E4FBB45 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Mar 15, 2018, at 11:42 AM, Alexander Duyck wrote: > From: Alexander Duyck > > Hardware-realized virtio_pci devices can implement SR-IOV, so this > patch enables its use. The device in question is an upcoming Intel > NIC that implements both a virtio_net PF and virtio_net VFs. These > are hardware realizations of what has been up to now been a software > interface. > > The device in question has the following 4-part PCI IDs: > > PF: vendor: 1af4 device: 1041 subvendor: 8086 subdevice: 15fe > VF: vendor: 1af4 device: 1041 subvendor: 8086 subdevice: 05fe > > The patch currently needs no check for device ID, because the callback > will never be made for devices that do not assert the capability or > when run on a platform incapable of SR-IOV. > > One reason for this patch is because the hardware requires the > vendor ID of a VF to be the same as the vendor ID of the PF that > created it. So it seemed logical to simply have a fully-functioning > virtio_net PF create the VFs. This patch makes that possible. > > Reviewed-by: Christoph Hellwig > Signed-off-by: Mark Rustad > Signed-off-by: Alexander Duyck > --- > > v4: Dropped call to pci_disable_sriov in virtio_pci_remove function > v5: Replaced call to pci_sriov_configure_unmanaged with > pci_sriov_configure_simple > v6: Dropped "#ifdef" checks for IOV wrapping sriov_configure definition > v7: No code change, added Reviewed-by > > drivers/virtio/virtio_pci_common.c | 1 + > 1 file changed, 1 insertion(+) Tested with the identified device. Tested-by: Mark Rustad -- Mark Rustad, Networking Division, Intel Corporation --Apple-Mail=_67787A4F-EC56-438D-B41A-B2FB4E4FBB45 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIzBAEBCAAdFiEE6ug8b0Wg+ULmnksNPA7/547j7m4FAlq8CbsACgkQPA7/547j 7m7IXg/+IlfLEdVeKE9r7YPA/yg+kKRNuPXfNTEGfo9fobGLIys3pZpqNrkH6XO8 duZJE/XM481LgYhwwllX+WEUrfCnvwP/Kgaf5J3TA7HVOk8+0jCiuz3YcuPy+D1B gMS5QsG/HyLjJpd8Qs72nS7uuGTgghVSMfwxvhk6kqbVt0MVumCrXffWsvEyKdpK KHChBqKpbMix6Jt66bVg2vJpRWJEVg3dgdO34VdYAn0+N7WMygOLtsyPATqLvgl7 IWq3O2p2j91lyCn4u2QF4lc+Juye94PWHTgggXej670nNuJ+wwjCy0VZMvlZ+zCP BKdBSnOuJU81Bp1Hrc6T5R6PVvoMgwJnqwm+JvsdCLM0dqw8MqubkmUZ4ZjKSnwY qxGFHgMf+iuue2Se7Dcg5nv+z6rVf4xO7GuK8b874sI681tKGW5ETGQ+/Ws2pgIR /n/HMcdWaaOsJ2fj9drCRlKxQIrMNFRgdDqyJeVaMpN5KrkwdMGY48QSgD7wV36E 7ZuKiQKFN58D9BmcECfrHN4WiP33aTmDPITD9leSGBdpw/YGZTm68T/+mxYcEbq1 GJNpQxuQ2eZaXdsBVchh1KQHkxEYhmhSgnrupvzi0uf3KM9CcliOg6IzAACYfkJv +Q9+otsqaRp3ABczrGY26h7Riqrd3G4hSCqur/jNmQydxgMXFPo= =KFIy -----END PGP SIGNATURE----- --Apple-Mail=_67787A4F-EC56-438D-B41A-B2FB4E4FBB45--