On 05-05-23, 16:11, Oleksandr Tyshchenko wrote:
I was going to propose an idea, but I have just realized that you already voiced it here [1] )) So what you proposed there sounds reasonable to me.
I will just rephrase it according to my understanding:
We probably need to consider transforming your "forced_grant" to something three-state, for example "grant_usage" (or "use_grant" as you suggested) which could be "default behaviour" or "always disabled", or "always enabled".
With "grant_usage=default" we will get exact what we have at the moment (only create iommu nodes if backend-domid != 0) With "grant_usage=disabled" we will force grants to be always disabled (don't create iommu nodes irrespective of the domain) With "grant_usage=enabled" we will force grants to be always enabled (always create iommu nodes irrespective of the domain)
I was wondering if "grant_usage=default" can be interpreted by the absence of the grant_usage parameter. So just grant_usage=1 or 0, which would mean enabled or disabled and if grant_usage isn't passed, we would switch back to default.