On 12/06/18 14:40, Will Deacon wrote: >> +static int irq__setup_irqfd_lines(struct kvm *kvm) >> +{ >> + int ret; >> + struct kvm_irqfd_line *line, *tmp; >> + >> + list_for_each_entry_safe(line, tmp, &irqfd_lines, list) { >> + ret = ioctl(kvm->vm_fd, KVM_IRQFD, &line->irqfd); >> + if (ret < 0) { >> + pr_err("Failed to register IRQFD"); >> + return ret; >> + } > > I think it would be cleaner to call irq__common_add_irqfd here, and have > that take care of constructing the kvm_irqfd. Right, that's better Thanks, Jean