On 17.06.14 13:39, Eric Auger wrote:
Hello, I have a question related to KVM_IRQFD and KVM_SET_GSI_ROUTING ioctl relationship. When reading the KVM API documentation I do not understand there is any dependency between KVM_IRQFD and KVM_SET_GSI_ROUTING. According to the text it seems only the gsi field is used and interpreted as the irqchip pin. However irqchip.c kvm_set_irq code relies on an existing and not dummy routing table. My question is: does anyone agree on the fact the user-side must set a consistent routing table using KVM_SET_GSI_ROUTING before using KVM_IRQFD? The other alternative would have been to build a default identity GSI routing table in the kernel (gsi = irqchip.pin).
I untangled irqfd support from the x86 ioapic emulation a while back. When I looked at it, I didn't see any easy way to split it out from the routing too, so I kept that dependency in.
If you look at the code, you will see that the irq routing entry is used as token for an irqfd. So every irqfd only knows its routing table entry, nothing else.
Splitting that dependency out is certainly quite tedious work. However, I'm sure the IBM folks will be grateful if you do it :).
Alex -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html