Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932401AbdGSLZy (ORCPT ); Wed, 19 Jul 2017 07:25:54 -0400 Received: from foss.arm.com ([217.140.101.70]:38362 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932235AbdGSLZs (ORCPT ); Wed, 19 Jul 2017 07:25:48 -0400 Subject: Re: [PATCH 0/5] FlexRM support in VFIO platform To: Anup Patel Cc: Will Deacon , Joerg Roedel , Baptiste Reynal , Alex Williamson , Scott Branden , Linux Kernel , Linux ARM Kernel , Linux IOMMU , kvm@vger.kernel.org, BCM Kernel Feedback References: <1500456838-18405-1-git-send-email-anup.patel@broadcom.com> <0dc860ed-a40c-1bfd-f584-225807edb25b@arm.com> From: Robin Murphy Message-ID: Date: Wed, 19 Jul 2017 12:25:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1341 Lines: 33 On 19/07/17 12:17, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:27 PM, Robin Murphy wrote: >> On 19/07/17 10:33, Anup Patel wrote: >>> This patchset primarily adds Broadcom FlexRM reset module for >>> VFIO platform driver. We also have minor improvments in IOMMU >>> and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. >> >> I'm struggling to understand the IOMMU changes here - what's the >> FlexRM's hardware relationship with the IOMMU, and how is it different >> from any other device? Furthermore, if there *is* a relevant IOMMU >> present, why would no-IOMMU mode need to be involved at all? > > We want to have FlexRM device accessible from user-space > using VFIO platform with and without IOMMU. > > Currently, if IOMMU ops are available for platform bus then > I cannot access FlexRM device using VFIO no-IOMMU mode. So does the FlexRM hardware master through the SMMU or not? If it does, why do you need no-IOMMU mode? If it doesn't, then that's yet another reason to fix the real problem, which is the utterly broken notion of there being 'an IOMMU' on the platform 'bus', rather than papering over it in VFIO. Robin. > Since, SMMU can bypass transactions which do not match > any SMRs, we should allow no-IOMMU mode for devices > when IOMMU group is not available. > > Regards, > Anup >