From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: Re: [PATCH 1/1] direct mmio for passthrough - kernel part Date: Tue, 1 Apr 2008 18:18:07 +0100 Message-ID: <20080401171807.GA31765@redhat.com> 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> <47F26AD2.8000406@qumranet.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, andrea@qumranet.com, allen.m.kay@intel.com, benami@il.ibm.com To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <47F26AD2.8000406@qumranet.com> 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 08:03:14PM +0300, Avi Kivity wrote: > Anthony Liguori wrote: > > Avi Kivity wrote: > >> benami@il.ibm.com wrote: > >> > >>> From: Ben-Ami Yassour > >>> > >>> Enable a guest to access a device's memory mapped I/O regions directly. > >>> Userspace sends the mmio regions that the guest can access. On the > >>> first > >>> page fault for an access to an mmio address the host translates the > >>> gva to hpa, > >>> and updates the sptes. > >>> > >>> > >> > >> Can you explain why you're not using the regular memory slot > >> mechanism? i.e. have userspace mmap(/dev/mem) and create a memslot > >> containing that at the appropriate guest physical address? > >> > > > > /dev/mem is often restricted in what memory can be mapped. > > Please elaborate. The /dev/mem, /dev/kmem devices have a special SELinux context memory_device_t and very few application domains are allowed to access them. THe KVM/QEMU policy will not allow this for example. Basically on the X server, HAL and dmidecode have access in current policy. It would be undesirable to have to all KVM guests full access to /dev/mem, so a more fine grained access method would have benefits here. Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| ------------------------------------------------------------------------- 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