[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <57C9024A16AD2D4C97DC78E552063EA3E3088733@orsmsx505.amr.corp.intel.com>
Date: Tue, 6 Oct 2009 17:17:55 -0700
From: "Kay, Allen M" <allen.m.kay@...el.com>
To: Chris Wright <chrisw@...s-sol.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"jbarnes@...tuousgeek.org" <jbarnes@...tuousgeek.org>,
"matthew@....cx" <matthew@....cx>,
"chris@...s-sol.org" <chris@...s-sol.org>,
"jeremy@...p.org" <jeremy@...p.org>
Subject: RE: [PATCH ACS v4 1/1] Enabling PCI ACS P2P upstream forwarding
Thanks Chris, I was not aware of these two functions. I have made the following change:
if (iommu_found() || xen_initial_domain())
pci_enable_acs(dev);
xen_intial_domain() should take care of dom0 case. We just make the rough assumption that P2P upstream forwarding is needed if we are running on top of xen HV - similar to what we are doing for native kernel case.
If this is ok, I'm going to re-spin the patch. Separate out xen_initial_domain() modification since it is predicated on Jeremy's xen.h patch.
-----Original Message-----
From: Chris Wright [mailto:chrisw@...s-sol.org]
Sent: Tuesday, October 06, 2009 4:42 PM
To: Kay, Allen M
Cc: linux-kernel@...r.kernel.org; linux-pci@...r.kernel.org; jbarnes@...tuousgeek.org; matthew@....cx; chris@...s-sol.org; jeremy@...p.org
Subject: Re: [PATCH ACS v4 1/1] Enabling PCI ACS P2P upstream forwarding
* Allen Kay (allen.m.kay@...el.com) wrote:
> +#ifdef CONFIG_DMAR
> +extern int iommu_detected;
> +#endif
This should not be needed.
> +
> +#ifdef CONFIG_XEN
> +extern int xen_domain_type;
> +#endif
Nor this (there's already a check for is dom0 called xen_initial_domain(),
but unclear it's relevant yet for this patch).
> +
> + /* Enable ACS P2P upstream forwarding if HW iommu is detected */
> + if (iommu_detected)
I think you'd want iommu_found() instead. To avoid, e.g., GART
triggering this one.
> + pci_enable_acs(dev);
> +
> +#ifdef CONFIG_XEN
> + /* HW iommu is not visible in xen dom0 */
> + if (xen_domain_type)
> + pci_enable_acs(dev);
could do this (xen_initial_domain()) above, but it's only relevant for
dom0 (so not needed yet?), and really seems to like it should be done by hv.
thanks,
-chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists