]> Git Repo - linux.git/blob - arch/powerpc/include/asm/kvm_guest.h
Merge tag 'for-linus-6.5a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / arch / powerpc / include / asm / kvm_guest.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2020 IBM Corporation
4  */
5
6 #ifndef _ASM_POWERPC_KVM_GUEST_H_
7 #define _ASM_POWERPC_KVM_GUEST_H_
8
9 #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_KVM_GUEST)
10 #include <linux/jump_label.h>
11
12 DECLARE_STATIC_KEY_FALSE(kvm_guest);
13
14 static inline bool is_kvm_guest(void)
15 {
16         return static_branch_unlikely(&kvm_guest);
17 }
18
19 int __init check_kvm_guest(void);
20 #else
21 static inline bool is_kvm_guest(void) { return false; }
22 static inline int check_kvm_guest(void) { return 0; }
23 #endif
24
25 #endif /* _ASM_POWERPC_KVM_GUEST_H_ */
This page took 0.032608 seconds and 4 git commands to generate.