On 15.12.2025 13:36, Jan Beulich wrote:
> On 12.12.2025 05:02, Penny Zheng wrote:
>> --- a/xen/include/xen/iommu.h
>> +++ b/xen/include/xen/iommu.h
>> @@ -333,9 +333,11 @@ struct iommu_ops {
>> uint32_t flag);
>> int (*reassign_device)(struct domain *s, struct domain *t,
>> uint8_t devfn, device_t *dev);
>> +#ifdef CONFIG_MGMT_HYPERCALLS
>> #ifdef CONFIG_HAS_PCI
>> int (*get_device_group_id)(uint16_t seg, uint8_t bus, uint8_t devfn);
>> #endif /* HAS_PCI */
>> +#endif /* MGMT_HYPERCALLS */
>
> I remain concerned of the former two hooks staying around for x86, despite
> them now being NULL when !MGMT_HYPERCALLS. Imo, to play safe, they will
> want to be guarded (transiently) with
>
> #if defined(CONFIG_MGMT_HYPERCALLS) ||
> defined(CONFIG_HAS_DEVICE_TREE_DISCOVERY)
Looking at the next patch - not just transiently. The .assign_device hook
stays present there (for presumably a good reason), yet for x86 it shouldn't
exist anymore when !MGMT_HYPERCALLS.
Jan