On 07.12.2024 11:59, Julia Zhang wrote: > To implement dGPU prime feature, virtgpu driver need to get > p2pdma_distance of two GPU from host side. > > This adds a new privcmd ioctl to get the real p2pdma_distance of two pci > devices in the host with pci notations sent from guest side. > > Signed-off-by: Julia Zhang <julia.zh...@amd.com>
First - correcting Anthony's email address. He's no longer at Citrix/Cloud. Second, please send patches To: the list, with maintainers on Cc:. (Stefano, as this isn't the first such issue, can you please try to spread the knowledge of this across people starting to contribute?) Personally I'd question the length of the Cc: list of this submission, though. Plus - along with Roger I was on the To: list here despite not even being maintainer of any of the files touched. > --- a/tools/include/xen-sys/Linux/privcmd.h > +++ b/tools/include/xen-sys/Linux/privcmd.h > @@ -110,6 +110,16 @@ typedef struct privcmd_map_hva_to_gpfns { > int add_mapping; > } privcmd_map_hva_to_gpfns_t; > > +typedef struct privcmd_p2pdma_distance { > + __u32 provider_bus; > + __u32 provider_slot; > + __u32 provider_func; > + __u32 client_bus; > + __u32 client_slot; > + __u32 client_func; > + __u32 distance; > +} privcmd_p2pdma_distance_t; "Distance" typically is a symmetric thing. Why the asymmetry here? And why __u32 when __u8 will be fine for most fields? And where's the segment part of the device coordinates? Finally, with it being merely stub implementations that you add here, all details on where the needed info is to come from are missing. Jan