forked from mirrors/linux
		
	 e9d1d2bb75
			
		
	
	
		e9d1d2bb75
		
	
	
	
	
		
			
			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 */
 |