diff options
author | 2021-06-06 11:15:11 +0100 | |
---|---|---|
committer | 2021-06-06 11:15:11 +0100 | |
commit | 32e92b71b32ad08e8d85aba6e10709b10f32d90a (patch) | |
tree | 64e07a2022b7d00b67481c0bd518dd104775ac18 /include/linux | |
parent | Linux 5.13-rc4 (diff) | |
parent | irqchip/apple-aic: Advertise some level of vGICv3 compatibility (diff) | |
download | wireguard-linux-32e92b71b32ad08e8d85aba6e10709b10f32d90a.tar.xz wireguard-linux-32e92b71b32ad08e8d85aba6e10709b10f32d90a.zip |
Merge branch kvm-arm64/m1 into kvmarm-master/next
Rework the KVM GIC and timer to cope with lesser HW such as
the Apple M1 SoC.
* kvm-arm64/m1:
irqchip/apple-aic: Advertise some level of vGICv3 compatibility
KVM: arm64: timer: Add support for SW-based deactivation
KVM: arm64: timer: Refactor IRQ configuration
KVM: arm64: vgic: Implement SW-driven deactivation
KVM: arm64: vgic: move irq->get_input_level into an ops structure
KVM: arm64: vgic: Let an interrupt controller advertise lack of HW deactivation
KVM: arm64: vgic: Be tolerant to the lack of maintenance interrupt masking
KVM: arm64: Handle physical FIQ as an IRQ while running a guest
irqchip/gic: Split vGIC probing information from the GIC code
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/irqchip/arm-gic-common.h | 25 | ||||
-rw-r--r-- | include/linux/irqchip/arm-vgic-info.h | 45 |
2 files changed, 46 insertions, 24 deletions
diff --git a/include/linux/irqchip/arm-gic-common.h b/include/linux/irqchip/arm-gic-common.h index fa8c0455c352..1177f3a1aed5 100644 --- a/include/linux/irqchip/arm-gic-common.h +++ b/include/linux/irqchip/arm-gic-common.h @@ -7,8 +7,7 @@ #ifndef __LINUX_IRQCHIP_ARM_GIC_COMMON_H #define __LINUX_IRQCHIP_ARM_GIC_COMMON_H -#include <linux/types.h> -#include <linux/ioport.h> +#include <linux/irqchip/arm-vgic-info.h> #define GICD_INT_DEF_PRI 0xa0 #define GICD_INT_DEF_PRI_X4 ((GICD_INT_DEF_PRI << 24) |\ @@ -16,28 +15,6 @@ (GICD_INT_DEF_PRI << 8) |\ GICD_INT_DEF_PRI) -enum gic_type { - GIC_V2, - GIC_V3, -}; - -struct gic_kvm_info { - /* GIC type */ - enum gic_type type; - /* Virtual CPU interface */ - struct resource vcpu; - /* Interrupt number */ - unsigned int maint_irq; - /* Virtual control interface */ - struct resource vctrl; - /* vlpi support */ - bool has_v4; - /* rvpeid support */ - bool has_v4_1; -}; - -const struct gic_kvm_info *gic_get_kvm_info(void); - struct irq_domain; struct fwnode_handle; int gicv2m_init(struct fwnode_handle *parent_handle, diff --git a/include/linux/irqchip/arm-vgic-info.h b/include/linux/irqchip/arm-vgic-info.h new file mode 100644 index 000000000000..a75b2c7de69d --- /dev/null +++ b/include/linux/irqchip/arm-vgic-info.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * include/linux/irqchip/arm-vgic-info.h + * + * Copyright (C) 2016 ARM Limited, All Rights Reserved. + */ +#ifndef __LINUX_IRQCHIP_ARM_VGIC_INFO_H +#define __LINUX_IRQCHIP_ARM_VGIC_INFO_H + +#include <linux/types.h> +#include <linux/ioport.h> + +enum gic_type { + /* Full GICv2 */ + GIC_V2, + /* Full GICv3, optionally with v2 compat */ + GIC_V3, +}; + +struct gic_kvm_info { + /* GIC type */ + enum gic_type type; + /* Virtual CPU interface */ + struct resource vcpu; + /* Interrupt number */ + unsigned int maint_irq; + /* No interrupt mask, no need to use the above field */ + bool no_maint_irq_mask; + /* Virtual control interface */ + struct resource vctrl; + /* vlpi support */ + bool has_v4; + /* rvpeid support */ + bool has_v4_1; + /* Deactivation impared, subpar stuff */ + bool no_hw_deactivation; +}; + +#ifdef CONFIG_KVM +void vgic_set_kvm_info(const struct gic_kvm_info *info); +#else +static inline void vgic_set_kvm_info(const struct gic_kvm_info *info) {} +#endif + +#endif |