> Also, the tests fail consistently and are not sporadic.

>From these logs I see the below fragment, noting this:

 gem_exec_gttfil-1010    [004] .N...    50.126420: map: IOMMU: 
iova=0x00003fffffc00000 - 0x0000400000000000 paddr=0x00000001b9400000 
size=4194304
                                                                    
^^^^^^^^^^^^^^^^^^^
Which is the high IOVA.. It has bit 45 set. I fed this mapping into
the kunit and it does map successfully.

It is not high enough to get into anything special about sign extend,
the driver sets:

        if (cap_fl5lp_support(iommu->cap))
                cfg.common.hw_max_vasz_lg2 = 57;
        else
                cfg.common.hw_max_vasz_lg2 = 48;

Maybe this code is wrong? Baolu what did you get for this log:

 [   50.126166] i915 0000:00:02.0: Using 46-bit DMA addresses

In your force second stage test? Is it 46? Second stage uses different
code to compute vasz_lg2 and is sensitive to magw:

        if (mgaw >= 48 && (sagaw & BIT(3)))
                return min(57, mgaw);
        else if (mgaw >= 39 && (sagaw & BIT(2)))
                return min(48, mgaw);
        else if (mgaw >= 30 && (sagaw & BIT(1)))
                return min(39, mgaw);

Maybe this is the issue?

I don't know how the GPU works, is that the command buffer that is
getting 'request 6000'

[   50.128337] i915 0000:00:02.0: [drm] *ERROR* GT0: GUC: CT: Failed to process 
request 6000 (-EOPNOTSUPP)

?

Chaitanya, can you collect these two log files from the commit that
works please? Lets see if it uses the same IOVA and same 46 bit limit?

Thanks,
Jason

                                    [   49.064561] [IGT] gem_exec_gttfill: 
starting subtest basic
[..]
          <idle>-0       [010] ..s1.    50.124236: map: IOMMU: 
iova=0x00000000ffefa000 - 0x00000000ffefb000 paddr=0x0000000100271000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.124414: map: IOMMU: 
iova=0x00000000433fc000 - 0x00000000433fd000 paddr=0x0000000128532000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.124598: map: IOMMU: 
iova=0x000000002ebfc000 - 0x000000002ebfd000 paddr=0x0000000128533000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.124782: map: IOMMU: 
iova=0x00000000443f9000 - 0x00000000443fa000 paddr=0x0000000128534000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.124966: map: IOMMU: 
iova=0x000000002dbf9000 - 0x000000002dbfa000 paddr=0x0000000128535000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.125149: map: IOMMU: 
iova=0x000000002cbfd000 - 0x000000002cbfe000 paddr=0x0000000128536000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.125347: map: IOMMU: 
iova=0x00000000413fd000 - 0x00000000413fe000 paddr=0x0000000128537000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.125538: map: IOMMU: 
iova=0x000000001fbfe000 - 0x000000001fbff000 paddr=0x0000000128538000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.125580: i915_request_retire.part.0: 
0000:00:02.0 rcs0: fence 18:1034, current 1036 
 gem_exec_gttfil-1010    [004] .....    50.125590: __i915_request_commit: 
0000:00:02.0 rcs0: fence 18:1038, current 1036 
 gem_exec_gttfil-1010    [004] D..1.    50.125592: __i915_request_submit: 
0000:00:02.0 rcs0: fence 18:1038, current 1036 
   kworker/u64:1-138     [002] .....    50.125600: unmap: IOMMU: 
iova=0x000000001fbfe000 - 0x000000001fbff000 size=4096 unmapped_size=4096
   kworker/u64:1-138     [002] .....    50.125627: unmap: IOMMU: 
iova=0x00000000413fd000 - 0x00000000413fe000 size=4096 unmapped_size=4096
   kworker/u64:1-138     [002] .....    50.125643: unmap: IOMMU: 
iova=0x000000002cbfd000 - 0x000000002cbfe000 size=4096 unmapped_size=4096
   kworker/u64:1-138     [002] .....    50.125659: unmap: IOMMU: 
iova=0x000000002dbf9000 - 0x000000002dbfa000 size=4096 unmapped_size=4096
   kworker/u64:1-138     [002] .....    50.125675: unmap: IOMMU: 
iova=0x00000000443f9000 - 0x00000000443fa000 size=4096 unmapped_size=4096
                                    [   50.126166] i915 0000:00:02.0: Using 
46-bit DMA addresses
 gem_exec_gttfil-1010    [004] .N...    50.126420: map: IOMMU: 
iova=0x00003fffffc00000 - 0x0000400000000000 paddr=0x00000001b9400000 
size=4194304
 gem_exec_gttfil-1010    [004] .....    50.126701: map: IOMMU: 
iova=0x000000001fbfd000 - 0x000000001fbfe000 paddr=0x0000000128539000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.126892: map: IOMMU: 
iova=0x000000001fbfc000 - 0x000000001fbfd000 paddr=0x000000012853a000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.127083: map: IOMMU: 
iova=0x000000002d3fb000 - 0x000000002d3fc000 paddr=0x000000012853b000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.127271: map: IOMMU: 
iova=0x0000000041bfc000 - 0x0000000041bfd000 paddr=0x000000012853c000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.127467: map: IOMMU: 
iova=0x000000001dbfc000 - 0x000000001dbfd000 paddr=0x000000012853d000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.127653: map: IOMMU: 
iova=0x000000001f3fa000 - 0x000000001f3fb000 paddr=0x000000012853e000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.127838: map: IOMMU: 
iova=0x000000001f3f9000 - 0x000000001f3fa000 paddr=0x000000012853f000 size=4096
 gem_exec_gttfil-1010    [004] .....    50.127877: i915_request_retire.part.0: 
0000:00:02.0 rcs0: fence 18:1036, current 1038 
 gem_exec_gttfil-1010    [004] .....    50.127887: __i915_request_commit: 
0000:00:02.0 rcs0: fence 18:1040, current 1038 
 gem_exec_gttfil-1010    [004] D..1.    50.127890: __i915_request_submit: 
0000:00:02.0 rcs0: fence 18:1040, current 1038 
   kworker/u64:1-138     [002] .....    50.127966: unmap: IOMMU: 
iova=0x000000001f3f9000 - 0x000000001f3fa000 size=4096 unmapped_size=4096
   kworker/u64:1-138     [002] .....    50.127990: unmap: IOMMU: 
iova=0x000000001f3fa000 - 0x000000001f3fb000 size=4096 unmapped_size=4096
   kworker/u64:1-138     [002] .....    50.128006: unmap: IOMMU: 
iova=0x000000001dbfc000 - 0x000000001dbfd000 size=4096 unmapped_size=4096
   kworker/u64:1-138     [002] .....    50.128024: unmap: IOMMU: 
iova=0x0000000041bfc000 - 0x0000000041bfd000 size=4096 unmapped_size=4096
   kworker/u64:1-138     [002] .....    50.128042: unmap: IOMMU: 
iova=0x000000002d3fb000 - 0x000000002d3fc000 size=4096 unmapped_size=4096
                                    [   50.128337] i915 0000:00:02.0: [drm] 
*ERROR* GT0: GUC: CT: Failed to process request 6000 (-EOPNOTSUPP)
 gem_exec_gttfil-1010    [004] .....    50.128561: map: IOMMU: 
iova=0x00003fffff800000 - 0x00003fffffc00000 paddr=0x00000001b9800000 
size=4194304

Reply via email to