On 09/02/18 09:12 AM, Christian König wrote:
No, there is simply no need to initialize the system domain. What are the values of p->mapping and adev->mman.bdev.dev_mapping when they don't match? Maybe we are allocating memory before initializing adev->mman.bdev.dev_mapping.

In my test setup I'm running test 3 from libdrm (suite 1) with a pause before the unmap/free call. So the IB should still be mapped. Indeed the VM PTE decoding has the V bit set.

Or do you have more than one GPU in the system? E.g. APU+dGPU? Could it be that you read through the wrong device?

I found the issue:

        while (size) {
                phys_addr_t addr = *pos & PAGE_MASK;
                loff_t off = *pos & ~PAGE_MASK;
                size_t bytes = PAGE_SIZE - off;

"bytes" should be limited by the 'size' parameter passed in. What is happening instead is it's reading the entire PTB until it hits a V=0 page and then returns an error and in the process is doing "fun things" to the user mode application (by copying more data than I asked for).

dri-devel mailing list

Reply via email to