From: Weidong Han <weidong.han@intel.com>
To: Nick Couchman <Nick.Couchman@seakr.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"konrad.wilk@Oracle.Com" <konrad.wilk@Oracle.Com>
Subject: Re: PCI Passthrough Problems/Questions
Date: Wed, 03 Nov 2010 09:01:26 +0800 [thread overview]
Message-ID: <4CD0B466.6000606@intel.com> (raw)
In-Reply-To: <4CD00CF802000099000BAF8E@collaborate.seakr.com>
[-- Attachment #1: Type: text/plain, Size: 751 bytes --]
Nick Couchman wrote:
>>>
>>>
>> The logs look no problem. I'm wondering if the device implies PCI
>> standard. At last, I think you can try: only assign 02:00.0
>> (pci=[02:00.0]), or assign them as multiple devices in guest
>> (pci=[02:00.0-1]).
>>
>> Regards,
>> Weidong
>>
>
> Should have tried that on my own. Forwarding just 02:00.0 through
> worked just fine!
>
> So, the patch you had me apply to the Xen 4 source - is that a final
> version of the patch, or is there still some work to do to come up with
> a final fix for this?
>
>
The patch is just for your testing. I think Jan's patch should fix the
issue. Jan sent it out in xen-devel mailing list yesterday, I attached
it here, pls try with it.
Regards,
Weidong
[-- Attachment #2: vtd-check-secbus-devfn.patch --]
[-- Type: text/plain, Size: 1750 bytes --]
If the device at <secbus>:00.0 is the device the mapping operation was
initiated for, trying to map it a second time will fail, and hence
this second mapping attempt must be prevented (as was done prior to
said c/s).
Once at it, simplify the code a little, too.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1371,23 +1371,16 @@ static int domain_context_mapping(struct
if ( find_upstream_bridge(&bus, &devfn, &secbus) < 1 )
break;
- /* PCIe to PCI/PCIx bridge */
- if ( pdev_type(bus, devfn) == DEV_TYPE_PCIe2PCI_BRIDGE )
- {
- ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn);
- if ( ret )
- return ret;
+ ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn);
- /*
- * Devices behind PCIe-to-PCI/PCIx bridge may generate
- * different requester-id. It may originate from devfn=0
- * on the secondary bus behind the bridge. Map that id
- * as well.
- */
+ /*
+ * Devices behind PCIe-to-PCI/PCIx bridge may generate different
+ * requester-id. It may originate from devfn=0 on the secondary bus
+ * behind the bridge. Map that id as well if we didn't already.
+ */
+ if ( !ret && pdev_type(bus, devfn) == DEV_TYPE_PCIe2PCI_BRIDGE &&
+ (secbus != pdev->bus || pdev->devfn != 0) )
ret = domain_context_mapping_one(domain, drhd->iommu, secbus, 0);
- }
- else /* Legacy PCI bridge */
- ret = domain_context_mapping_one(domain, drhd->iommu, bus, devfn);
break;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-11-03 1:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 14:01 PCI Passthrough Problems/Questions Nick Couchman
2010-10-29 2:54 ` Weidong Han
2010-10-29 18:52 ` Nick Couchman
2010-11-02 3:30 ` Weidong Han
2010-11-02 19:07 ` Nick Couchman
2010-11-03 1:01 ` Weidong Han [this message]
2010-11-03 14:54 ` Nick Couchman
[not found] <4CC8A62602000099000BAA42@collaborate.seakr.com>
2010-10-28 4:37 ` Han, Weidong
-- strict thread matches above, loose matches on Subject: below --
2010-10-25 16:35 Nick Couchman
2010-10-25 17:40 ` Konrad Rzeszutek Wilk
2010-10-25 18:33 ` Nick Couchman
2010-10-25 18:48 ` Konrad Rzeszutek Wilk
2010-10-25 18:50 ` Nick Couchman
2010-10-25 19:07 ` Konrad Rzeszutek Wilk
2010-10-25 19:45 ` Nick Couchman
2010-10-25 20:11 ` Nick Couchman
2010-10-27 6:40 ` Weidong Han
2010-10-27 15:07 ` Nick Couchman
2010-10-28 2:31 ` Weidong Han
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=4CD0B466.6000606@intel.com \
--to=weidong.han@intel.com \
--cc=Nick.Couchman@seakr.com \
--cc=konrad.wilk@Oracle.Com \
--cc=xen-devel@lists.xensource.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 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.