On 18.10.2025 06:46, Frediano Ziglio wrote:
> On Fri, Oct 17, 2025 at 3:26 PM Roger Pau Monne <[email protected]> wrote:
>>
>> Otherwise it's not possible for device models to map IRQs of devices on
>> segments different than 0.  Keep the same function prototype and pass the
>> segment in the high 16bits of the bus parameter, like it's done for the
>> hypercall itself.
>>
>> Fixes: 7620c0cf9a4d ("PCI multi-seg: add new physdevop-s")
>> Signed-off-by: Roger Pau Monné <[email protected]>
>> ---
>> I think it's 4.21 material, as otherwise it's not possible to passthrough
>> PCI devices on segments != 0.
>> ---
>>  tools/libs/ctrl/xc_physdev.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/libs/ctrl/xc_physdev.c b/tools/libs/ctrl/xc_physdev.c
>> index 25e686d7b389..1307d6836d72 100644
>> --- a/tools/libs/ctrl/xc_physdev.c
>> +++ b/tools/libs/ctrl/xc_physdev.c
>> @@ -79,7 +79,7 @@ int xc_physdev_map_pirq_msi(xc_interface *xch,
>>      }
>>      memset(&map, 0, sizeof(struct physdev_map_pirq));
>>      map.domid = domid;
>> -    map.type = MAP_PIRQ_TYPE_MSI;
>> +    map.type = MAP_PIRQ_TYPE_MSI_SEG;
>>      map.index = index;
>>      map.pirq = *pirq;
>>      map.bus = bus;
> 
> Reviewed-by: Frediano Ziglio <[email protected]>
> 
> This was tested on a real machine.
> 
> About MAP_PIRQ_TYPE_MSI and MAP_PIRQ_TYPE_MSI_SEG, do we need to keep
> ABI compatibility or we should just remove MAP_PIRQ_TYPE_MSI_SEG and
> make MAP_PIRQ_TYPE_MSI consider the segment ?

Assuming you talk about the hypervisor interface, could you explain how
you see breaking ABI compatibility to not break anything? These aren't
tools-only interfaces, after all.

Jan

Reply via email to