[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190122104454.nke2knuyqiswfh5w@8bytes.org>
Date: Tue, 22 Jan 2019 11:44:54 +0100
From: "joro@...tes.org" <joro@...tes.org>
To: "Suthikulpanit, Suravee" <Suravee.Suthikulpanit@....com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
"Singh, Brijesh" <brijesh.singh@....com>
Subject: Re: [PATCH] iommu/amd: Fix IOMMU page flush when detach all devices
from a domain
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
Powered by blists - more mailing lists