From mboxrd@z Thu Jan 1 00:00:00 1970 From: Muli Ben-Yehuda Subject: Re: [PATCH] VT-d: Fix iommu map page for mmio pages Date: Fri, 26 Sep 2008 00:14:23 +0300 Message-ID: <20080925211423.GC6788@il.ibm.com> References: <0122C7C995D32147B66BF4F440D3016301BE2C10@pdsmsx415.ccr.corp.intel.com> <48DB6777.7070709@redhat.com> <0122C7C995D32147B66BF4F440D3016301C7D0EB@pdsmsx415.ccr.corp.intel.com> <48DB98FD.3000307@redhat.com> <0122C7C995D32147B66BF4F440D3016301C7D0FF@pdsmsx415.ccr.corp.intel.com> <48DBA40A.7030508@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Amit Shah , "Kay, Allen M" , Ben-Ami Yassour1 To: Avi Kivity Return-path: Received: from mtagate4.de.ibm.com ([195.212.29.153]:61482 "EHLO mtagate4.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756408AbYIYVO7 (ORCPT ); Thu, 25 Sep 2008 17:14:59 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.13.8/8.13.8) with ESMTP id m8PLEsOT272012 for ; Thu, 25 Sep 2008 21:14:54 GMT Received: from d12av03.megacenter.de.ibm.com (d12av03.megacenter.de.ibm.com [9.149.165.213]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m8PLEsaY4059362 for ; Thu, 25 Sep 2008 23:14:54 +0200 Received: from d12av03.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av03.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m8PLEoW8010224 for ; Thu, 25 Sep 2008 23:14:51 +0200 Content-Disposition: inline In-Reply-To: <48DBA40A.7030508@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Sep 25, 2008 at 05:45:30PM +0300, Avi Kivity wrote: > Han, Weidong wrote: >> Is it possible DMA into an mmio page? > > I don't see why not. Two reasons. First it makes no sense. MMIO pages don't have RAM backing them, they have another device's register window. So the effect of DMA'ing into an MMIO page would be for one device to DMA into the register window of another device, which sounds to me insane. Second, and more importantly, I've seen systems where doing the above caused a nice, immediate, reboot. So I think that unless someone comes with a valid scenario where we need to support it or something breaks, we'd better err on the side of caution and not map pages that should not be DMA targets. Cheers, Muli -- The First Workshop on I/O Virtualization (WIOV '08) Dec 2008, San Diego, CA, http://www.usenix.org/wiov08/ xxx SYSTOR 2009---The Israeli Experimental Systems Conference http://www.haifa.il.ibm.com/conferences/systor2009/