svm.h (bd104e6db6f0ad124e507a9ecf1a468efe5697db) | svm.h (d5394c059da9786043934bed474562cde124e7d3) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * SVM helper functions 4 * 5 * Copyright 2018 Anshuman Khandual, IBM Corporation. 6 */ 7 8#ifndef _ASM_POWERPC_SVM_H 9#define _ASM_POWERPC_SVM_H 10 11#ifdef CONFIG_PPC_SVM 12 13static inline bool is_secure_guest(void) 14{ 15 return mfmsr() & MSR_S; 16} 17 | 1/* SPDX-License-Identifier: GPL-2.0+ */ 2/* 3 * SVM helper functions 4 * 5 * Copyright 2018 Anshuman Khandual, IBM Corporation. 6 */ 7 8#ifndef _ASM_POWERPC_SVM_H 9#define _ASM_POWERPC_SVM_H 10 11#ifdef CONFIG_PPC_SVM 12 13static inline bool is_secure_guest(void) 14{ 15 return mfmsr() & MSR_S; 16} 17 |
18void dtl_cache_ctor(void *addr); 19#define get_dtl_cache_ctor() (is_secure_guest() ? dtl_cache_ctor : NULL) 20 |
|
18#else /* CONFIG_PPC_SVM */ 19 20static inline bool is_secure_guest(void) 21{ 22 return false; 23} 24 | 21#else /* CONFIG_PPC_SVM */ 22 23static inline bool is_secure_guest(void) 24{ 25 return false; 26} 27 |
28#define get_dtl_cache_ctor() NULL 29 |
|
25#endif /* CONFIG_PPC_SVM */ 26#endif /* _ASM_POWERPC_SVM_H */ | 30#endif /* CONFIG_PPC_SVM */ 31#endif /* _ASM_POWERPC_SVM_H */ |