From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAN7G-0008Pt-Fd for qemu-devel@nongnu.org; Sun, 02 Oct 2011 10:34:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RAN7D-0000tA-LP for qemu-devel@nongnu.org; Sun, 02 Oct 2011 10:34:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RAN7D-0000sy-Ct for qemu-devel@nongnu.org; Sun, 02 Oct 2011 10:34:03 -0400 Date: Sun, 2 Oct 2011 16:31:40 +0200 From: Alon Levy Message-ID: <20111002143140.GH11521@bow.tlv.redhat.com> References: <20111002132436.GD11521@bow.tlv.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111002132436.GD11521@bow.tlv.redhat.com> Subject: Re: [Qemu-devel] [Spice-devel] viewing continuous guest virtual memory as continuous in qemu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, spice-devel@freedesktop.org, Dave Airlie On Sun, Oct 02, 2011 at 03:24:36PM +0200, Alon Levy wrote: > Hi, > Converting qemu's ram allocation to a mmap and using remap_file_pages seems like it could work. Any ideas why it wouldn't? Alon > I'm trying to acheive the $subject. Some background: currently spice relies on a preallocated pci bar for both surfaces and for VGA framebuffer + commands. I have been trying to get rid of the surfaces bar. To do that I allocate memory in the guest and then translate it for spice-server consumption using cpu_physical_memory_map. > > AFAIU this works only when the guest allocates a continuous range of physical pages. This is a large requirement from the guest, which I'd like to drop. So I would like to have the guest use a regular allocator, generating for instance two sequential pages in virtual memory that are scattered in physical memory. Those two physical guest page addresses (gp1 and gp2) correspond to two host virtual memory addresses (hv1, hv2). I would now like to provide to spice-server a single virtual address p that maps to those two pages in sequence. I don't want to handle my own scatter-gather list, I would like to have this mapping done once so I can use an existing library that requires a single pointer (for instance pixman or libGL) to do the rendering. > > Is there any way to acheive that without host kernel support, in user space, i.e. in qemu? or with an existing host kernel device? > > I'd appreciate any help, > > Alon > _______________________________________________ > Spice-devel mailing list > Spice-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/spice-devel