From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: PCIPT: VT-d: fix guest unmap Date: Fri, 20 Jun 2008 21:59:48 +0300 Message-ID: <485BFE24.5080100@qumranet.com> References: <1213729526-10410-1-git-send-email-benami@il.ibm.com> <1213729526-10410-2-git-send-email-benami@il.ibm.com> <1213729526-10410-3-git-send-email-benami@il.ibm.com> <48582CD0.5060109@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: benami@il.ibm.com, amit.shah@qumranet.com, weidong.han@intel.com, muli@il.ibm.com, raharper@us.ibm.com, kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from il.qumranet.com ([212.179.150.194]:24274 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753002AbYFTS7t (ORCPT ); Fri, 20 Jun 2008 14:59:49 -0400 In-Reply-To: <48582CD0.5060109@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: Anthony Liguori wrote: > I think the current VT-d code needs some reworking. > > We should build the table as the shadow page table gets built. We > should suppress iotlb flushes unless the table is actually being updated. > We can't, since we need the iommu tables populated before we issue any dma. Perhaps we want something like MAP_POPULATE for shadow, which would then affect the iommu tables. Userspace would then do: mlock() ... set up device assignment ioctl(..., KVM_POPULATE) -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.