mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
KVM: Add an arch specific hooks in 'struct kvm_kernel_irqfd'
This patch adds an arch specific hooks 'arch_update' in 'struct kvm_kernel_irqfd'. On Intel side, it is used to update the IRTE when VT-d posted-interrupts is used. Signed-off-by: Feng Wu <[email protected]> Reviewed-by: Alex Williamson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
This commit is contained in:
parent
9016cfb577
commit
f70c20aaf1
2 changed files with 20 additions and 1 deletions
|
|
@ -266,6 +266,13 @@ void __attribute__((weak)) kvm_arch_irq_bypass_start(
|
|||
struct irq_bypass_consumer *cons)
|
||||
{
|
||||
}
|
||||
|
||||
int __attribute__((weak)) kvm_arch_update_irqfd_routing(
|
||||
struct kvm *kvm, unsigned int host_irq,
|
||||
uint32_t guest_irq, bool set)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
|
|
@ -586,9 +593,19 @@ void kvm_irq_routing_update(struct kvm *kvm)
|
|||
|
||||
spin_lock_irq(&kvm->irqfds.lock);
|
||||
|
||||
list_for_each_entry(irqfd, &kvm->irqfds.items, list)
|
||||
list_for_each_entry(irqfd, &kvm->irqfds.items, list) {
|
||||
irqfd_update(kvm, irqfd);
|
||||
|
||||
#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS
|
||||
if (irqfd->producer) {
|
||||
int ret = kvm_arch_update_irqfd_routing(
|
||||
irqfd->kvm, irqfd->producer->irq,
|
||||
irqfd->gsi, 1);
|
||||
WARN_ON(ret);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
spin_unlock_irq(&kvm->irqfds.lock);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue