1 /* SPDX-License-Identifier: GPL-2.0+ */
5 * Copyright 2018 Anshuman Khandual, IBM Corporation.
8 #ifndef _ASM_POWERPC_SVM_H
9 #define _ASM_POWERPC_SVM_H
15 static inline bool is_secure_guest(void)
17 return mfmsr() & MSR_S;
20 void __init svm_swiotlb_init(void);
22 void dtl_cache_ctor(void *addr);
23 #define get_dtl_cache_ctor() (is_secure_guest() ? dtl_cache_ctor : NULL)
25 #else /* CONFIG_PPC_SVM */
27 static inline bool is_secure_guest(void)
32 static inline void svm_swiotlb_init(void) {}
34 #define get_dtl_cache_ctor() NULL
36 #endif /* CONFIG_PPC_SVM */
37 #endif /* _ASM_POWERPC_SVM_H */