From: colin@horizon.com
To: alex.williamson@redhat.com, iommu@lists.linux-foundation.org,
linux-pci@vger.kernel.org
Cc: acooks@gmail.com, bhelgaas@google.com,
linux-kernel@vger.kernel.org, linux@horizon.com
Subject: Re: [PATCH v3 00/15] PCI/iommu: Fix DMA alias problems
Date: 16 May 2014 02:28:23 -0400 [thread overview]
Message-ID: <20140516062823.15105.qmail@ns.horizon.com> (raw)
In-Reply-To: <400175834.3289.65.camel@ul30vt.home>
Alex Williamson wrote:
> Wow, I didn't think that kind of broken was possible. Maybe instead of
> a bitmap of function aliases we could have a single devfn alias for a
> device. That means we'd only be able to support a single alias for a
> device, but since I don't think we've seen devices that use more than a
> single alias, maybe that's ok.
In my (never finished) patch set for the same problem, the first thing
I did was
diff --git a/include/linux/pci.h b/include/linux/pci.h
index a13d6825..7788870a 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -251,12 +251,13 @@ struct pci_dev {
struct proc_dir_entry *procent; /* device entry in /proc/bus/pci */
struct pci_slot *slot; /* Physical slot this device is in */
- unsigned int devfn; /* encoded device & function index */
unsigned short vendor;
unsigned short device;
unsigned short subsystem_vendor;
unsigned short subsystem_device;
unsigned int class; /* 3 bytes: (base,sub,prog-if) */
+ u8 devfn; /* encoded device & function index */
+ u8 devfn_quirk; /* zero is non-quirky */
u8 revision; /* PCI revision, low byte of class word */
u8 hdr_type; /* PCI header type (`multi' flag masked out) */
u8 pcie_cap; /* PCIe capability offset */
I encoded "devfn_quirk" as a delta to devfn, so that zero would mean
"no quirk", and no existing intialization would need changing.
next parent reply other threads:[~2014-05-16 6:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <400175834.3289.65.camel@ul30vt.home>
2014-05-16 6:28 ` colin [this message]
2014-05-10 15:02 [PATCH v3 00/15] PCI/iommu: Fix DMA alias problems Alex Williamson
2014-05-10 16:51 ` George Spelvin
[not found] ` <1400020520427-859747.post@n7.nabble.com>
2014-05-14 17:18 ` Alex Williamson
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=20140516062823.15105.qmail@ns.horizon.com \
--to=colin@horizon.com \
--cc=acooks@gmail.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@horizon.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).