提交 64e1f830 编写于 作者: C Christian König

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: NChristian König <christian.koenig@amd.com>
Acked-by: NAlex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.kernel.org/patch/10850833/
上级 088aed8b
......@@ -168,6 +168,13 @@ bool drm_need_swiotlb(int dma_bits)
if (xen_pv_domain())
return true;
/*
* Enforce dma_alloc_coherent when memory encryption is active as well
* for the same reasons as for Xen paravirtual hosts.
*/
if (mem_encrypt_active())
return true;
for (tmp = iomem_resource.child; tmp; tmp = tmp->sibling) {
max_iomem = max(max_iomem, tmp->end);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册