[Patch V2 06/13] platform-msi: Add device MSI infrastructure

2021-02-26 Thread Megha Dey
MSI on platform MSI, the better variant is to reimplement platform MSI on top of device MSI. Reviewed-by: Tony Luck Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- drivers/base/platform-msi.c | 131 include/linux/irqdomain.h | 1

[Patch V2 11/13] platform-msi: Add platform check for subdevice irq domain

2021-02-26 Thread Megha Dey
@nanos.tec.linutronix.de/ Link: https://lore.kernel.org/linux-pci/877dqrnzr3@nanos.tec.linutronix.de/ Link: https://lore.kernel.org/linux-pci/877dqqmc2h@nanos.tec.linutronix.de/ Reviewed-by: Tony Luck Signed-off-by: Lu Baolu Signed-off-by: Megha Dey --- arch/x86/pci/common.c | 72

[Patch V2 09/13] iommu/vt-d: Add DEV-MSI support

2021-02-26 Thread Megha Dey
-by: Megha Dey --- drivers/iommu/intel/irq_remapping.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c index 611ef52..2a55e54 100644 --- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel

[Patch V2 00/13] Introduce dev-msi and interrupt message store

2021-02-26 Thread Megha Dey
iommu: Add capability IOMMU_CAP_VIOMMU_HINT platform-msi: Add platform check for subdevice irq domain Megha Dey (3): genirq: Set auxiliary data for an interrupt iommu/vt-d: Add DEV-MSI support irqchip: Add IMS (Interrupt Message Store) driver Thomas Gleixner (7): x86/irq: Add DEV_MSI allocation t

[Patch V2 13/13] genirq/msi: Provide helpers to return Linux IRQ/dev_msi hw IRQ number

2021-02-26 Thread Megha Dey
-by: Dave Jiang Signed-off-by: Megha Dey --- include/linux/msi.h | 2 ++ kernel/irq/msi.c| 44 2 files changed, 46 insertions(+) diff --git a/include/linux/msi.h b/include/linux/msi.h index 24abec0..d60a6ba 100644 --- a/include/linux/msi.h +++ b

[Patch V2 05/13] genirq/msi: Provide and use msi_domain_set_default_info_flags()

2021-02-26 Thread Megha Dey
From: Thomas Gleixner MSI interrupts have some common flags which should be set not only for PCI/MSI interrupts. Move the PCI/MSI flag setting into a common function so it can be reused. Reviewed-by: Tony Luck Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- drivers/pci/msi.c

[Patch V2 07/13] irqdomain/msi: Provide msi_alloc/free_store() callbacks

2021-02-26 Thread Megha Dey
separate callbacks which operate on struct device. The resulting storage information has to be stored in struct msi_desc so the underlying irq chip implementation can retrieve it for the relevant operations. Reviewed-by: Tony Luck Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- include

[Patch V2 03/13] platform-msi: Provide default irq_chip:: Ack

2021-02-26 Thread Megha Dey
From: Thomas Gleixner For the upcoming device MSI support it's required to have a default irq_chip::ack implementation (irq_chip_ack_parent) so the drivers do not need to care. Reviewed-by: Tony Luck Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- drivers/base/platform-msi.c | 2

[Patch V2 12/13] irqchip: Add IMS (Interrupt Message Store) driver

2021-02-26 Thread Megha Dey
Added reads after writes to flush writes to device Added set_desc ops to IMS msi domain ops Tested the IMS infrastructure with the IDXD driver] Reviewed-by: Tony Luck Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- drivers/irqchip/Kconfig | 14

[Patch V2 04/13] genirq/proc: Take buslock on affinity write

2021-02-26 Thread Megha Dey
-by: Thomas Gleixner Signed-off-by: Megha Dey --- kernel/irq/manage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index dec3f73..85ede4e 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -443,16 +443,16 @@ int

[Patch V2 10/13] iommu: Add capability IOMMU_CAP_VIOMMU_HINT

2021-02-26 Thread Megha Dey
outside of the IOMMU subsystem, where it could be used with other known means (CPUID, smbios) to sense whether Linux is running in a virtualized environment. Add a capability bit so that it could be used there. Cc: Joerg Roedel Reviewed-by: Tony Luck Signed-off-by: Lu Baolu Signed-off-by: Megha Dey

[Patch V2 08/13] genirq: Set auxiliary data for an interrupt

2021-02-26 Thread Megha Dey
(introduced in a later patch) and that data are not typically present in MSI entry. Reviewed-by: Tony Luck Signed-off-by: Megha Dey --- include/linux/interrupt.h | 2 ++ include/linux/irq.h | 4 kernel/irq/manage.c | 32 3 files changed, 38 insertions

[Patch V2 02/13] x86/msi: Rename and rework pci_msi_prepare() to cover non-PCI MSI

2021-02-26 Thread Megha Dey
. One arch specific function for MSI support is truly enough. Reviewed-by: Tony Luck Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- arch/x86/include/asm/msi.h | 4 +++- arch/x86/kernel/apic/msi.c | 27 --- drivers/pci/controller/pci-hyperv.c

[Patch V2 01/13] x86/irq: Add DEV_MSI allocation type

2021-02-26 Thread Megha Dey
From: Thomas Gleixner For the upcoming device MSI support a new allocation type is required. Reviewed-by: Tony Luck Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- arch/x86/include/asm/hw_irq.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/hw_irq.h b

[PATCH 12/12] irqchip: Add IMS (Interrupt Message Store) driver

2021-02-03 Thread Megha Dey
of IMS_VECTOR_CTRL Added reads after writes to flush writes to device Added set_desc ops to IMS msi domain ops Tested the IMS infrastructure with the IDXD driver] Reviewed-by: Tony Luck Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- drivers/irqchip/Kconfig

[PATCH 06/12] platform-msi: Add device MSI infrastructure

2021-02-03 Thread Megha Dey
MSI on platform MSI, the better variant is to reimplement platform MSI on top of device MSI. Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- drivers/base/platform-msi.c | 131 include/linux/irqdomain.h | 1 + include/linux/msi.h

[PATCH 09/12] iommu/vt-d: Add DEV-MSI support

2021-02-03 Thread Megha Dey
-by: Megha Dey --- drivers/iommu/intel/irq_remapping.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c index 685200a..18f1b53 100644 --- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel

[PATCH 11/12] platform-msi: Add platform check for subdevice irq domain

2021-02-03 Thread Megha Dey
@nanos.tec.linutronix.de/ Link: https://lore.kernel.org/linux-pci/877dqrnzr3@nanos.tec.linutronix.de/ Link: https://lore.kernel.org/linux-pci/877dqqmc2h@nanos.tec.linutronix.de/ Signed-off-by: Lu Baolu Signed-off-by: Megha Dey --- arch/x86/pci/common.c | 74

[PATCH 02/12] x86/msi: Rename and rework pci_msi_prepare() to cover non-PCI MSI

2021-02-03 Thread Megha Dey
. One arch specific function for MSI support is truly enough. Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- arch/x86/include/asm/msi.h | 4 +++- arch/x86/kernel/apic/msi.c | 27 --- drivers/pci/controller/pci-hyperv.c | 2 +- include/linux

[PATCH 10/12] iommu: Add capability IOMMU_CAP_VIOMMU_HINT

2021-02-03 Thread Megha Dey
outside of the IOMMU subsystem, where it could be used with other known means (CPUID, smbios) to sense whether Linux is running in a virtualized environment. Add a capability bit so that it could be used there. Signed-off-by: Lu Baolu Signed-off-by: Megha Dey --- drivers/iommu/amd/iommu.c| 2

[PATCH 07/12] irqdomain/msi: Provide msi_alloc/free_store() callbacks

2021-02-03 Thread Megha Dey
separate callbacks which operate on struct device. The resulting storage information has to be stored in struct msi_desc so the underlying irq chip implementation can retrieve it for the relevant operations. Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- include/linux/msi.h | 8

[PATCH 00/12] Introduce dev-msi and interrupt message store

2021-02-03 Thread Megha Dey
rnel.org/linux-pci/20210106022749.2769057-1-baolu...@linux.intel.com/ Lu Baolu (2): iommu: Add capability IOMMU_CAP_VIOMMU_HINT platform-msi: Add platform check for subdevice irq domain Megha Dey (2): genirq: Set auxiliary data for an interrupt iommu/vt-d: Add DEV-MSI support Thomas Gleixner (8): x8

[PATCH 08/12] genirq: Set auxiliary data for an interrupt

2021-02-03 Thread Megha Dey
(introduced in a later patch) and that data are not typically present in MSI entry. Reviewed-by: Tony Luck Signed-off-by: Megha Dey --- include/linux/interrupt.h | 2 ++ include/linux/irq.h | 4 kernel/irq/manage.c | 32 3 files changed, 38 insertions

[PATCH 05/12] genirq/msi: Provide and use msi_domain_set_default_info_flags()

2021-02-03 Thread Megha Dey
From: Thomas Gleixner MSI interrupts have some common flags which should be set not only for PCI/MSI interrupts. Move the PCI/MSI flag setting into a common function so it can be reused. Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- drivers/pci/msi.c | 7 +-- include

[PATCH 01/12] x86/irq: Add DEV_MSI allocation type

2021-02-03 Thread Megha Dey
From: Thomas Gleixner For the upcoming device MSI support a new allocation type is required. Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- arch/x86/include/asm/hw_irq.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm

[PATCH 03/12] platform-msi: Provide default irq_chip:: Ack

2021-02-03 Thread Megha Dey
From: Thomas Gleixner For the upcoming device MSI support it's required to have a default irq_chip::ack implementation (irq_chip_ack_parent) so the drivers do not need to care. Signed-off-by: Thomas Gleixner Signed-off-by: Megha Dey --- drivers/base/platform-msi.c | 2 ++ 1 file changed, 2

[PATCH 04/12] genirq/proc: Take buslock on affinity write

2021-02-03 Thread Megha Dey
Signed-off-by: Megha Dey --- kernel/irq/manage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index dec3f73..85ede4e 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -443,16 +443,16 @@ int irq_update_affinity_desc

[Patch V1 1/2] iommu/vt-d: Fix debugfs register reads

2020-03-09 Thread Megha Dey
rrect read function variant (dmar_readl/dmar_readq) while reading the contents of 32/64 bit registers respectively. Signed-off-by: Megha Dey --- drivers/iommu/intel-iommu-debugfs.c | 40 +++-- include/linux/intel-iommu.h | 2 ++ 2 files changed, 27 inserti

[Patch V1 0/2] iommu/vtd: Fixes to the IOMMU debugfs

2020-03-09 Thread Megha Dey
remapping is disabled. Megha Dey (2): iommu/vt-d: Fix debugfs register reads iommu/vt-d: Populate debugfs if IOMMUs are detected drivers/iommu/intel-iommu-debugfs.c | 53 ++--- drivers/iommu/intel-iommu.c | 4 ++- include/linux/intel-iommu.h

[Patch V1 2/2] iommu/vt-d: Populate debugfs if IOMMUs are detected

2020-03-09 Thread Megha Dey
-off-by: Megha Dey --- drivers/iommu/intel-iommu-debugfs.c | 13 + drivers/iommu/intel-iommu.c | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu-debugfs.c b/drivers/iommu/intel-iommu-debugfs.c index 0a77919..8d24c4d 100644