lkml.org 
[lkml]   [2015]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v7 12/17] KVM: Implement IRQ bypass consumer callbacks for x86
From
Date


On 25/08/2015 10:50, Feng Wu wrote:
> + struct kvm_kernel_irqfd *irqfd =
> + container_of(cons, struct kvm_kernel_irqfd, consumer);
> +
> + irqfd->producer = prod;

This assignment should be under "if (kvm_x86_ops->update_pi_irte)".

> + return kvm_arch_update_pi_irte(irqfd->kvm, prod->irq, irqfd->gsi, 1);
> +}
> +
> +void kvm_arch_irq_bypass_del_producer(struct irq_bypass_consumer *cons,
> + struct irq_bypass_producer *prod)
> +{
> + int ret;
> + struct kvm_kernel_irqfd *irqfd =
> + container_of(cons, struct kvm_kernel_irqfd, consumer);
> +
> + irqfd->producer = NULL;

And here it should be like:

if (!kvm_x86_ops->update_pi_irte) {
WARN_ON(irqfd->producer != NULL);
return;
}

WARN_ON(irqfd->producer != prod);
irqfd->producer = NULL;

Paolo

> +


\
 
 \ /
  Last update: 2015-09-11 12:41    [W:1.769 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site