aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/mem_encrypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/mem_encrypt.h')
-rw-r--r--arch/powerpc/include/asm/mem_encrypt.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/mem_encrypt.h b/arch/powerpc/include/asm/mem_encrypt.h
new file mode 100644
index 000000000000..ba9dab07c1be
--- /dev/null
+++ b/arch/powerpc/include/asm/mem_encrypt.h
@@ -0,0 +1,26 @@
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * SVM helper functions
4 *
5 * Copyright 2018 IBM Corporation
6 */
7
8#ifndef _ASM_POWERPC_MEM_ENCRYPT_H
9#define _ASM_POWERPC_MEM_ENCRYPT_H
10
11#include <asm/svm.h>
12
13static inline bool mem_encrypt_active(void)
14{
15 return is_secure_guest();
16}
17
18static inline bool force_dma_unencrypted(struct device *dev)
19{
20 return is_secure_guest();
21}
22
23int set_memory_encrypted(unsigned long addr, int numpages);
24int set_memory_decrypted(unsigned long addr, int numpages);
25
26#endif /* _ASM_POWERPC_MEM_ENCRYPT_H */