2 * Copyright (C) 2015, 2016 ARM Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include <linux/kvm.h>
18 #include <linux/kvm_host.h>
19 #include <trace/events/kvm.h>
21 int kvm_irq_map_gsi(struct kvm
*kvm
,
22 struct kvm_kernel_irq_routing_entry
*entries
,
28 int kvm_irq_map_chip_pin(struct kvm
*kvm
, unsigned int irqchip
,
34 int kvm_set_irq(struct kvm
*kvm
, int irq_source_id
,
35 u32 irq
, int level
, bool line_status
)
37 unsigned int spi
= irq
+ VGIC_NR_PRIVATE_IRQS
;
39 trace_kvm_set_irq(irq
, level
, irq_source_id
);
41 BUG_ON(!vgic_initialized(kvm
));
43 return kvm_vgic_inject_irq(kvm
, 0, spi
, level
);
46 /* MSI not implemented yet */
47 int kvm_set_msi(struct kvm_kernel_irq_routing_entry
*e
,
48 struct kvm
*kvm
, int irq_source_id
,
49 int level
, bool line_status
)