@@ -1146,6 +1146,28 @@ struct kvm_vcpu *kvm_mpidr_to_vcpu(struct kvm *kvm, unsigned long mpidr)
return NULL;
}
+void kvm_arch_add_producer(struct irq_bypass_consumer *cons,
+ struct irq_bypass_producer *prod)
+{
+ kvm_vgic_set_forward(cons->kvm, prod->irq, cons->gsi);
+}
+void kvm_arch_del_producer(struct irq_bypass_consumer *cons,
+ struct irq_bypass_producer *prod)
+{
+ kvm_vgic_unset_forward(cons->kvm, prod->irq, cons->gsi,
+ &prod->active);
+}
+
+void kvm_arch_stop_consumer(struct irq_bypass_consumer *cons)
+{
+ kvm_arm_halt_guest(cons->kvm);
+}
+
+void kvm_arch_resume_consumer(struct irq_bypass_consumer *cons)
+{
+ kvm_arm_resume_guest(cons->kvm);
+}
+
/**
* Initialize Hyp-mode and memory mappings on all CPUs.
*/
- kvm_arch_add_producer: perform VGIC/irqchip settings for forwarding - kvm_arch_del_producer: same for inverse operation - kvm_arch_stop_consumer: halt guest execution - kvm_arch_resume_consumer resume guest execution Signed-off-by: Eric Auger <eric.auger@linaro.org> --- arch/arm/kvm/arm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)