From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1al8ZQ-0007jA-4X for qemu-devel@nongnu.org; Wed, 30 Mar 2016 01:21:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1al8ZM-0002uO-SF for qemu-devel@nongnu.org; Wed, 30 Mar 2016 01:21:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1al8ZM-0002u3-N1 for qemu-devel@nongnu.org; Wed, 30 Mar 2016 01:21:28 -0400 Date: Wed, 30 Mar 2016 13:21:23 +0800 From: Peter Xu Message-ID: <20160330052123.GD3014@pxdev.xzpeter.org> References: <1458872009-13342-1-git-send-email-jasowang@redhat.com> <1458872009-13342-7-git-send-email-jasowang@redhat.com> <20160328033753.GK28183@pxdev.xzpeter.org> <56FB5F5D.90405@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56FB5F5D.90405@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH 6/8] intel_iommu: support device iotlb descriptor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: Eduardo Habkost , mst@redhat.com, qemu-devel@nongnu.org, cornelia.huck@de.ibm.com, pbonzini@redhat.com, Richard Henderson On Wed, Mar 30, 2016 at 01:08:45PM +0800, Jason Wang wrote: [...] > >> + } else { > >> + sz = VTD_PAGE_SIZE; > >> + } > >> + > >> + entry.target_as = &vtd_dev_as->as; > >> + entry.addr_mask = sz - 1; > >> + entry.iova = addr; > >> + memory_region_notify_iommu(entry.target_as->root, entry); > > Here, we seems to be posting this invalidation to all registered > > notifiers. > > Yes, but only for a device specified address space. > > > Since this is a device-tlb invalidation, and we should > > know which device (BDF) that we should invalidate, is there any way > > that we can directly route this info to that specific device? > > Looks like the codes has already done this, the target_as was found by > bus num and devfn. Yes, seems you are right. :) -- peterx