Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: fallback to dma_alloc_coherent when memory encryption is active

We can't just map any randome page we get when memory encryption is
active.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.kernel.org/patch/10850833/

+7
+7
drivers/gpu/drm/drm_memory.c
··· 168 168 if (xen_pv_domain()) 169 169 return true; 170 170 171 + /* 172 + * Enforce dma_alloc_coherent when memory encryption is active as well 173 + * for the same reasons as for Xen paravirtual hosts. 174 + */ 175 + if (mem_encrypt_active()) 176 + return true; 177 + 171 178 for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling) { 172 179 max_iomem = max(max_iomem, tmp->end); 173 180 }