On 2021-11-30 12:48 p.m., Thomas Gleixner wrote: > On Tue, Nov 30 2021 at 12:21, Logan Gunthorpe wrote: >> On 2021-11-29 5:29 p.m., Thomas Gleixner wrote: >>> I'm way too tired to come up with a proper solution for that, but that >>> PCI_IRQ_VIRTUAL has to die ASAP. >> >> I'm willing to volunteer a bit of my time to clean this up, but I'd need >> a bit more direction on what a proper solution would look like. The MSI >> domain code is far from well documented nor is it easy to understand. > > Fair enough. I'm struggling with finding time to document that properly. > > I've not yet made my mind up what the best way forward for this is, but > I have a few ideas which I want to explore deeper. > > But the most important question is right now on which architectures > these switchtec virtual interrupt things are used. > > If it's used on any architecture which does not use hierarchical > irqdomains for MSI (x86, arm, arm64, power64), then using irqdomains is > obviously a non-starter unless falling back to a single interrupt would > not be considered a regression :) Well that's a hard question to answer. The switchtec hardware is a very generic PCI switch that can technically be used on any architecture that supports PCI. However, NTB is a very specialized use case and only a handful of companies have attempted to use it for anything, as is. I can't say I know for sure, but my gut says the vast majority (if not all) are using x86. Maybe some are trying with arm64 or power64, but the only architecture not in that list that I'd conceivably think someone might care about down the road might be riscv. Most other NTB hardware (specifically AMD and Intel) are built into x86 CPUs so should be fine with this restriction. I personally expect it would be fine to add a dependency on CONFIG_IRQ_DOMAIN_HIERARCHY to CONFIG_NTB_MSI. However, I've copied Doug from GigaIO who's the only user I know that might have a better informed opinion on this. Logan