[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>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 19 May 2023 11:03:11 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=6CO/tG9xjduflqkPIA/YpkDUJU43YBT8Ah8eOFkSyE0=; b=Z01Tptgqghby6b0Y5bfNTrSIiZzKEp+JnnN5WPwu/YnAfF5x1MWbwHJ1eIoJYbel9E/kylRJMP3tX8tJ2tiNfjAqkhpExR2vNWJ2YfNC2xbxtYMxWMhZ9wDfo/t+Kz68hW8Gr6mduRxwKlqG8BdvlLVFQY94wQGWnSg8EYc+k0Llkq8Iyy7ntEq+r7Xc5lapoT3ek3EFTpSGKTtVW6lgc1Dv5IdkkWfCmL8hNV8/340RX0dfL47pUES0tvhO/h6JoAW5rfAdF7T1jDK4+hfooPrtpDXnkb32a62UkodqxI7z1n54lx5J3ko2X7Ba3ynw4pcpb6Q52jl1psjTOJp6rA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OI66tjwjUHfH/lR+tUDi+bKyscnhhxpy6Cnr0NkEi6ZNcrfDPDloZoHadVmnEueMoea9hPTvoWY9omRGotXWIUe/yvTDh1wWgc2WriiE5Jg+4g1HZX5IECp/vJwhBXFyYlDkdHckhcTDfFcAUgKt8yCUUn+hEQpdJFtXFwcfyY4SWH26auyvpoupEP4OToxJyerLpmVaTevmfa0vr947+vsHpRMeNanemAm3k64kOCG41djBQGwqHwdUeLllXB1+rZTtKaYQzwQ8UmeADGJx2shADF0P/2UlObIx+D5pcLORza2xGovpnf3lDvE3B7+3F9BNdclUfWf0ciZmCTHzwA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 19 May 2023 09:03:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.05.2023 12:57, 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>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

> ---
> 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.

I guess this was a lack of editing after copy-and-paste from the
loops iterating over pseg->alldevs_list. Thanks much for spotting!

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.