mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
![Tom Lendacky](/assets/img/avatar_default.png)
Replace uses of mem_encrypt_active() with calls to cc_platform_has() with the CC_ATTR_MEM_ENCRYPT attribute. Remove the implementation of mem_encrypt_active() across all arches. For s390, since the default implementation of the cc_platform_has() matches the s390 implementation of mem_encrypt_active(), cc_platform_has() does not need to be implemented in s390 (the config option ARCH_HAS_CC_PLATFORM is not set). Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20210928191009.32551-9-bp@alien8.de
21 lines
456 B
C
21 lines
456 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* SVM helper functions
|
|
*
|
|
* Copyright 2018 IBM Corporation
|
|
*/
|
|
|
|
#ifndef _ASM_POWERPC_MEM_ENCRYPT_H
|
|
#define _ASM_POWERPC_MEM_ENCRYPT_H
|
|
|
|
#include <asm/svm.h>
|
|
|
|
static inline bool force_dma_unencrypted(struct device *dev)
|
|
{
|
|
return is_secure_guest();
|
|
}
|
|
|
|
int set_memory_encrypted(unsigned long addr, int numpages);
|
|
int set_memory_decrypted(unsigned long addr, int numpages);
|
|
|
|
#endif /* _ASM_POWERPC_MEM_ENCRYPT_H */
|