Skip to contentSkip to conversation

um: MSI parent domain conversion

PATCH In review Nam Cao 3 participants 6 messages Jun 30, 2025 – Jul 4, 2025 User-mode Linux (UML)

lore
Share & tools
lore

Nam Cao

author
#0 lore raw

v2 cover um: MSI parent domain conversion

The initial implementation of PCI/MSI interrupt domains in the hierarchical interrupt domain model used a shortcut by providing a global PCI/MSI domain.

This works because the PCI/MSI[X] hardware is standardized and uniform, but it violates the basic design principle of hierarchical interrupt domains:
Each hardware block involved in the interrupt delivery chain should have a separate interrupt domain.

For PCI/MSI[X], the interrupt controller is per PCI device and not a global made-up entity.

Unsurprisingly, the shortcut turned out to have downsides as it does not allow dynamic allocation of interrupt vectors after initialization and it prevents supporting IMS on PCI. For further details, see:

https://lore.kernel.org/lkml/[email protected]/

The solution is implementing per device MSI domains, this means the entities which provide global PCI/MSI domain so far have to implement MSI parent domain functionality instead.

This series converts the um's driver to implement MSI parent domain.

 arch/um/drivers/Kconfig    |  1 +
 arch/um/drivers/virt-pci.c | 45 +++++++++++++++++++-------------------
 2 files changed, 23 insertions(+), 23 deletions(-)
Signature · 1 line
2.39.5
author
#1 lore raw

PATCH v2 1/1 um: virt-pci: Switch to msi_create_parent_irq_domain()

Move away from the legacy MSI domain setup, switch to use msi_create_parent_irq_domain().

---
v2: Remove MSI_FLAG_PCI_MSI_MASK_PARENT to fix a NULL pointer deref

---
 arch/um/drivers/Kconfig    |  1 +
 arch/um/drivers/virt-pci.c | 45 +++++++++++++++++++-------------------
 2 files changed, 23 insertions(+), 23 deletions(-)
arch/um/drivers/Kconfig +1 -0
index 34085bfc6d416..6a0354ca032fb 100644
@@ -160,6 +160,7 @@ config UML_RTC
 config UML_PCI
 	bool
 	select FORCE_PCI
+	select IRQ_MSI_LIB
 	select UML_IOMEM_EMULATION
 	select UML_DMA_EMULATION
 	select PCI_MSI
arch/um/drivers/virt-pci.c +22 -23

80 lines not on this page · raw message

Signature · 1 line
2.39.5
maintainer Acked-by Tested-by on v2 1/1
#2 lore raw

Re: [PATCH v2 1/1] um: virt-pci: Switch to msi_create_parent_irq_domain()

Quoted 3 lines · Nam Cao

Move away from the legacy MSI domain setup, switch to use msi_create_parent_irq_domain().

Do you want this to go through the UML tree, or is it a dependency somewhere else? In the latter case, I suppose you can add

johannes

author
#3 lore raw

Re: [PATCH v2 1/1] um: virt-pci: Switch to msi_create_parent_irq_domain()

Quoted 7 lines · Johannes Berg
Quoted 3 lines · Nam Cao

Move away from the legacy MSI domain setup, switch to use msi_create_parent_irq_domain().

Do you want this to go through the UML tree, or is it a dependency somewhere else? In the latter case, I suppose you can add

Please take it into the UML tree.

Quoted 2 lines

Thanks!
Nam

#4 lore raw

Re: [PATCH v2 1/1] um: virt-pci: Switch to msi_create_parent_irq_domain()

Johannes,

Quoted 13 lines · Nam Cao
Quoted 7 lines · Johannes Berg
Quoted 3 lines · Nam Cao

Move away from the legacy MSI domain setup, switch to use msi_create_parent_irq_domain().

Do you want this to go through the UML tree, or is it a dependency somewhere else? In the latter case, I suppose you can add

Please take it into the UML tree.

Quoted 2 lines

are you picking this up or want me to queue it?

Thanks,

tglx

maintainer
#5 lore raw

Re: [PATCH v2 1/1] um: virt-pci: Switch to msi_create_parent_irq_domain()

Quoted 12 lines · Thomas Gleixner

Johannes,

Quoted 9 lines · Nam Cao
Quoted 7 lines · Johannes Berg
Quoted 3 lines · Nam Cao

Move away from the legacy MSI domain setup, switch to use msi_create_parent_irq_domain().

Do you want this to go through the UML tree, or is it a dependency somewhere else? In the latter case, I suppose you can add

Quoted 6 lines
Quoted 4 lines

Please take it into the UML tree.

Quoted 2 lines

are you picking this up or want me to queue it?

I've picked it up for uml-next now:

https://git.kernel.org/pub/scm/linux/kernel/git/uml/linux.git/commit/?h=next&id=1528fd400c62b84b9c0e368a62b83fbd9d6fb92b

johannes