ARM: KVM: Initial VGIC infrastructure code
[deliverable/linux.git] / arch / arm / include / asm / kvm_vgic.h
CommitLineData
1a89dd91
MZ
1/*
2 * Copyright (C) 2012 ARM Ltd.
3 * Author: Marc Zyngier <marc.zyngier@arm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef __ASM_ARM_KVM_VGIC_H
20#define __ASM_ARM_KVM_VGIC_H
21
22#include <linux/irqchip/arm-gic.h>
23
24struct vgic_dist {
25};
26
27struct vgic_cpu {
28};
29
30struct kvm;
31struct kvm_vcpu;
32struct kvm_run;
33struct kvm_exit_mmio;
34
35#ifdef CONFIG_KVM_ARM_VGIC
36bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run,
37 struct kvm_exit_mmio *mmio);
38
39#else
40static inline int kvm_vgic_hyp_init(void)
41{
42 return 0;
43}
44
45static inline int kvm_vgic_init(struct kvm *kvm)
46{
47 return 0;
48}
49
50static inline int kvm_vgic_create(struct kvm *kvm)
51{
52 return 0;
53}
54
55static inline int kvm_vgic_vcpu_init(struct kvm_vcpu *vcpu)
56{
57 return 0;
58}
59
60static inline void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu) {}
61static inline void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu) {}
62
63static inline int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu)
64{
65 return 0;
66}
67
68static inline bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run,
69 struct kvm_exit_mmio *mmio)
70{
71 return false;
72}
73
74static inline int irqchip_in_kernel(struct kvm *kvm)
75{
76 return 0;
77}
78#endif
79
80#endif
This page took 0.027514 seconds and 5 git commands to generate.