drm/xe/ppgtt: clear the scratch page
We need to ensure we don't leak the contents to userspace. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
f3edf6917c
commit
e63f81adcc
@ -333,14 +333,16 @@ int xe_pt_create_scratch(struct xe_device *xe, struct xe_gt *gt,
|
||||
u8 id = gt->info.id;
|
||||
int i;
|
||||
|
||||
vm->scratch_bo[id] = xe_bo_create(xe, gt, vm, SZ_4K,
|
||||
ttm_bo_type_kernel,
|
||||
XE_BO_CREATE_VRAM_IF_DGFX(gt) |
|
||||
XE_BO_CREATE_IGNORE_MIN_PAGE_SIZE_BIT |
|
||||
XE_BO_CREATE_PINNED_BIT);
|
||||
vm->scratch_bo[id] = xe_bo_create_pin_map(xe, gt, vm, SZ_4K,
|
||||
ttm_bo_type_kernel,
|
||||
XE_BO_CREATE_VRAM_IF_DGFX(gt) |
|
||||
XE_BO_CREATE_IGNORE_MIN_PAGE_SIZE_BIT |
|
||||
XE_BO_CREATE_PINNED_BIT);
|
||||
if (IS_ERR(vm->scratch_bo[id]))
|
||||
return PTR_ERR(vm->scratch_bo[id]);
|
||||
xe_bo_pin(vm->scratch_bo[id]);
|
||||
|
||||
xe_map_memset(vm->xe, &vm->scratch_bo[id]->vmap, 0, 0,
|
||||
vm->scratch_bo[id]->size);
|
||||
|
||||
for (i = 0; i < vm->pt_root[id]->level; i++) {
|
||||
vm->scratch_pt[id][i] = xe_pt_create(vm, gt, i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user