All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Kevin Tian <kevin.tian@intel.com>,
	Paul Durrant <paul.durrant@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: [PATCH] x86/vtd: fix IOMMU share PT destruction path
Date: Tue, 09 Oct 2018 07:11:42 -0600	[thread overview]
Message-ID: <5BBCA90E02000078001F0063@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20181009125727.f5pxjc56vpkdhgr7@mac.bytemobile.com>

>>> On 09.10.18 at 14:57, <roger.pau@citrix.com> wrote:
> On Tue, Oct 09, 2018 at 12:22:34PM +0100, Paul Durrant wrote:
>> > -----Original Message-----
>> > From: Wei Liu [mailto:wei.liu2@citrix.com]
>> > Sent: 09 October 2018 11:42
>> > To: xen-devel@lists.xenproject.org 
>> > Cc: Jan Beulich <JBeulich@suse.com>; Roger Pau Monne
>> > <roger.pau@citrix.com>; Paul Durrant <Paul.Durrant@citrix.com>; Wei Liu
>> > <wei.liu2@citrix.com>; Kevin Tian <kevin.tian@intel.com>
>> > Subject: [PATCH] x86/vtd: fix IOMMU share PT destruction path
>> > 
>> > Commit 2916951c1 ("mm / iommu: include need_iommu() test in
>> > iommu_use_hap_pt()") included need_iommu() in iommu_use_hap_pt and
>> > 91d4eca7add (" mm / iommu: split need_iommu() into has_iommu_pt() and
>> > need_iommu_pt_sync()") made things finer grain by spliting need_iommu
>> > into three states.
>> > 
>> > The destruction path can't use iommu_use_hap_pt because at the point
>> > platform op is called, IOMMU is already switched to disabled state and
>> > the shared PT test would always be false.
>> > 
>> 
>> This is VT-d specific and the issue could affect AMD too. Can't you just 
> switch round the call to teardown and setting IOMMU_status_disabled in 
> xen/drivers/passthrough/iommu.c:iommu_teardown()?
> 
> AMD doesn't support shared page tables so far, but in order to avoid
> having to debug this again if AMD ever gains support for shared page
> tables I think switching the order in iommu_teardown might be better.

I think we've pretty much ruled out AMD ever re-gaining such
sharing functionality. In fact I thought we had settled that the
dead code relating to this functionality could be ripped out, if
anyone could carve out the time needed for doing so.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-10-09 13:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 10:42 [PATCH] x86/vtd: fix IOMMU share PT destruction path Wei Liu
2018-10-09 11:22 ` Paul Durrant
2018-10-09 11:38   ` Paul Durrant
2018-10-09 12:58     ` Wei Liu
2018-10-09 13:37       ` Wei Liu
2018-10-09 14:29         ` Paul Durrant
2018-10-09 12:57   ` Roger Pau Monné
2018-10-09 13:11     ` Jan Beulich [this message]
2018-10-09 14:26 ` Wei Liu
2018-10-09 14:32   ` Paul Durrant
2018-10-09 14:40     ` Wei Liu
2018-10-09 14:45       ` Paul Durrant

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=5BBCA90E02000078001F0063@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=paul.durrant@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.