linux-stable/include/linux/irqchip/arm-vgic-info.h
Marc Zyngier f6c3e24fb7 KVM: arm64: vgic: Let an interrupt controller advertise lack of HW deactivation
The vGIC, as architected by ARM, allows a virtual interrupt to
trigger the deactivation of a physical interrupt. This allows
the following interrupt to be delivered without requiring an exit.

However, some implementations have choosen not to implement this,
meaning that we will need some unsavoury workarounds to deal with this.

On detecting such a case, taint the kernel and spit a nastygram.
We'll deal with this in later patches.

Signed-off-by: Marc Zyngier <maz@kernel.org>
2021-06-01 10:45:59 +01:00

45 lines
1,001 B
C

/* 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