Merge tag 'linux-kselftest-kunit-fixes-5.11-rc3' of git://git.kernel.org/pub/scm...
[linux/fpc-iii.git] / arch / powerpc / include / asm / kvm_guest.h
blob2fca299f7e1929e6f1f1f3dac6b86c1fb1c85c9e
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2020 IBM Corporation
4 */
6 #ifndef _ASM_POWERPC_KVM_GUEST_H_
7 #define _ASM_POWERPC_KVM_GUEST_H_
9 #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_KVM_GUEST)
10 #include <linux/jump_label.h>
12 DECLARE_STATIC_KEY_FALSE(kvm_guest);
14 static inline bool is_kvm_guest(void)
16 return static_branch_unlikely(&kvm_guest);
19 bool check_kvm_guest(void);
20 #else
21 static inline bool is_kvm_guest(void) { return false; }
22 static inline bool check_kvm_guest(void) { return false; }
23 #endif
25 #endif /* _ASM_POWERPC_KVM_GUEST_H_ */