Thread (16 messages) flat view 16 messages, 2 authors, 2018-08-25
STALE2901d

Revision rfc of 6 in this series.

Revisions (6)
  1. rfc current
  2. rfc [diff vs current]
  3. v1 [diff vs current]
  4. v2 [diff vs current]
  5. v3 [diff vs current]
  6. v4 [diff vs current]

[RFC PATCH 05/11] powerpc/svm: Don't release SWIOTLB buffers on secure guests

From: Thiago Jung Bauermann <hidden>
Date: 2018-08-24 03:00:23
Also in: linux-iommu, lkml
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

From: Anshuman Khandual <redacted>

Even though SWIOTLB slab gets allocated and initialized on each powerpc
platform with swiotlb_init(), it gets released away again on all server
platforms because ppc_swiotlb_enable variable never gets set. Secure
guests would require SWIOTLB DMA API support for virtio bounce buffering
purpose. Hence retain the allocated buffer by setting ppc_swiotlb_enable
variable for secure guests on Ultravisor platforms.

Signed-off-by: Anshuman Khandual <redacted>
Signed-off-by: Thiago Jung Bauermann <redacted>
---
 arch/powerpc/kernel/svm.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/svm.c b/arch/powerpc/kernel/svm.c
index eab2a64d8643..891db2de8c04 100644
--- a/arch/powerpc/kernel/svm.c
+++ b/arch/powerpc/kernel/svm.c
@@ -16,6 +16,7 @@ static int __init init_svm(void)
 	if (!is_svm_platform())
 		return 0;
 
+	ppc_swiotlb_enable = 1;
 	swiotlb_update_mem_attributes();
 
 	return 0;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help