Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.11-rc1 64 lines 2.1 kB view raw
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 11enum 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 39void gic_init(enum gic_type type, unsigned int nr_cpus); 40void gic_irq_enable(unsigned int intid); 41void gic_irq_disable(unsigned int intid); 42unsigned int gic_get_and_ack_irq(void); 43void gic_set_eoi(unsigned int intid); 44void 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 */ 50void gic_set_eoi_split(bool split); 51void gic_set_priority_mask(uint64_t mask); 52void gic_set_priority(uint32_t intid, uint32_t prio); 53void gic_irq_set_active(unsigned int intid); 54void gic_irq_clear_active(unsigned int intid); 55bool gic_irq_get_active(unsigned int intid); 56void gic_irq_set_pending(unsigned int intid); 57void gic_irq_clear_pending(unsigned int intid); 58bool gic_irq_get_pending(unsigned int intid); 59void gic_irq_set_config(unsigned int intid, bool is_edge); 60 61void 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 */