drm: fallback to dma_alloc_coherent when memory encryption is active
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/drm_memory.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/drm_memory.c +7 -0
@@ -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); }
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Christian König
We can't just map any randome page we get when memory encryption is active.
Signed-off-by Christian König <[email protected]>
Acked-by Alex Deucher <[email protected]>
Quoted 25 lines
--- drivers/gpu/drm/drm_memory.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/drm_memory.c +7
-1@@ -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); } --2.17.1
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel