arm-vgic-info.h 1001 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #include <linux/types.h>
  10. #include <linux/ioport.h>
  11. enum gic_type {
  12. /* Full GICv2 */
  13. GIC_V2,
  14. /* Full GICv3, optionally with v2 compat */
  15. GIC_V3,
  16. };
  17. struct gic_kvm_info {
  18. /* GIC type */
  19. enum gic_type type;
  20. /* Virtual CPU interface */
  21. struct resource vcpu;
  22. /* Interrupt number */
  23. unsigned int maint_irq;
  24. /* No interrupt mask, no need to use the above field */
  25. bool no_maint_irq_mask;
  26. /* Virtual control interface */
  27. struct resource vctrl;
  28. /* vlpi support */
  29. bool has_v4;
  30. /* rvpeid support */
  31. bool has_v4_1;
  32. /* Deactivation impared, subpar stuff */
  33. bool no_hw_deactivation;
  34. };
  35. #ifdef CONFIG_KVM
  36. void vgic_set_kvm_info(const struct gic_kvm_info *info);
  37. #else
  38. static inline void vgic_set_kvm_info(const struct gic_kvm_info *info) {}
  39. #endif
  40. #endif