ARM: amba: Make driver_override output consistent with other buses
[linux/fpc-iii.git] / arch / powerpc / include / asm / kvm_para.h
blob336a91acb8b1f3a98f4bfdd7c0c6488d95b86ae0
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 * Copyright IBM Corp. 2008
17 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
19 #ifndef __POWERPC_KVM_PARA_H__
20 #define __POWERPC_KVM_PARA_H__
22 #include <uapi/asm/kvm_para.h>
24 #ifdef CONFIG_KVM_GUEST
26 #include <linux/of.h>
28 static inline int kvm_para_available(void)
30 struct device_node *hyper_node;
32 hyper_node = of_find_node_by_path("/hypervisor");
33 if (!hyper_node)
34 return 0;
36 if (!of_device_is_compatible(hyper_node, "linux,kvm"))
37 return 0;
39 return 1;
42 #else
44 static inline int kvm_para_available(void)
46 return 0;
49 #endif
51 static inline unsigned int kvm_arch_para_features(void)
53 unsigned long r;
55 if (!kvm_para_available())
56 return 0;
58 if(epapr_hypercall0_1(KVM_HCALL_TOKEN(KVM_HC_FEATURES), &r))
59 return 0;
61 return r;
64 static inline bool kvm_check_and_clear_guest_paused(void)
66 return false;
69 #endif /* __POWERPC_KVM_PARA_H__ */