On Tue, Dec 03 2024 at 18:24, Frank Li wrote: > On Tue, Dec 03, 2024 at 11:15:27PM +0100, Thomas Gleixner wrote: >> The fact that a MSI parent domain supports DOMAIN_BUS_DEVICE_MSI does >> not guarantee that the parent is translation table based. >> >> As this is intended to be a generic library for all sorts of EP >> implementations, there needs to be >> >> - either a mechanism to prevent the initialization if the underlying >> MSI parent domain does not provide immutable messages > > How to know such information? It obviously needs to be flagged somehow in the domain and the EP magic needs to check that flag. >> >> - or support for endpoint specific msi_write_msg() implementations > > Even provide specific msi_write_msg(), write to address/data to shared > memory. > > host driver: > 1. read address/data from shared memory > 2. write data to address. > > 1 and 2 is not atomic. So it can't avoid above raise conditon. Correct. So you cannot support that case, which in turn requires to have a mechanism to check for the immutable property. Thanks, tglx