Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968949AbdD0VDf (ORCPT ); Thu, 27 Apr 2017 17:03:35 -0400 Received: from 8bytes.org ([81.169.241.247]:36125 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966071AbdD0VD2 (ORCPT ); Thu, 27 Apr 2017 17:03:28 -0400 Date: Thu, 27 Apr 2017 23:03:25 +0200 From: Joerg Roedel To: Gerald Schaefer Cc: Sebastian Ott , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support Message-ID: <20170427210325.GE1332@8bytes.org> References: <1493306905-32334-1-git-send-email-joro@8bytes.org> <20170427201018.70c8be5a@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170427201018.70c8be5a@thinkpad> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1076 Lines: 29 Hi Gerald, thanks for your reply. I have some more questions, please see below. On Thu, Apr 27, 2017 at 08:10:18PM +0200, Gerald Schaefer wrote: > Well, there is a separate zpci_dev for each pci_dev on s390, > and each of those has its own separate dma-table (thus not shared). Is that true for all functions of a PCIe card, so does every function of a device has its own zpci_dev structure and thus its own DMA-table? My assumption came from the fact that the zpci_dev is read from pci_dev->sysdata, which is propagated there from the pci_bridge through the pci_root_bus structures. > Given this "separate zpci_dev for each pci_dev" situation, I don't > see what this update actually changes, compared to the previous code, > see also my comments to that patch. The add_device call-back is invoked for every function of a pci-device, because each function gets its own pci_dev structure. Also we usually group all functions of a PCI-device together into one iommu-group, because we don't trust that the device isolates its functions from each other. Regards, Joerg