On 2024/12/17 16:53, Jan Beulich wrote:
> On 17.12.2024 06:53, Zhang, Julia wrote:
>>
>>
>> On 2024/12/16 17:19, Jan Beulich wrote:
>>> On 16.12.2024 09:18, Zhang, Julia wrote:
>>>> On 2024/12/9 15:47, Jan Beulich wrote:
>>>> On 07.12.2024 11:59, Julia Zhang wrote:
>>>
>>> Yet another formality, sorry: Please send plain text emails. You'll note 
>>> that what
>>> I said and why you said is indistinguishably intermixed below.
>>
>> Thanks for reminding.
>>
>>>
>>>> --- 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.
>>>>
>>>> "Distance" is p2pdma-distance between two PCI devices, it's calculated in 
>>>> kernel driver.I don't get why it's symmetric?
>>>
>>> Distance from A to B is usually the same as that from B to A. But yes,
>>> not necessarily always (thinking of e.g. rings). Yet still I'm unclear
>>> about the distinction between provide and client.
>>
>> Provider - A driver which provides or publishes P2P resources.
>> Client - A driver which makes use of a resource.
>>
>> In our case, we want to use passthrough dGPU render data, and virtio
>> iGPU display data. So dGPU need to import display buffer of iGPU. iGPU
>> is provider and dGPU is client.
> 
> Right, but: Is this arrangement relevant for the new ioctl? Aren't
> you simply after the distance between two devices, of which your
> provider/client model is merely a special case?

The logic of this ioctl about provider/client is totally followed 
pci_p2pdma_distance() of kernel. So I think our case is not a special case.

Julia
> 
> Jan

Reply via email to