xref: /openbmc/qemu/hw/intc/vgic_common.h (revision 46627f41)
1 /*
2  * ARM KVM vGIC utility functions
3  *
4  * Copyright (c) 2015 Samsung Electronics
5  * Written by Pavel Fedin
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef QEMU_ARM_VGIC_COMMON_H
22 #define QEMU_ARM_VGIC_COMMON_H
23 
24 /**
25  * kvm_arm_gic_set_irq - Send an IRQ to the in-kernel vGIC
26  * @num_irq: Total number of IRQs configured for the GIC instance
27  * @irq: qemu internal IRQ line number:
28  *  [0..N-1] : external interrupts
29  *  [N..N+31] : PPI (internal) interrupts for CPU 0
30  *  [N+32..N+63] : PPI (internal interrupts for CPU 1
31  * @level: level of the IRQ line.
32  */
33 void kvm_arm_gic_set_irq(uint32_t num_irq, int irq, int level);
34 
35 #endif
36