| 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 | /* GICv2 GICC VA */ |
| 28 | void __iomem *gicc_base; |
| 29 | /* Interrupt number */ |
| 30 | unsigned int maint_irq; |
| 31 | /* No interrupt mask, no need to use the above field */ |
| 32 | bool no_maint_irq_mask; |
| 33 | /* Virtual control interface */ |
| 34 | struct resource vctrl; |
| 35 | /* vlpi support */ |
| 36 | bool has_v4; |
| 37 | /* rvpeid support */ |
| 38 | bool has_v4_1; |
| 39 | /* Deactivation impared, subpar stuff */ |
| 40 | bool no_hw_deactivation; |
| 41 | }; |
| 42 | |
| 43 | #ifdef CONFIG_KVM |
| 44 | void vgic_set_kvm_info(const struct gic_kvm_info *info); |
| 45 | #else |
| 46 | static inline void vgic_set_kvm_info(const struct gic_kvm_info *info) {} |
| 47 | #endif |
| 48 | |
| 49 | #endif |
| 50 | |