Received: from eggs.gnu.org ([2001:4830:134:3::10]:55177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c53Fv-0003OP-Je for qemu-devel@nongnu.org; Thu, 10 Nov 2016 23:16:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c53Fs-0000uh-Cm for qemu-devel@nongnu.org; Thu, 10 Nov 2016 23:15:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43240) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c53Fs-0000uT-5R for qemu-devel@nongnu.org; Thu, 10 Nov 2016 23:15:56 -0500 References: <1478603064-32562-1-git-send-email-bd.aviv@gmail.com> <1478603064-32562-2-git-send-email-bd.aviv@gmail.com> <20161109235951-mutt-send-email-mst@kernel.org> <41326d6d-7cdd-afba-ca13-8063e077bfbd@redhat.com> <20161111053836-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <3e4c0566-d450-63a1-6f9e-e215ed77f4f9@redhat.com> Date: Fri, 11 Nov 2016 12:15:48 +0800 MIME-Version: 1.0 In-Reply-To: <20161111053836-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 v6 1/3] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: "Aviv B.D" , qemu-devel@nongnu.org, Jan Kiszka , Alex Williamson , Peter Xu On 2016=E5=B9=B411=E6=9C=8811=E6=97=A5 11:39, Michael S. Tsirkin wrote: > On Fri, Nov 11, 2016 at 10:32:42AM +0800, Jason Wang wrote: >> >> On 2016=E5=B9=B411=E6=9C=8810=E6=97=A5 06:00, Michael S. Tsirkin wrote= : >>> On Wed, Nov 09, 2016 at 03:28:02PM +0800, Jason Wang wrote: >>>>> >>>>> On 2016=E5=B9=B411=E6=9C=8808=E6=97=A5 19:04, Aviv B.D wrote: >>>>>>> From: "Aviv Ben-David" >>>>>>> >>>>>>> This capability asks the guest to invalidate cache before each ma= p operation. >>>>>>> We can use this invalidation to trap map operations in the hyperv= isor. >>>>> Hi: >>>>> >>>>> Like I've asked twice in the past, I want to know why don't you cac= he >>>>> translation faults as what spec required (especially this is a gues= t visible >>>>> behavior)? >>>>> >>>>> Btw, please cc me on posting future versions. >>>>> >>>>> Thanks >>> Caching isn't guest visible. >> Seems not, if one fault mapping were cached by IOTLB. Guest can notice= this >> behavior. > Sorry, I don't get what you are saying. > >>> Spec just says you*can* cache, >>> not that you must. >>> >> Yes, but what did in this patch is "don't". What I suggest is just a "= can", >> since anyway the IOTLB entries were limited and could be replaced by o= ther. >> >> Thanks > Have trouble understanding this. Can you given an example of > a guest visible difference? I guess this may do the detection: 1) map iova A to be non-present. 2) invalidate iova A 3) map iova A to addr B 4) access iova A A correct implemented CM may meet fault in step 4, but with this patch,=20 we never.