Thread (23 messages) flat view 23 messages, 3 authors, 10d ago

Re: [PATCH v10 07/15] platform-msi: Introduce platform_device_msi_rewrite()

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2026-09-08 22:55:37
Also in: driver-core, linux-iommu

On Tue, Sep 08, 2026 at 09:40:49PM +0200, Thomas Gleixner wrote:
On Tue, Sep 08 2026 at 17:17, Pranjal Shrivastava wrote:

...
quoted
Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Jason. You really should know better by now :(
I know better enough to have pointed out that an open coded version of
this in a driver should not be open coded in a driver and be made into
proper helper, so you can see it :)
quoted
+	desc = irq_get_msi_desc(irq);
+	if (!desc) {
+		dev_err(dev, "Failed to get MSI descriptor for irq %u\n", irq);
+		return;
+	}
Doing this without having the underlying interrupt descriptor locked is
a recipe for an undebuggable disaster waiting to happen. It might be
"safe" in the context you are calling it but it's absolutely not safe in
general.
Which is why we are here, I was wondering if the open coded
implementation was even OK..
quoted hunk ↗ jump to hunk
@@ -1775,3 +1775,34 @@ bool msi_device_has_isolated_msi(struct
 	return arch_is_isolated_msi();
 }
 EXPORT_SYMBOL_GPL(msi_device_has_isolated_msi);
+
+void msi_device_domain_restore_msi_msgs(struct device *dev, unsigned int domid)
+{
Wonderful!

Thanks,
Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help