~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/kvm/include/aarch64/gic.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * ARM Generic Interrupt Controller (GIC) specific defines
  4  */
  5 
  6 #ifndef SELFTEST_KVM_GIC_H
  7 #define SELFTEST_KVM_GIC_H
  8 
  9 #include <asm/kvm.h>
 10 
 11 enum gic_type {
 12         GIC_V3,
 13         GIC_TYPE_MAX,
 14 };
 15 
 16 /*
 17  * Note that the redistributor frames are at the end, as the range scales
 18  * with the number of vCPUs in the VM.
 19  */
 20 #define GITS_BASE_GPA           0x8000000ULL
 21 #define GICD_BASE_GPA           (GITS_BASE_GPA + KVM_VGIC_V3_ITS_SIZE)
 22 #define GICR_BASE_GPA           (GICD_BASE_GPA + KVM_VGIC_V3_DIST_SIZE)
 23 
 24 /* The GIC is identity-mapped into the guest at the time of setup. */
 25 #define GITS_BASE_GVA           ((volatile void *)GITS_BASE_GPA)
 26 #define GICD_BASE_GVA           ((volatile void *)GICD_BASE_GPA)
 27 #define GICR_BASE_GVA           ((volatile void *)GICR_BASE_GPA)
 28 
 29 #define MIN_SGI                 0
 30 #define MIN_PPI                 16
 31 #define MIN_SPI                 32
 32 #define MAX_SPI                 1019
 33 #define IAR_SPURIOUS            1023
 34 
 35 #define INTID_IS_SGI(intid)     (0       <= (intid) && (intid) < MIN_PPI)
 36 #define INTID_IS_PPI(intid)     (MIN_PPI <= (intid) && (intid) < MIN_SPI)
 37 #define INTID_IS_SPI(intid)     (MIN_SPI <= (intid) && (intid) <= MAX_SPI)
 38 
 39 void gic_init(enum gic_type type, unsigned int nr_cpus);
 40 void gic_irq_enable(unsigned int intid);
 41 void gic_irq_disable(unsigned int intid);
 42 unsigned int gic_get_and_ack_irq(void);
 43 void gic_set_eoi(unsigned int intid);
 44 void gic_set_dir(unsigned int intid);
 45 
 46 /*
 47  * Sets the EOI mode. When split is false, EOI just drops the priority. When
 48  * split is true, EOI drops the priority and deactivates the interrupt.
 49  */
 50 void gic_set_eoi_split(bool split);
 51 void gic_set_priority_mask(uint64_t mask);
 52 void gic_set_priority(uint32_t intid, uint32_t prio);
 53 void gic_irq_set_active(unsigned int intid);
 54 void gic_irq_clear_active(unsigned int intid);
 55 bool gic_irq_get_active(unsigned int intid);
 56 void gic_irq_set_pending(unsigned int intid);
 57 void gic_irq_clear_pending(unsigned int intid);
 58 bool gic_irq_get_pending(unsigned int intid);
 59 void gic_irq_set_config(unsigned int intid, bool is_edge);
 60 
 61 void gic_rdist_enable_lpis(vm_paddr_t cfg_table, size_t cfg_table_size,
 62                            vm_paddr_t pend_table);
 63 
 64 #endif /* SELFTEST_KVM_GIC_H */
 65 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php