| 
									
										
										
										
											2013-04-16 17:42:19 +02:00
										 |  |  | #ifndef __IRQ_H
 | 
					
						
							|  |  |  | #define __IRQ_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <linux/kvm_host.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static inline int irqchip_in_kernel(struct kvm *kvm) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	int ret = 0; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifdef CONFIG_KVM_MPIC
 | 
					
						
							|  |  |  | 	ret = ret || (kvm->arch.mpic != NULL); | 
					
						
							| 
									
										
										
										
											2013-04-27 00:28:37 +00:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | #ifdef CONFIG_KVM_XICS
 | 
					
						
							|  |  |  | 	ret = ret || (kvm->arch.xics != NULL); | 
					
						
							| 
									
										
										
										
											2013-04-16 17:42:19 +02:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 	smp_rmb(); | 
					
						
							|  |  |  | 	return ret; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |