From patchwork Wed Jul 25 14:03:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10544059 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA7E7180E for ; Wed, 25 Jul 2018 14:03:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C99FC2A15C for ; Wed, 25 Jul 2018 14:03:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7B822A137; Wed, 25 Jul 2018 14:03:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SUSPICIOUS_RECIPS autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20FD228871 for ; Wed, 25 Jul 2018 14:03:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727691AbeGYPPY (ORCPT ); Wed, 25 Jul 2018 11:15:24 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:36742 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727504AbeGYPPY (ORCPT ); Wed, 25 Jul 2018 11:15:24 -0400 Received: from ramsan.of.borg ([84.194.111.163]) by albert.telenet-ops.be with bizsmtp id F23Z1y00Q3XaVaC0623ZtN; Wed, 25 Jul 2018 16:03:33 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1fiKO5-0004bE-HU; Wed, 25 Jul 2018 16:03:33 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1fiKO5-00029f-Ft; Wed, 25 Jul 2018 16:03:33 +0200 From: Geert Uytterhoeven To: Magnus Damm Cc: Laurent Pinchart , Wolfram Sang , Kieran Bingham , linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC] iommu/ipmmu-vmsa: Whitelist SATA for IOMMU use and virtualization Date: Wed, 25 Jul 2018 16:03:24 +0200 Message-Id: <20180725140324.8239-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP SATA on R-Car H3 ES2.0 works fine with the IOMMU. This is also needed for virtualization. Signed-off-by: Geert Uytterhoeven --- For testing virtualization, this patch and all prerequisites are available in the topic/rcar3-virt-gpio-passthrough-v3 branch of my git repository at git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git. drivers/iommu/ipmmu-vmsa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index ef566b4989d6e2f8..f6f7b7e8cb982769 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -751,6 +751,9 @@ static int ipmmu_init_platform_device(struct device *dev, static bool ipmmu_slave_whitelist(struct device *dev) { + if (!strcmp(dev_name(dev), "ee300000.sata")) + return true; + /* By default, do not allow use of IPMMU */ return false; }