From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: [PATCH 1/1] direct mmio for passthrough - kernel part Date: Tue, 1 Apr 2008 20:18:19 +0200 Message-ID: <20080401181819.GB19189@duo.random> References: <1207050734-13166-1-git-send-email-benami@il.ibm.com> <1207050734-13166-2-git-send-email-benami@il.ibm.com> <47F238D8.7040608@qumranet.com> <47F249C3.6000300@codemonkey.ws> <47F252D1.6060905@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, allen.m.kay@intel.com, benami@il.ibm.com, Avi Kivity To: Anthony Liguori Return-path: Content-Disposition: inline In-Reply-To: <47F252D1.6060905@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Tue, Apr 01, 2008 at 10:20:49AM -0500, Anthony Liguori wrote: > Which is apparently entirely unnecessary as we already have > /sys/bus/pci/.../region. It's just a matter of checking if a vma is VM_IO > and then dealing with the subsequent reference counting issues as Avi > points out. Do you need to map it in userland too, isn't it enough to map it in the sptes? For the ram I had to map it in userland too with /dev/mem, and then I used the pte_pfn to fill the spte, so the emulated qemu drivers can input/output. But for the mmio space I doubt the userland side is needed. If you add a direct memslot (new bitflag type) I will use it too instead of catching get_user_pages failures and walking ptes on the RAM pieces overwritten by /dev/mem. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace