From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cam Macdonell Subject: Re: R/W HG memory mappings with kvm? Date: Fri, 10 Jul 2009 11:03:39 -0600 Message-ID: <4A57746B.4070309@cs.ualberta.ca> References: <5f370d430907051541o752d3dbag80d5cb251e5e4d00@mail.gmail.com> <4A51A9F0.7000909@redhat.com> <5f370d430907071523t120da246wf366dbfbbac9169b@mail.gmail.com> <4A54225F.1050703@redhat.com> <4A551387.3000702@cs.ualberta.ca> <5f370d430907081501m60064c7dp23ebd4153c9050f1@mail.gmail.com> <5f370d430907091538t4285f57eua8f2e0756788c0a9@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Stephen Donnelly Return-path: Received: from fleet.cs.ualberta.ca ([129.128.22.22]:41805 "EHLO fleet.cs.ualberta.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753987AbZGJRDt (ORCPT ); Fri, 10 Jul 2009 13:03:49 -0400 Received: from fleet.cs.ualberta.ca (localhost.localdomain [127.0.0.1]) by fleet-spampd (Postfix) with ESMTP id 9EECC28037 for ; Fri, 10 Jul 2009 11:03:39 -0600 (MDT) In-Reply-To: <5f370d430907091538t4285f57eua8f2e0756788c0a9@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Stephen Donnelly wrote: > On Thu, Jul 9, 2009 at 6:01 PM, Cam Macdonell wrote: > >>> Is there a corresponding qemu patch for the backend to the guest pci >>> driver? >> Oops right. For some reason I can't my driver patch in patchwork. >> >> http://kerneltrap.org/mailarchive/linux-kvm/2009/5/7/5665734 > > Thanks for the link, I have read through the thread now. It seems very > relevant to what I am doing. Have you found a link to your qemu-kvm > backend patches? Or are you running your own git tree? I don't really > know where to look. Oops, I realize now that I passed the driver patch both times. Here is the old patch. http://patchwork.kernel.org/patch/22363/ What are you compiling against? the git tree or a particular version? The above patch won't compile against the latest git tree due to changes to how BARs are setup in Qemu. I can send you a patch for the latest tree if you need it. Cam > >>> I'm curious how the buffer memory is allocated and how BAR >>> accesses are handled from the host side. >> The memory for the device allocated as a POSIX shared memory object and then >> mmapped on to the allocated BAR region in Qemu's allocated memory. That's >> actually one spot that needs a bit of fixing by passing the already >> allocated memory object to qemu instead of mmapping on to it. > > Right, I would be passing the memory in pre-allocated as well, but > should be a relatively simple change. > > Regards, > Stephen.