All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xiantao Zhang <xiantao.zhang@intel.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: ATS and dependent features
Date: Tue, 4 Dec 2012 10:13:28 -0500	[thread overview]
Message-ID: <20121204151326.GB15404@phenom.dumpdata.com> (raw)
In-Reply-To: <50BDBE7902000078000AD8E1@nat28.tlf.novell.com>

On Tue, Dec 04, 2012 at 08:12:25AM +0000, Jan Beulich wrote:
> >>> On 04.12.12 at 02:29, "Zhang, Xiantao" <xiantao.zhang@intel.com> wrote:
> 
> > 
> >> -----Original Message-----
> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> Sent: Monday, December 03, 2012 3:55 PM
> >> To: Zhang, Xiantao
> >> Cc: xen-devel
> >> Subject: RE: ATS and dependent features
> >> 
> >> >>> On 30.11.12 at 13:29, "Zhang, Xiantao" <xiantao.zhang@intel.com>
> >> wrote:
> >> 
> >> >
> >> >> -----Original Message-----
> >> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> >> Sent: Thursday, November 29, 2012 5:28 PM
> >> >> To: Zhang, Xiantao
> >> >> Cc: xen-devel
> >> >> Subject: RE: ATS and dependent features
> >> >>
> >> >> >>> On 29.11.12 at 10:19, "Zhang, Xiantao" <xiantao.zhang@intel.com>
> >> >> wrote:
> >> >>
> >> >> >
> >> >> >> -----Original Message-----
> >> >> >> From: Jan Beulich [mailto:JBeulich@suse.com]
> >> >> >> Sent: Thursday, November 29, 2012 4:01 PM
> >> >> >> To: Zhang, Xiantao
> >> >> >> Cc: xen-devel
> >> >> >> Subject: RE: ATS and dependent features
> >> >> >>
> >> >> >> >>> On 29.11.12 at 02:07, "Zhang, Xiantao"
> >> >> >> >>> <xiantao.zhang@intel.com>
> >> >> >> wrote:
> >> >> >> > ATS should be a host feature controlled by iommu, and I don't
> >> >> >> > think
> >> >> >> > dom0 can control  it from Xen's architecture.
> >> >> >>
> >> >> >> "Can" or "should"? Because from all I can tell it currently clearly does.
> >> >> >
> >> >> > I mean Xen shouldn't  allow these capabilities can be detected by
> >> >> > dom0.  If it does, we need to fix it.
> >> >>
> >> >> It sort of hides it - all callers sit in the kernel's IOMMU code, and
> >> >> IOMMU detection is being prevented. So it looks like the code is
> >> >> simply dead when running on top of Xen.
> >> >
> >> > I'm curious why dom0's !Xen kernel option for these features can solve
> >> > the issue you met.
> >> 
> >> It doesn't "solve" the problem in that sense: As said, the code in question
> >> only has callers in IOMMU code, which itself is dependent on !XEN in our
> >> kernels (just to make clear - I'm talking about forward ported kernels here,
> >> not pv-ops ones). So upstream probably just has to live with that code being
> >> dead (at the moment, when run on top of Xen) and take the risk of there
> >> appearing a caller elsewhere.
> >> In our kernels, by making these options also dependent upon !XEN, we can
> >> then actually detect (and actively deal with) an eventual new caller
> >> elsewhere in the code, thus eliminating any risk of bad interaction between
> >> Dom0 and Xen.
> > 
> > I think !Xen you are talking is a compile option, so this kernel can only 
> > used for dom0 and can't run on native with these features enabled ?  If don't 
> > need to keep the kernel running on native hardware, I think it is fine. 
> 
> Yes, as said - this is for our forward ported kernel. Whether (and if
> so how) the pv-ops one can add a similar safeguard I can't tell (and
> doubt).

Right, in the upstream kernel that is not going to work. But I am a bit
confused - this code (pci_enable_ats) looks to be called only from the
intel and amd iommu code. Aren't those blacklisted (so DMAR MADT
is overwritten and AMD PCI device is witheld) so the calls aren't going
to be executed?

> 
> Jan
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
> 

  reply	other threads:[~2012-12-04 15:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  9:41 ATS and dependent features Jan Beulich
2012-11-29  1:07 ` Zhang, Xiantao
2012-11-29  8:00   ` Jan Beulich
2012-11-29  9:19     ` Zhang, Xiantao
2012-11-29  9:27       ` Jan Beulich
2012-11-30 12:29         ` Zhang, Xiantao
2012-12-03  7:55           ` Jan Beulich
2012-12-04  1:29             ` Zhang, Xiantao
2012-12-04  8:12               ` Jan Beulich
2012-12-04 15:13                 ` Konrad Rzeszutek Wilk [this message]
2012-12-04 15:18                   ` Jan Beulich

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=20121204151326.GB15404@phenom.dumpdata.com \
    --to=konrad@kernel.org \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    --cc=xiantao.zhang@intel.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.