public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
	Joerg Roedel <joro@8bytes.org>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 0/3] intel-iommu: fix mapping PSI missing for iommu_map()
Date: Wed, 18 Apr 2018 16:36:50 +0800	[thread overview]
Message-ID: <20180418083650.GE14841@xz-mi> (raw)
In-Reply-To: <20180418044130.12339-1-peterx@redhat.com>

On Wed, Apr 18, 2018 at 12:41:27PM +0800, Peter Xu wrote:
> (PSI stands for: Page Selective Invalidations)
> 
> Intel IOMMU has the caching mode to ease emulation of the device.
> When that bit is set, we need to send PSIs even for newly mapped
> pages.  However current driver is not fully obey the rule.  E.g.,
> iommu_map() API will only do the mapping but it never sent the PSIs
> before.  That can be problematic to emulated IOMMU devices since
> they'll never be able to build up the shadow page tables if without
> such information.  This patchset tries to fix the problem.
> 
> Patch 1 is a tracing enhancement that helped me to triage the problem.
> It might even be useful in the future.
> 
> Patch 2 generalized a helper to notify the MAP PSIs.
> 
> Patch 3 fixes the real problem by making sure every domain mapping
> will trigger the MAP PSI notifications.
> 
> Without the patchset, nested device assignment (assign one device
> firstly to L1 guest, then to L2 guest) won't work for QEMU.  After
> applying the patchset, it works.
> 
> Please review.  Thanks.

I even forgot to CC iommu list.  I'll just repost.  Sorry for the
troublesome.

-- 
Peter Xu

      parent reply	other threads:[~2018-04-18  8:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18  4:41 [PATCH 0/3] intel-iommu: fix mapping PSI missing for iommu_map() Peter Xu
2018-04-18  4:41 ` [PATCH 1/3] intel-iommu: add some traces for PSIs Peter Xu
2018-04-18  4:41 ` [PATCH 2/3] intel-iommu: generalize __mapping_notify_one() Peter Xu
2018-04-18  4:41 ` [PATCH 3/3] intel-iommu: fix iotlb psi missing for mappings Peter Xu
2018-04-18  4:46 ` [PATCH 0/3] intel-iommu: fix mapping PSI missing for iommu_map() Peter Xu
2018-04-18  8:36 ` Peter Xu [this message]

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=20180418083650.GE14841@xz-mi \
    --to=peterx@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox