Hi Nirmoy, > > In Mesa we've been relying on I915_CONTEXT_PARAM_GTT_SIZE so as long as > > that is adjusted by the kernel > > What do you mean by adjusted by, should it be a aligned size? > > I915_CONTEXT_PARAM_GTT_SIZE ioctl is returning vm->total which is > adjusted(reduced by a page). > > This patch might cause silent error as it is not removing WABB which is > using the reserved page to add dummy blt and if userspace is using that > > page then it will be overwritten. yes, I think this could happen, but there is no solution, unfortunately. We need to fail at some point. On the other hand, I think mesa is miscalculating the vm size. In userspace the total size is derived by the bit size (maxNBitValue()). By doing so, I guess there will always be cases of miscalculation. There are two solutions here: 1. we track two sizes, one the true available size and one the total size. But this looks like a dirty hack to me. 2. UMD fixes the size calculation by taking for granted what the driver provides and we don't have anything to do in KMD. Lionel, Michal, thoughts? Andi