Re: Where do ttm->pages come from?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 18, 2025 at 09:37:42AM +0100, Christian König wrote:
> Hi Matthew,
> 
> you actually got your understanding exactly inverted :)

Thanks; that's very helpful!

> Amdgpu takes a look at page->mapping to make sure they are *not* coming from the call sequence starting with amdgpu_ttm_tt_set_user_pages() or be imported from another driver through DMA-buf etc...
> 
> The only pages which are allowed to pass this check are the private driver allocated ones, see this code function amdgpu_ttm_tt_populate():
> 
>         for (i = 0; i < ttm->num_pages; ++i)
>                 ttm->pages[i]->mapping = bdev->dev_mapping;
> 
> So far that has been save since nobody else should be using the address space object from our drivers inode under /dev.
> 
> But when you plan to remove page->mapping we probably have a problem here.

OK.  This makes the problem a lot more tractable.


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux