From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] KVM: PCIPT: VT-d: fix guest unmap Date: Fri, 20 Jun 2008 14:28:27 -0500 Message-ID: <485C04DB.6040207@codemonkey.ws> 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> <485BFE24.5080100@qumranet.com> 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: Avi Kivity Return-path: Received: from wr-out-0506.google.com ([64.233.184.232]:55949 "EHLO wr-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751858AbYFTT26 (ORCPT ); Fri, 20 Jun 2008 15:28:58 -0400 Received: by wr-out-0506.google.com with SMTP id 69so1061230wri.5 for ; Fri, 20 Jun 2008 12:28:57 -0700 (PDT) In-Reply-To: <485BFE24.5080100@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > 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. Yes, as I've mentioned, the lack of a DMA window notification API can be handled as a special case. > 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) Exactly like this :-) Regards, Anthony Liguori