Received: from eggs.gnu.org ([2001:4830:134:3::10]:59588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2YIm-0005Eo-Bh for qemu-devel@nongnu.org; Fri, 04 Nov 2016 02:48:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2YIh-00014s-Ge for qemu-devel@nongnu.org; Fri, 04 Nov 2016 02:48:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46922) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2YIh-00014e-Ak for qemu-devel@nongnu.org; Fri, 04 Nov 2016 02:48:31 -0400 References: <1478165243-4767-1-git-send-email-jasowang@redhat.com> <1478165243-4767-8-git-send-email-jasowang@redhat.com> <20161103214712-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <7157aba3-bd5d-c335-78a7-2f79ee576f8d@redhat.com> Date: Fri, 4 Nov 2016 14:48:20 +0800 MIME-Version: 1.0 In-Reply-To: <20161103214712-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2 07/11] virtio-pci: address space translation service (ATS) support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: peterx@redhat.com, wexu@redhat.com, qemu-devel@nongnu.org, vkaplans@redhat.com, pbonzini@redhat.com, cornelia.huck@de.ibm.com On 2016=E5=B9=B411=E6=9C=8804=E6=97=A5 03:49, Michael S. Tsirkin wrote: > On Thu, Nov 03, 2016 at 05:27:19PM +0800, Jason Wang wrote: >> >This patches enable the Address Translation Service support for virti= o >> >pci devices. This is needed for a guest visible Device IOTLB >> >implementation and will be required by vhost device IOTLB API >> >implementation for intel IOMMU. >> > >> >Cc: Michael S. Tsirkin >> >Signed-off-by: Jason Wang > I'd like to understand why do you think this is strictly required. > Won't setting CM bit in the IOMMU do the trick. ATS was chosen for performance. Since there're many problems for CM: - CM was slow (10%-20% slower on real hardware for things like netperf)=20 because of each transition between non-present and present mapping needs=20 an explicit invalidation. It may slow down the whole VM. - Without ATS/Device IOTLB, IOMMU becomes a bottleneck because of=20 contending of IOTLB entries. (What we can do in this case is in fact=20 userspace IOTLB snooping, this could be done even without CM). It was natural to think of ATS when designing interface between IOMMU=20 and device/remote IOTLBs. Do you see any drawbacks on ATS here? Thanks > > Also, could you remind me pls - can guests just disable ATS? > > What happens then? > >