On Fri, 2012-10-26 at 13:00 +0200, Jan Kiszka wrote: > And at latest there you will need the IRQ routing infrastructure of KVM. > It tells KVM which "virtual IRQ" (badly named "GSI") triggers which > event at which input, e.g. a physical IRQ line at some IRQ controller or > a specific message at some MSI receiver. You shouldn't try to invent a > Power wheel here, rather tune the existing one to become more generic. > We could even try to get rid of that unfortunate GSI name (when leaving > aliases behind), though that is cosmetic. Ok, there must be something wrong with me, I still don't understand what you are talking about. What "MSI receiver" ? What physical IRQ line are you talking about ? How is the kernel involved ? The only cases I can think of are the association between a virtual interrupt (ie, an interrupt in the guest interrupt number space) and an in-kernel source for that interrupt, ie, vhost and PCI pass-through essentially. Anything else is under qemu control. IE. MSIs or LSIs generated by emulated devices are just normal interrupt that go through our ioctl to trigger the in-kernel source with the same number. I don't see any "routing" happening anywhere in that picture really. The firmware calls done by the guest to change the target of interrupts (which CPU/presentation controller to direct a given interrupt to) are handled entirely in the kernel in platform specific code and update our internal ICS state. > > > > I might just miss some subtleties here but so far I haven't been able to > > figure out how to "shoehorn" our stuff in the very x86-centric existing > > interfaces to the kernel APICs. In fact all that code is in a generic > > location in kvm but is really x86/ia64 centric and the interfaces seem > > to be as well. > > That's not true in general, though you surely find a lot of traces and > still a few concrete x86 bits under virt/kvm. Well, I haven't found anything in virt/kvm/irq_comm.c that was of any use to us. Again, I might be sufferring from a major misunderstanding here but as far as I can tell, the model is totally different. Besides, that file has a hard coded list of what looks like completely x86 specific mappings between "GSI" and "interrupt numbers" (again I don't understand completely the distinction and I don't think we have anything like it on power). Ben. -- 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