From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiHRh-0005XX-Dr for qemu-devel@nongnu.org; Tue, 22 Mar 2016 04:13:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiHRb-0007zf-Gt for qemu-devel@nongnu.org; Tue, 22 Mar 2016 04:13:45 -0400 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]:32797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiHRb-0007zZ-3V for qemu-devel@nongnu.org; Tue, 22 Mar 2016 04:13:39 -0400 Received: by mail-lb0-x233.google.com with SMTP id oe12so150739981lbc.0 for ; Tue, 22 Mar 2016 01:13:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160321023012.GA4468@pxdev.xzpeter.org> References: <56E70871.3050305@gmail.com> <20160315085236.GA23495@pxdev.xzpeter.org> <20160318030643.GI23495@pxdev.xzpeter.org> <20160321023012.GA4468@pxdev.xzpeter.org> From: "Aviv B.D." Date: Tue, 22 Mar 2016 10:13:18 +0200 Message-ID: Content-Type: multipart/alternative; boundary=001a1141fcaa55b594052e9eca18 Subject: Re: [Qemu-devel] [PATCH][RFC] IOMMU: Add Support to VFIO devices with vIOMMU present List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: marcel@redhat.com, Jan Kiszka , Alex Williamson , qemu-devel@nongnu.org, "Michael S. Tsirkin" --001a1141fcaa55b594052e9eca18 Content-Type: text/plain; charset=UTF-8 On Mon, Mar 21, 2016 at 4:30 AM, Peter Xu wrote: > On Sat, Mar 19, 2016 at 11:40:04AM +0200, Aviv B.D. wrote: > [...] > > As far as I understand the code, currently there is no way to turn off > the > > IOTLB. > > Furthermore. the IOTLB is not implemented as LRU, and actually caches > > (indefinitely) > > any accessed address, without any size constrains. I use those > assumptions > > to know > > whether the current invalidation is for unmap operation or map operation. > > Please have a look at VTD_IOTLB_MAX_SIZE. It seems to be the size of > the hash. > > Btw, I guess it's a much bigger problem if IOTLB has unlimited cache > size... > > Thanks. -- peterx > You are correct, VTD_IOTLB_MAX_SIZE limits the cache size (and reset the whole cache if this threshold exceeds...) I will think on another mechanism to identify the correct action for each invalidation. Thanks, Aviv. --001a1141fcaa55b594052e9eca18 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Mon, Mar 21, 2016 at 4:30 AM, Peter Xu <peterx@redhat.com> wrote:
On Sat, Mar 19, 2016 at 1= 1:40:04AM +0200, Aviv B.D. wrote:
[...]
> As far as I understand the code, currently the= re is no way to turn off the
> IOTLB.
> Furthermore. the IOTLB is not implemented as LRU, and actually caches<= br> > (indefinitely)
> any accessed address, without any size constrains. I use those assumpt= ions
> to know
> whether the current invalidation is for unmap operation or map operati= on.

Please have a look at VTD_IOTLB_MAX_SIZE. It seems to be the size of=
the hash.

Btw, I guess it's a much bigger problem if IOTLB has unlimited cache size...

Thanks.=C2=A0
-- peterx

You are correct, VTD_IOTLB_MA= X_SIZE limits the cache size (and reset the whole cache=C2=A0
if = this threshold exceeds...) I will think on another mechanism to identify th= e correct=C2=A0
action for each invalidation.

Thanks,
Aviv.=C2=A0

--001a1141fcaa55b594052e9eca18--