[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:58:34 +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=lIfqmHs8J9VyvC7I3FI/uxTkwzd/25bxlSUPz06dm54=; b=ZpcXdXzcgqbNYDHjeI1utxhYpTwXUwYFK1BgxTMU3HMV4KI02nmREcmBi7vX3oPbD3gFRXZyktB+zz4TdB7ZWEi/cmSP8ABTf7J/YQhszk6PyNsGyGQJJpIrS3zkSttktXTQ9un0eGW0azAJyiagWGIxpbkTWd+xwK+1LYlOjBnEeqiLjS2pRlZP0EAzdlDNg3E2y2fnhCup5y5VLxxS8A7KjR2NKBuzOEwVSckB8rPpwi6ckUldGnFn3OEljv8CVFjBupk6ZiabFHefiDutDoy2HkgHQ1L8mCqTUHeIMklBZJkrpmQK8bBNSHHJLxzapCDPsJ5Z7VzcseUDBwDNvw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lG8Q2Dl2OFbWPq4HQ30j/+tWL9PXVxYbSJcRF4of7j3F3GhSEmJTzF0hj5qNLBx1V+wf4GFgZcGr3mpFHkSlU0ycDLxYzzt5fwmtjrHWV6zJ6IijnAL2XEm1nLzOamcdRnDl/0e4tKrNuw2d3ut7Kij37uyvvnKmAOuZQAQvklZadaeL9rhb6bCUdcrW3pI/09ByAarylk01mB6pNdXwOTZn7saUvQhAiWNu45GOOWFn60ySuqvQ4fneb84Ug4R+bgU8mL1JwA9v+sXZb3sR+R96coDxbfSUWvsu1YWM0NTn+P67yvc/qm5Qhfs8PZp4nw4pe3SEgrxXSAJE7HyqUw==
- 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:59:15 +0000
- Ironport-data: A9a23:/Ml78qxuRpKJCsny1bF6t+cbxyrEfRIJ4+MujC+fZmUNrF6WrkUAn WUeC22Daa6LZmX2KN5xPYi1oxxS6p7WzINqTVY++yAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+UIHUMja4mtC5QRjPKAT5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KWVN8 tkDchMJVEvAuryHkauFDdFHvf12eaEHPKtH0p1h5RfwKK56BLzmHeDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvDOVkFUZPLvFabI5fvSjQ8lPk1nej WXB52njWTkRNcCFyCrD+XWp7gPKtXqiAdNNS+LlrJaGhnW6+1EwBxAVamKjoP2yt2fnZeN9O 24Lr39GQa8asRbDosPGdw21pjuIswARX/JUEvYm80edx6zM+QGbC2MYCDlbZ7QOtsU7WDgr3 V+hhM7yCHpkt7j9YWqU67O8vT60fy8PIgc/iTQsSAIE55zvpd81hxeXEtJ7Svbp15vyBC36x C2MoG4mnbIPgMUX1qK9u1fanzaroZuPRQkwjunKYl+YAspCTNbNT+SVBZLzt56s8K7xooG9g UU5
- Ironport-hdrordr: A9a23:Rgyt0q9aL2DOk0kDqANuk+DnI+orL9Y04lQ7vn2ZhyYlC/Bw9v re5MjzsCWftN9/YgBEpTntAtjjfZqYz+8X3WBzB9aftWvdyQ+VxehZhOOI/9SjIU3DH4VmpM BdmsZFebvN5JtB4foSIjPULz/t+ra6GWmT69vj8w==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18/05/2023 1:42 pm, Andrew Cooper wrote:
> 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>
>
Sorry, I should go on to say. Xen has had code for segments for years
and years and years, but I've seen plenty of evidence of Xen not having
any kind of regular testing in multi-segment systems.
Sapphire Rapids is the first platform I'm aware of which is
multi-segment in its base configuration and is going to see routine
testing with Xen.
I don't expect this to be the final bugfix before multi-segment works
properly...
~Andrew
|