diff options
author | Christoph Hellwig <hch@lst.de> | 2018-03-19 06:38:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-03-20 05:01:58 -0400 |
commit | b7fa07460b0f0e9fbe6d9319a0864c145bd59bcb (patch) | |
tree | ab73bdcf0ad9671635f90e22b510cdbbbfe0d1db | |
parent | 178c5682447ac0e315f0f3e27664fd4e0d2721cc (diff) |
set_memory.h: Provide set_memory_{en,de}crypted() stubs
... to make these APIs more universally available.
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Jon Mason <jdmason@kudzu.us>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Muli Ben-Yehuda <mulix@mulix.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: iommu@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/20180319103826.12853-11-hch@lst.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | include/linux/set_memory.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/set_memory.h b/include/linux/set_memory.h index e5140648f638..da5178216da5 100644 --- a/include/linux/set_memory.h +++ b/include/linux/set_memory.h | |||
@@ -17,4 +17,16 @@ static inline int set_memory_x(unsigned long addr, int numpages) { return 0; } | |||
17 | static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; } | 17 | static inline int set_memory_nx(unsigned long addr, int numpages) { return 0; } |
18 | #endif | 18 | #endif |
19 | 19 | ||
20 | #ifndef CONFIG_ARCH_HAS_MEM_ENCRYPT | ||
21 | static inline int set_memory_encrypted(unsigned long addr, int numpages) | ||
22 | { | ||
23 | return 0; | ||
24 | } | ||
25 | |||
26 | static inline int set_memory_decrypted(unsigned long addr, int numpages) | ||
27 | { | ||
28 | return 0; | ||
29 | } | ||
30 | #endif /* CONFIG_ARCH_HAS_MEM_ENCRYPT */ | ||
31 | |||
20 | #endif /* _LINUX_SET_MEMORY_H_ */ | 32 | #endif /* _LINUX_SET_MEMORY_H_ */ |