0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _ASM_POWERPC_SVM_H
0009 #define _ASM_POWERPC_SVM_H
0010
0011 #ifdef CONFIG_PPC_SVM
0012
0013 #include <asm/reg.h>
0014
0015 static inline bool is_secure_guest(void)
0016 {
0017 return mfmsr() & MSR_S;
0018 }
0019
0020 void dtl_cache_ctor(void *addr);
0021 #define get_dtl_cache_ctor() (is_secure_guest() ? dtl_cache_ctor : NULL)
0022
0023 #else
0024
0025 static inline bool is_secure_guest(void)
0026 {
0027 return false;
0028 }
0029
0030 #define get_dtl_cache_ctor() NULL
0031
0032 #endif
0033 #endif