Change -ENOPNOTSUPP error code to -ENXIO when iommu is disabled during iommu_do_domctl call. As was discussed in [1]
[0]: https://lore.kernel.org/xen-devel/alpine.DEB.2.22.394.2506171701190.1780597@ubuntu-linux-20-04-desktop/ Signed-off-by: Oleksii Moisieiev <oleksii_moisie...@epam.com> --- Changes in v5: - set error code to -ENXIO when iommu is disabled xen/drivers/passthrough/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index 16aad86973..075bbd1718 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -632,7 +632,7 @@ int iommu_do_domctl( int ret = -ENODEV; if ( !(d ? is_iommu_enabled(d) : iommu_enabled) ) - return -EOPNOTSUPP; + return -ENXIO; #ifdef CONFIG_HAS_PCI ret = iommu_do_pci_domctl(domctl, d, u_domctl); -- 2.34.1