lkml.org 
[lkml]   [2022]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 27/33] genirq/msi: Provide constants for PCI/IMS support
Date
On Wed, Nov 16 2022 at 15:54, Jason Gunthorpe wrote:
> On Fri, Nov 11, 2022 at 02:58:54PM +0100, Thomas Gleixner wrote:
>> + /* Support for PCI/IMS */
>> + MSI_FLAG_PCI_IMS = (1 << 21),
>
> Maybe for legacy reasons it is too complicated, but it would be so
> much clearer of the special case of "I only know how to support PCI
> MSI and PCI MSI-X" was called out as a special flag, and the more
> general case of "any write_msg is fine by me" was left behind.
>
> I feel like when the device domain is created in the first place the
> parent domain(s) should be able to reject the creation if the
> requested child domain is not one it supports. Eg the hypervisor
> interactions checks if the child domain is PCI MSI or PCI MSI-X and
> rejects otherwise, because that is the only thing the hypervisor knows
> how to work with.
>
> If we did that perhaps we don't even need a flag or further checks?

It's not that simple. The flags are part of the domain creation sanity
checks and due to other constraints in our marvelous zoo of
architectures, iommus, hypervisors and whatever being explicit about
this is really required. Look at the GICv3-ITS voodoo which explicitly
needs to differentiate between PCI and non-PCI MSI. I wish we could
start from a clean slate, but that train has left the station long ago.

Thanks,

tglx

\
 
 \ /
  Last update: 2022-11-17 10:47    [W:0.084 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site