Re: [RFC v4 07/14] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag

2016-02-29 Thread Eric Auger
Hi Thomas,
On 02/26/2016 07:06 PM, Thomas Gleixner wrote:
> On Fri, 26 Feb 2016, Eric Auger wrote:
> 
>> Let's introduce a new msi_domain_info flag value, MSI_FLAG_IRQ_REMAPPING
>> meant to tell the domain supports IRQ REMAPPING, also known as Interrupt
>> Translation Service. On Intel HW this capability is abstracted on IOMMU
>> side while on ARM it is abstracted on MSI controller side.
>>
>> GICv3 ITS HW is the first HW advertising that feature.
> 
> No. We add the flag, epxlain what it does and then in a second step add the
> user _after_ all other preliminaries are implemented.
Sure I will proceed that way.

Best Regards

Eric
>  
> Thanks,
> 
>   tglx
> 

___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


Re: [RFC v4 07/14] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag

2016-02-26 Thread Thomas Gleixner
On Fri, 26 Feb 2016, Eric Auger wrote:

> Let's introduce a new msi_domain_info flag value, MSI_FLAG_IRQ_REMAPPING
> meant to tell the domain supports IRQ REMAPPING, also known as Interrupt
> Translation Service. On Intel HW this capability is abstracted on IOMMU
> side while on ARM it is abstracted on MSI controller side.
> 
> GICv3 ITS HW is the first HW advertising that feature.

No. We add the flag, epxlain what it does and then in a second step add the
user _after_ all other preliminaries are implemented.
 
Thanks,

tglx
___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


[RFC v4 07/14] msi: Add a new MSI_FLAG_IRQ_REMAPPING flag

2016-02-26 Thread Eric Auger
Let's introduce a new msi_domain_info flag value, MSI_FLAG_IRQ_REMAPPING
meant to tell the domain supports IRQ REMAPPING, also known as Interrupt
Translation Service. On Intel HW this capability is abstracted on IOMMU
side while on ARM it is abstracted on MSI controller side.

GICv3 ITS HW is the first HW advertising that feature.

Signed-off-by: Eric Auger 
---
 drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 ++-
 include/linux/msi.h  | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c 
b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
index aee60ed..8223765 100644
--- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
@@ -96,7 +96,8 @@ static struct msi_domain_ops its_pci_msi_ops = {
 
 static struct msi_domain_info its_pci_msi_domain_info = {
.flags  = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS |
-  MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX),
+  MSI_FLAG_MULTI_PCI_MSI | MSI_FLAG_PCI_MSIX |
+  MSI_FLAG_IRQ_REMAPPING),
.ops= _pci_msi_ops,
.chip   = _msi_irq_chip,
 };
diff --git a/include/linux/msi.h b/include/linux/msi.h
index a2a0068..03eda72 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -261,6 +261,8 @@ enum {
MSI_FLAG_MULTI_PCI_MSI  = (1 << 3),
/* Support PCI MSIX interrupts */
MSI_FLAG_PCI_MSIX   = (1 << 4),
+   /* Support MSI IRQ remapping service */
+   MSI_FLAG_IRQ_REMAPPING  = (1 << 5),
 };
 
 int msi_domain_set_affinity(struct irq_data *data, const struct cpumask *mask,
-- 
1.9.1

___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm