aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2015-11-26 12:19:25 -0500
committerChristoffer Dall <christoffer.dall@linaro.org>2016-05-20 09:39:47 -0400
commit0919e84c0fc1fc73525fdcedefab89ea8460f697 (patch)
treedcd57c5a45d7361462f93452bcf92efed1368a74 /include
parent8e4447457965a7ddc576d0b9fd34c9905eb0416d (diff)
KVM: arm/arm64: vgic-new: Add IRQ sync/flush framework
Implement the framework for syncing IRQs between our emulation and the list registers, which represent the guest's view of IRQs. This is done in kvm_vgic_flush_hwstate and kvm_vgic_sync_hwstate, which gets called on guest entry and exit. The code talking to the actual GICv2/v3 hardware is added in the following patches. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/kvm/vgic/vgic.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/kvm/vgic/vgic.h b/include/kvm/vgic/vgic.h
index 7b6ca90861b8..9506267498e5 100644
--- a/include/kvm/vgic/vgic.h
+++ b/include/kvm/vgic/vgic.h
@@ -190,6 +190,10 @@ int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int intid,
190#define vgic_valid_spi(k, i) (((i) >= VGIC_NR_PRIVATE_IRQS) && \ 190#define vgic_valid_spi(k, i) (((i) >= VGIC_NR_PRIVATE_IRQS) && \
191 ((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS)) 191 ((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS))
192 192
193bool kvm_vcpu_has_pending_irqs(struct kvm_vcpu *vcpu);
194void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu);
195void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu);
196
193/** 197/**
194 * kvm_vgic_get_max_vcpus - Get the maximum number of VCPUs allowed by HW 198 * kvm_vgic_get_max_vcpus - Get the maximum number of VCPUs allowed by HW
195 * 199 *