Skip to contentSkip to conversation

Not fully traversing iova reservations bug

DISCUSSION Yee Li 1 participant 1 message Jan 10, 2025

lore
Share & tools
lore

Yee Li

author
#0 lore raw

Dear All,

Is there any other method to fix not fully traversing iova reservations bug.

A case:

For multiple devices in the same iommu group, sorted later device (based on Bus:Dev.Func) have the RMRR.

Sorted earlier device (without RMRR) initialized the iova domain causing the sorted later device goto done_unlock  in iommu_dma_init_domain.

    if (iovad->start_pfn) {
        if (1UL << order != iovad->granule || base_pfn != iovad->start_pfn) { pr_warn("Incompatible range for DMA domain\n"); ret = -EFAULT;
            goto done_unlock;
        }

        ret = 0;
        goto done_unlock;
    }

Actually RMRR ignored.

The solution patch link(no response so far):

https://lore.kernel.org/lkml/[email protected]/T/