All of lore.kernel.org
 help / color / mirror / Atom feed
From: "joro@8bytes.org" <joro@8bytes.org>
To: "Suthikulpanit, Suravee" <Suravee.Suthikulpanit@amd.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	"Singh, Brijesh" <brijesh.singh@amd.com>
Subject: Re: [PATCH] iommu/amd: Fix IOMMU page flush when detach all devices from a domain
Date: Tue, 22 Jan 2019 11:44:54 +0100	[thread overview]
Message-ID: <20190122104454.nke2knuyqiswfh5w@8bytes.org> (raw)
In-Reply-To: <0a61c07d-edfe-2738-380d-33d39e40fc0a@amd.com>

Hi Suravee,

On Thu, Jan 17, 2019 at 08:44:36AM +0000, Suthikulpanit, Suravee wrote:
> Then, in __domain_flush_pages, we issue command when the dev_iommu[] >= 0.
> This should preserve previous behavior, and only add flushing condition to
> the specific IOMMU in detached state. Please let me know what you think.

I think the whole point why VFIO is detaching all devices first and then
goes into unmapping pages is that there are no flushes needed anymore
when devices are detached.

But when we follow your proposal we would still do IOTLB flushes even
when no devices are attached anymore. So I'd like to avoid this, given
the implications on unmapping performance. We should just flush the
IOMMU TLB at detach time and be done with it.

Makes sense?

Regards,

	Joerg

  parent reply	other threads:[~2019-01-22 10:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16  4:16 [PATCH] iommu/amd: Fix IOMMU page flush when detach all devices from a domain Suthikulpanit, Suravee
2019-01-16 13:26 ` joro
2019-01-16 14:08   ` Suthikulpanit, Suravee
2019-01-16 17:08     ` joro
2019-01-17  8:44       ` Suthikulpanit, Suravee
2019-01-17 11:48         ` Suthikulpanit, Suravee
2019-01-22 10:44         ` joro [this message]
2019-01-22 15:53           ` Suthikulpanit, Suravee
2019-01-23  7:56             ` joro
2019-01-24  3:25               ` Suthikulpanit, Suravee
2019-01-24  3:25                 ` Suthikulpanit, Suravee
2019-01-24  8:04                 ` joro
2019-01-24  8:04                   ` joro-zLv9SwRftAIdnm+yROfE0A
2019-01-16 14:40   ` Suthikulpanit, Suravee
2019-01-16 17:09     ` joro

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=20190122104454.nke2knuyqiswfh5w@8bytes.org \
    --to=joro@8bytes.org \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=brijesh.singh@amd.com \
    --cc=iommu@lists.linux-foundation.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 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.