xref: /linux/include/linux/irqchip/arm-vgic-info.h (revision 63eb28bb1402891b1ad2be02a530f29a9dd7f1cd)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * include/linux/irqchip/arm-vgic-info.h
4  *
5  * Copyright (C) 2016 ARM Limited, All Rights Reserved.
6  */
7 #ifndef __LINUX_IRQCHIP_ARM_VGIC_INFO_H
8 #define __LINUX_IRQCHIP_ARM_VGIC_INFO_H
9 
10 #include <linux/types.h>
11 #include <linux/ioport.h>
12 
13 enum gic_type {
14 	/* Full GICv2 */
15 	GIC_V2,
16 	/* Full GICv3, optionally with v2 compat */
17 	GIC_V3,
18 	/* Full GICv5, optionally with v3 compat */
19 	GIC_V5,
20 };
21 
22 struct gic_kvm_info {
23 	/* GIC type */
24 	enum gic_type	type;
25 	/* Virtual CPU interface */
26 	struct resource vcpu;
27 	/* Interrupt number */
28 	unsigned int	maint_irq;
29 	/* No interrupt mask, no need to use the above field */
30 	bool		no_maint_irq_mask;
31 	/* Virtual control interface */
32 	struct resource vctrl;
33 	/* vlpi support */
34 	bool		has_v4;
35 	/* rvpeid support */
36 	bool		has_v4_1;
37 	/* Deactivation impared, subpar stuff */
38 	bool		no_hw_deactivation;
39 	/* v3 compat support (GICv5 hosts, only) */
40 	bool		has_gcie_v3_compat;
41 };
42 
43 #ifdef CONFIG_KVM
44 void vgic_set_kvm_info(const struct gic_kvm_info *info);
45 #else
vgic_set_kvm_info(const struct gic_kvm_info * info)46 static inline void vgic_set_kvm_info(const struct gic_kvm_info *info) {}
47 #endif
48 
49 #endif
50