Received: by 10.223.185.116 with SMTP id b49csp579567wrg; Wed, 14 Feb 2018 03:50:53 -0800 (PST) X-Google-Smtp-Source: AH8x225TjkYJUaa2lc0gP47zvKWXXZbzO1VwcKnksmGZAkw7lmplYrFwuTG4IlupnM9vpqWi7tMA X-Received: by 2002:a17:902:22e:: with SMTP id 43-v6mr4309543plc.384.1518609053539; Wed, 14 Feb 2018 03:50:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518609053; cv=none; d=google.com; s=arc-20160816; b=jAXVLmC19q3kXY7+L5wsQZAWUovaEecJGknDwmfgh0eoGnY+5h25tcTZfIfm0LP37w PehyhwcShhwxkZ+idjKTYOMfA3JGRpQOcX5tigDU46N6siTh3EVEQkM0/9pWFups7aII P1R3GlHBVkRsY+J0iLYRJFBme+KYwZM3IlDhWE1tBYcf/kE+P4fyceNldtrAEtQ7XsPc 5L6k+/njSTHswFU3tHO6zCd0azWpgN1SEzAE8gs8yntHjTVoP6otAv+WYzVPSiFfH/cT 2NkFjn9IoXzuU+rW2OF5A7W2kcCkzUuHVnuhsOYNu0CaqDyY/WMu0FV36EhvvtEqtHjQ ZZNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=/0BjpoSmM+ZIZgZxW14zH64gX2Jut+6w8eT73j/4zYc=; b=uAkyWEN1kRIXlEEMwZcmLg+M4NQ8wlj2DRwccVIc3m44ZBcgWvPSjLPxiN13v4lb3l Bi43rGY4Aj6tw7rwFuQxuGDpUOJSmSsX7llZsMZJ+T8xr2McK3qULhVMYXutneR9IUw1 MubO/0QJDE4S9jsVAdd7ogQk+qD5jzOjm8hpHvsXeT/2+KJXfhEYE7BTv2Cz3hxQ7myu iFi0P4vByd3F4lPEArnKlEaXWE301k4dIqfz43FyU/2g+5frnO5THqnG/UH01yWWFiEe VQDYGvnVUSXLX8qEjO61UF5xEaVxuF0l9GUwvKWmPAZoUe3J2lNEt01eqLynCA1w2SdQ SKEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=BUnyvatN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si824213pgb.64.2018.02.14.03.50.39; Wed, 14 Feb 2018 03:50:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=BUnyvatN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967560AbeBNLuA (ORCPT + 99 others); Wed, 14 Feb 2018 06:50:00 -0500 Received: from 8bytes.org ([81.169.241.247]:45570 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967378AbeBNLt7 (ORCPT ); Wed, 14 Feb 2018 06:49:59 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id D4076B86; Wed, 14 Feb 2018 12:49:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1518608997; bh=FKrb2rJ/gw7qSj3q0bG4MFjTs6MA+g30uCnzoO2z5LI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BUnyvatNconLDk6FzVpDaZAFgy0BqH4K3AFyYWV4Ehp11r4Ahc3A4bTcb8hsVTGDV wxihgZuyWGFrYhf8mbA+v6mrimJ5sS5cm33C+4wPgRdrM6QiYFSdVRzOxqiB4g4I9F JM4awhDcjaTz4ThlJ00NO8mZdY0HUJe6JUAyq7PkI9qouCm/ng3G97taRpQhA0e1rF kcCfRdJIXSZehi9EJtC3gzdK6PVGrMKAJtfDNUHvS+cN8POvBIsd3BdohYVm6W5TkX 5YvBJWM847JKqO3DOzTIkKm3ElWGN7wEj8RNWpLcbyqViU+X7/zENH7Ifce5exwuh+ rC4i5M21/XwFg== Date: Wed, 14 Feb 2018 12:49:57 +0100 From: Joerg Roedel To: "Hook, Gary" Cc: Gary R Hook , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/amd - Use dev_err to send events to the system log Message-ID: <20180214114957.GI16484@8bytes.org> References: <151736066756.21649.4739957712713863861.stgit@sosam4> <20180213132216.gyhndywyu23cdzbv@8bytes.org> <325d7406-e01b-f7a1-3da6-390b0cf9bc94@amd.com> <20180213160018.fg7baclgu5o5rgxc@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 13, 2018 at 02:24:56PM -0500, Hook, Gary wrote: > Without actually running a driver and getting some debug info, I'll just > say that my example compiled, the amd_iommu structure points to a pci_dev > which contains a device, and the two possibilities are likely equivalent. > > I'll vet that, of course, but working under the assumption that they are > equivalent, the question becomes, do you have a preference? They are not equivalent, your version points to the pci_dev containing the IOMMU, my version points to the (virtual) iommu-device for that particular iommu in the kernel. So the difference in the prefix is: your version: '0000:00:00.2:' vs. my version: 'ivhd0:' The latter is the better prefix, because it points to the iommu. A pci_dev can contain more than one iommu, so that prefix is not specific enough. I know that there is currently no hardware implementing multiple iommus on one pci_dev, but it is allowed according to the spec. Regards, Joerg