[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pci: fix pci_get_pdev() to always account for the segment
- To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 18 May 2023 13:42:10 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NG7LS6mzYnWLVhuTmdFXZLfM9ZebIaFX7/n2J7WJhwY=; b=KxBpz6WxSy1XhBzhMi6cGkLsJjd1jBdo0GkqJ63Ex2g+eB3lxfRqrNOY3FCcyC9ThDAzf28ThPZ59x7OkskSgq4RouZVoNf+hU9yNJl0k1Z9fzfeeVkgsHdc67cQ4RDbJRS49hi4Wte5aE7483bLm6qgJ4n+sIOMfG1dyU7pHxw7kw+8mfcWTCPZ+XYsIiWR1UrJu3WLC9gvIH+fAaVt1m5+VRbOVq2dL82Z8fR1LbkkF0OaV9cae84IdI4q2C+3HsjicWzk1eVyrZHbN4wVm4LFirbpVCQxAzPQEv0HLxItWINZSg7yXcLE/Qr3QjrhPuJr0gGzMjpjQfgbm42nkQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mu81g+6EshPnCwxEtZO/upLxf9bg7v43QiLBVPIcpE6/EAlkmndMSq9rud8MITlqE2Kbh0QtPseZl6sK5tJ2W5HTTv5V3miJqKEqrNu37XtheMyCtzfblkALNLvxIdmZuAeCr48EEbRtuauW1PgzrZ9Rr/GqnOGBlm8H0OJPJhql2Gr9JzcOfspfTc59/m1jaw2DM9GatCVzDwiTF7M1081/x0KFP9ZMxkWkFe9gHyWT0+baEq5ZuyWddHcYUCUlVG751NUlUQ7KjvAJxUatKw/rSRqu1+cRUhigVDpvY9iNblBODn8N5So5skc0BDdlogMaM1o+zKkyRZaWL3mwVA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>
- Delivery-date: Thu, 18 May 2023 12:42:40 +0000
- Ironport-data: A9a23:fi3yFaOnTlnYT3vvrR2LlsFynXyQoLVcMsEvi/4bfWQNrUoq0TMAz jceX2yHOa2OMzH2ed5/O4nl8UsDvZXcyNVqSgto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6jufQAOKnUoYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGj9SuvPrRC9H5qyo42tF5wxmP5ingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0uFeDFEU3 PAZEh4ycVO6tbKR2K2LFsA506zPLOGzVG8ekldJ6GiDSNoDH9XESaiM4sJE1jAtgMwIBezZe 8cSdTtoalLHfgFLPVAUTpk5mY9EhFGmK2Ee9A3T+PtxujeOpOBy+OGF3N79U9qGX8hK2G2fo XrL5T/RCRAGLt2PjzGC9xpAg8eWxXKgCdNKS+TQGvhCvl+P+X5INRcsVGSQkOmYu26OXNN+E hlBksYphe1onKCxdfHtUhv9rHOasxo0X9tLD/Z8+AyL0rDT4QuSGi4DVDEpQN4sudIyRDcq/ kSUhN6vDjtq2JWNQG+Z3qeZq3W1Iyd9EIMZTSoNTA9A79y9pog210jLVow6T/PzicDpEzbtx TzMtDI5m7gYkc8M0eO84EzDhDWv4JPOS2bZ+znqY45s1SshDKbNWmBiwQOAhRqcBO51lmW8g UU=
- Ironport-hdrordr: A9a23:B1Hm/qp+hmXODzB6rtHCV7EaV5s2LNV00zEX/kB9WHVpm5Oj+v xGzc5w6farsl0ssREb9uxo9pPwJ080hqQFhbX5Wo3SITUO2VHYVr2KiLGP/9SOIVycygcw79 YZT0E6MqyKMbEYt7eF3ODbKbYdKbC8mcjH5Ns2jU0dND2CA5sQkDuRYTzrd3GeKjM2YqbRWK DshPau8FGbCAgqh4mAdzE4t6+pnay4qLvWJTo9QzI34giHij2lrJb8Dhijxx8bFx9f3Ls49m DBsgrhooGuqeuyxBPw33Laq80+oqqs9vJzQOi3zuQFIDTljQilIKxnRr25pTgw5M2/9Vowl9 HIghE4e+B+8WnYcG2ZqQbknyPgzDEtwXn/zkLwuwqvneXJABYBT+ZRj4NQdRXUr2ImodFHya pOm0aUrYBeAx/slDn0o4GgbWAhqmOE5V4Z1cIDhX1WVoUTLJdXsIwk5UtQVLMNBjjz5owLGP RnSOvc+PFVW1WHaG2xhBgl/PWcGlAIWjuWSEkLvcKYlxBQgXBC1kMdgPcSm38RnahNPKVs1q DhCOBFhbtORsgZYeZWH+EaW/a6DWTLXFblLH+SCU6PLtBGB1v977rMpJkl7uCjf5IFiLEono 7abV9evWkuP2rzFMy12oFR+BylehT9Yd3U8LAd23FFgMy4eFKyWhfzDGzG0vHQ7cn3O/erGM paY/ltcrjexWiHI/c84+SxYegVFZAkarxnhj8KYSP+niv1EPybigX6SoekGFO/K0dsZkrPRl 0+YRPUGOJsqmiWZ16QummlZ5qqQD2xwa5N
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18/05/2023 11:57 am, Roger Pau Monne wrote:
> When a domain parameter is provided to pci_get_pdev() the search
> function would match against the bdf, without taking the segment into
> account.
>
> Fix this and also account for the passed segment.
>
> Fixes: 8cf6e0738906 ('PCI: simplify (and thus correct)
> pci_get_pdev{,_by_domain}()')
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
> There's no mention in 8cf6e0738906 that avoiding the segment check is
> fine, and hence I assume it's an oversight, as it should be possible
> to have devices from multiple segments assigned to the same domain.
Oh, absolutely - skipping the segment check is very much not fine.
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
|