summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/svm.h
diff options
context:
space:
mode:
authorAnshuman Khandual <khandual@linux.vnet.ibm.com>2019-08-19 23:13:19 -0300
committerMichael Ellerman <mpe@ellerman.id.au>2019-08-30 09:55:40 +1000
commitd5394c059da9786043934bed474562cde124e7d3 (patch)
treee5507805d559e0fe4dae9659105fc5ac2e484bca /arch/powerpc/include/asm/svm.h
parentbd104e6db6f0ad124e507a9ecf1a468efe5697db (diff)
downloadlinux-d5394c059da9786043934bed474562cde124e7d3.tar.bz2
powerpc/pseries/svm: Use shared memory for Debug Trace Log (DTL)
Secure guests need to share the DTL buffers with the hypervisor. To that end, use a kmem_cache constructor which converts the underlying buddy allocated SLUB cache pages into shared memory. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190820021326.6884-10-bauerman@linux.ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/svm.h')
-rw-r--r--arch/powerpc/include/asm/svm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/svm.h b/arch/powerpc/include/asm/svm.h
index 2689d8d841f8..85580b30aba4 100644
--- a/arch/powerpc/include/asm/svm.h
+++ b/arch/powerpc/include/asm/svm.h
@@ -15,6 +15,9 @@ static inline bool is_secure_guest(void)
return mfmsr() & MSR_S;
}
+void dtl_cache_ctor(void *addr);
+#define get_dtl_cache_ctor() (is_secure_guest() ? dtl_cache_ctor : NULL)
+
#else /* CONFIG_PPC_SVM */
static inline bool is_secure_guest(void)
@@ -22,5 +25,7 @@ static inline bool is_secure_guest(void)
return false;
}
+#define get_dtl_cache_ctor() NULL
+
#endif /* CONFIG_PPC_SVM */
#endif /* _ASM_POWERPC_SVM_H */