[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: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 18 May 2023 15:06:33 +0200
  • 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=wgdW8kW3aDopHJzmnsXTv9irrnJKp01lgss7qj6uemY=; b=Fi8+i1H9PJQ8RdmtWwcWhVieXjoFi3qn8xQiyayilTYcCxRj94mGEAWTwwPv7v/yUws6U2fyBbO0NvW933JiIXqrcpG0U1KdcnKw5Zstc+qfbfb4Kz4qmh28I/dDPivm8dgleqJHpLpIi4ixapDzazXV+XBIKhQj4LHetv2xQ0geQ8eLhjfEh5gOrTMNwO95+hD9klirVHjI6RBs1z4vxNCBwpPmQAEe/GI8C2YEsT/jjqqiIFbvQvBt5lezx22EprUNoCI/SB0h/Q7VGmfUgRQHIUqfD9YkzuLa+NCdMYYHuN3MRanS/YEGQZf/y+p1XbkCL5z6qp0eF1U41WkCYw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QaQ8EZXgu0wI0JpHP8BkENkAPEBw6Sk71ri6HsZmkSCx1aRIXeRVNU5LLKhjzK1Y2VMQY4+WV/TMqRNbHN0N0RWXXukDPse3PtSj4dlQQZn+JgruuumDQ85ol8KAkdIv6yiqLBMsag2fCXFtAye9hxFNoCr3RG/FjOHkZk6q0Sk4lTOBL5RUJlfRnJ9ZhAeFBi+678d3BC0wMPesqayUzdwjGPL2IjvGhYa0RMvwRRP4oL5BuQXFpX1n/1OMGyklfO0Tz2gRpPpo2woF6IR7ZqFh1zCmDeVc5KIF5trvXyiZ3nuBXK3wOtjviitGpgtePoXNH1+xMTTZcaEN4UYuRg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Thu, 18 May 2023 13:07:23 +0000
  • Ironport-data: A9a23:J7h2Oq45fCvQksuLSoHOHgxRtBvGchMFZxGqfqrLsTDasY5as4F+v modXGqHbPrYZDb8KI9waoWxpkoFvsPcndNgGgtorS1nHi5G8cbLO4+Ufxz6V8+wwm8vb2o8t plDNYOQRCwQZiWBzvt4GuG59RGQ7YnRGvynTraCYnsrLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+7ZwehBtC5gZlPa0S7AeE/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5mx aE7FyANdxq6ufOx+5CFcut0lvgoBZy+VG8fkikIITDxK98DGMmGaYOaoNhS0XE3m9xEGuvYa 4wBcz1zYR/cYhpJfFAKFJY5m+TujX76G9FagAvN+exrvC6OnEoojumF3Nn9I7RmQe1PmUmVv CTe9nnRCRAGLt2PjzGC9xpAg8eWxXKmAt1NTOTQGvhCiUOR/0YsDAIvRRiEnumguF6VZ85iA hlBksYphe1onKCxdfHtUhv9rHOasxo0X9tLD/Z8+AyL0rDT4QuSGi4DVDEpQN4sudIyRDcq/ kSUhN6vDjtq2JWNQG+Z3qeZq3W1Iyd9EIMZTSoNTA9A6d+zpog210vLVow6Tv/zicDpEzbtx TzMtDI5m7gYkc8M0eO84EzDhDWv4JPOS2bZ+znqY45s1SshDKbNWmBiwQeLhRqcBO51lmW8g UU=
  • Ironport-hdrordr: A9a23:PygEg61FoMqQhzPJ/U+faQqjBJQkLtp133Aq2lEZdPU1SKClfq WV98jzuiWatN98Yh8dcKm7Sc29qBHnlaKdkLNxAV7KZmCP0gaVxepZnOjfKlPbalbD398Y+a B8c7VvTP3cZGIK9/oT7WODYrQdKNXsytHPuQ/VpU0dKj2DZMtbnmJE49+gYzRLrd99dOIEKK Y=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, May 18, 2023 at 01:58:34PM +0100, Andrew Cooper wrote:
> 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...

I just found this by code inspection while looking at something else,
it wasn't related to any testing on multi segments systems.  IOW:
don't take this fix as me having done any kind of testing on multi
segment systems.

Thanks, Roger.



 


Rackspace

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