From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] VT-d: Fix iommu map page for mmio pages Date: Thu, 25 Sep 2008 16:58:21 +0300 Message-ID: <48DB98FD.3000307@redhat.com> References: <0122C7C995D32147B66BF4F440D3016301BE2C10@pdsmsx415.ccr.corp.intel.com> <48DB6777.7070709@redhat.com> <0122C7C995D32147B66BF4F440D3016301C7D0EB@pdsmsx415.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Amit Shah , "Kay, Allen M" , benami@il.ibm.com To: "Han, Weidong" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:38158 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209AbYIYOAi (ORCPT ); Thu, 25 Sep 2008 10:00:38 -0400 In-Reply-To: <0122C7C995D32147B66BF4F440D3016301C7D0EB@pdsmsx415.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Han, Weidong wrote: > Avi Kivity wrote: > >> Han, Weidong wrote: >> >>> Don't need to map mmio pages for iommu. When find mmio pages in >>> kvm_iommu_map_pages(), don't map them, and shouldn't return error >>> due to it's not an error. If return error (such as -EINVAL), device >>> assigment will fail. >>> >>> >>> >> I don't understand. Why don't we need to map mmio pages? We >> certainly don't want them emulated. >> > > mmio pages need not to be mapped in VT-d page table, which only > translate DMA addresses. Right, I forgot the iommu is only for dma, not cpu accesses. I suppose one could DMA into an mmio page. Is there a reason not to map? -- error compiling committee.c: too many arguments to function