On 25.02.2025 12:08, Jan Beulich wrote: > On 25.02.2025 12:05, Mykyta Poturai wrote: >> On 10.02.25 12:46, Jan Beulich wrote: >>> On 10.02.2025 11:30, Mykyta Poturai wrote: >>>> --- a/xen/include/xen/iommu.h >>>> +++ b/xen/include/xen/iommu.h >>>> @@ -238,6 +238,14 @@ int iommu_do_dt_domctl(struct xen_domctl *domctl, >>>> struct domain *d, >>>> */ >>>> int iommu_remove_dt_device(struct dt_device_node *np); >>>> >>>> +/* >>>> + * Status code indicating that DT device cannot be added to the IOMMU >>>> + * or removed from it because the IOMMU is disabled or the device is not >>>> + * connected to it. >>>> + */ >>>> + >>>> +#define DT_NO_IOMMU 1 >>> >>> While an improvement, it still isn't clear whose "status code" this is. >>> The #define is effectively hanging in the air, from all I can tell. And >>> from it not being a normal error code it is pretty clear that it better >>> would have only very narrow use. >>> >>> Also can you please omit an interspersing blank line when the comment >>> is specifically tied to a definition or declaration? >> >> What would you say about removing this status code entirely and >> returning something like -ENODEV instead, with adding special handling >> for this return to the callers where needed? > > I'd be okay with that; Arm folks also need to be, though.
Oh, and: Of course it then needs to be pretty clear / obvious that -ENODEV cannot come into play for other reasons / from other origins. Jan