From: David Kiarie <davidkiarie4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org
Cc: valentine.sinitsyn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
jankiskza-S0/GAf8tV78@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: IVDB DTE_ALL Settings
Date: Tue, 4 Aug 2015 05:57:45 +0300 [thread overview]
Message-ID: <20150804025745.GA4128@debian.debian> (raw)
I hope am not messing something up,...
The Linux AMD IOMMU driver does not seem to be applying DTE settings listed in the ALL field correctly.
The relevant code:
switch (e->type) {
case IVHD_DEV_ALL:
DUMP_printk(" DEV_ALL\t\t\t first devid: %02x:%02x.%x"
" last device %02x:%02x.%x flags: %02x\n",
PCI_BUS_NUM(iommu->first_device),
PCI_SLOT(iommu->first_device),
PCI_FUNC(iommu->first_device),
PCI_BUS_NUM(iommu->last_device),
PCI_SLOT(iommu->last_device),
PCI_FUNC(iommu->last_device),
e->flags);
for (dev_i = iommu->first_device;
dev_i <= iommu->last_device; ++dev_i)
set_dev_entry_from_acpi(iommu, dev_i,
e->flags, 0);
break;
case IVHD_DEV_SELECT:
Basically, the iommu->last/first_device fields are initialized in another state of the driver much later in the code(during PCI initialization); the values
iommu->first/last_device are used before initialization which breaks the logic of this code.
On the other hand, this might be a lame bug as I have not seen any IOMMU using the ALL settings but I haven't seen many.
Cheers,
David.
next reply other threads:[~2015-08-04 2:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-04 2:57 David Kiarie [this message]
[not found] ` <20150804025745.GA4128-FBVcP3zgNXf1IFe7KZLm3A@public.gmane.org>
2015-08-04 16:56 ` IVDB DTE_ALL Settings Joerg Roedel
[not found] ` <20150804165619.GP14980-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2015-08-04 17:05 ` Valentine Sinitsyn
[not found] ` <55C0F0E9.6030902-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-08-05 9:48 ` Joerg Roedel
[not found] ` <20150805094836.GR14980-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2015-08-05 9:53 ` Valentine Sinitsyn
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=20150804025745.GA4128@debian.debian \
--to=davidkiarie4-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=jankiskza-S0/GAf8tV78@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=valentine.sinitsyn-Re5JQEeQqe8AvxtiuMwx3w@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.