From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: "Hook, Gary" <ghook-5C7GfCeVMHo@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] iommu/amd - Use dev_err to send events to the system log
Date: Wed, 14 Feb 2018 12:49:57 +0100 [thread overview]
Message-ID: <20180214114957.GI16484@8bytes.org> (raw)
In-Reply-To: <f7e7e2c2-c83d-9c4a-f3ac-5c351576b567-5C7GfCeVMHo@public.gmane.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
WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: "Hook, Gary" <ghook@amd.com>
Cc: Gary R Hook <gary.hook@amd.com>,
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
Date: Wed, 14 Feb 2018 12:49:57 +0100 [thread overview]
Message-ID: <20180214114957.GI16484@8bytes.org> (raw)
In-Reply-To: <f7e7e2c2-c83d-9c4a-f3ac-5c351576b567@amd.com>
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
next prev parent reply other threads:[~2018-02-14 11:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 1:04 [PATCH] iommu/amd - Use dev_err to send events to the system log Gary R Hook
2018-01-31 1:04 ` Gary R Hook
2018-02-13 13:22 ` Joerg Roedel
2018-02-13 15:47 ` Hook, Gary
2018-02-13 16:00 ` Joerg Roedel
2018-02-13 19:24 ` Hook, Gary
[not found] ` <f7e7e2c2-c83d-9c4a-f3ac-5c351576b567-5C7GfCeVMHo@public.gmane.org>
2018-02-14 11:49 ` Joerg Roedel [this message]
2018-02-14 11:49 ` Joerg Roedel
[not found] ` <20180214114957.GI16484-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2018-02-14 14:58 ` Hook, Gary
2018-02-14 14:58 ` Hook, Gary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180214114957.GI16484@8bytes.org \
--to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
--cc=ghook-5C7GfCeVMHo@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.