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....@citrix.com> > >> --- > >> 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.coop...@citrix.com> > > > > 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.