lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 31 Mar 2019 15:34:09 +0300
From:   Hanna Hawa <hhhawa@...zon.com>
To:     <tsahee@...apurnalabs.com>, <antoine.tenart@...tlin.com>,
        <linux@...linux.org.uk>, <catalin.marinas@....com>,
        <will.deacon@....com>, <rjw@...ysocki.net>, <lenb@...nel.org>,
        <tglx@...utronix.de>, <jason@...edaemon.net>,
        <marc.zyngier@....com>
CC:     <ronenk@...zon.com>, <dwmw@...zon.co.uk>, <vaerov@...zon.com>,
        <zeev@...zon.com>, <alisaidi@...zon.com>, <talel@...zon.com>,
        <hhhawa@...zon.com>, <jonnyc@...zon.com>, <hanochu@...zon.com>,
        <barakw@...zon.com>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <linux-acpi@...r.kernel.org>
Subject: [PATCH 1/7] irqchip/alpine-msi: Call IOMMU DMA mapping MSI message hook

Add missing IOMMU DMA mapping MSI message hook in compose_msi_msg()
callback for Alpine MSIx driver, to map the MSI physical address to
IOMMU IOVA for any device attached to IOMMU DMA ops domains.

Signed-off-by: Hanna Hawa <hhhawa@...zon.com>
Co-developed-by: Vladimir Aerov <vaerov@...zon.com>
Signed-off-by: Vladimir Aerov <vaerov@...zon.com>
---
 drivers/irqchip/irq-alpine-msi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index 23a3b87..ae2fca7 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -12,6 +12,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/dma-iommu.h>
 #include <linux/irqchip.h>
 #include <linux/irqchip/arm-gic.h>
 #include <linux/msi.h>
@@ -99,6 +100,12 @@ static void alpine_msix_compose_msi_msg(struct irq_data *data,
 	msg->address_hi = upper_32_bits(msg_addr);
 	msg->address_lo = lower_32_bits(msg_addr);
 	msg->data = 0;
+
+	/*
+	 * Mapping MSI address to IOMMU IOVA, relevant for devices associated
+	 * with IOMMU DMA ops domain.
+	 */
+	iommu_dma_map_msi_msg(data->irq, msg);
 }
 
 static struct msi_domain_info alpine_msix_domain_info = {
-- 
2.7.4

Powered by blists - more mailing lists