From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH v2 0/2] Minimal RAM API support Date: Mon, 01 Nov 2010 09:13:24 -0600 Message-ID: <20101101150701.3927.88854.stgit@s20.home> References: <20101029162918.26094.69379.stgit@s20.home> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, alex.williamson@redhat.com, mst@redhat.com, chrisw@redhat.com, ddutile@redhat.com To: qemu-devel@nongnu.org, anthony@codemonkey.ws, blauwirbel@gmail.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62063 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754859Ab0KAPNb (ORCPT ); Mon, 1 Nov 2010 11:13:31 -0400 In-Reply-To: <20101029162918.26094.69379.stgit@s20.home> Sender: kvm-owner@vger.kernel.org List-ID: v2: - Move to Makefile.objs - Move structures to memory.c and create a callback function - Fix memory leak I haven't moved to the state parameter because there should only be a single instance of this per VM. The state parameter seems like it would add complications in setup and function calling, but maybe point me to an example if I'm off base. Thanks, Alex v1: For VFIO based device assignment, we need to know what guest memory areas are actual RAM. RAMBlocks have long since become a grab bag of misc allocations, so aren't effective for this. Anthony has had a RAM API in mind for a while now that addresses this problem. This implements just enough of it so that we have an interface to get actual guest memory physical addresses to setup the host IOMMU. We can continue building a full RAM API on top of this stub. Anthony, feel free to add copyright to memory.c as it's based on your initial implementation. I had to add something since the file in your branch just copies a header with Frabrice's copywrite. Thanks, Alex --- Alex Williamson (2): RAM API: Make use of it for x86 PC Minimal RAM API support Makefile.objs | 1 + cpu-common.h | 2 + hw/pc.c | 12 +++--- memory.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ memory.h | 18 +++++++++ 5 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 memory.c create mode 100644 memory.h From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46188 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PCw4p-0003AI-Bp for qemu-devel@nongnu.org; Mon, 01 Nov 2010 11:13:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PCw4h-0002mI-70 for qemu-devel@nongnu.org; Mon, 01 Nov 2010 11:13:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PCw4g-0002m4-Ua for qemu-devel@nongnu.org; Mon, 01 Nov 2010 11:13:31 -0400 From: Alex Williamson Date: Mon, 01 Nov 2010 09:13:24 -0600 Message-ID: <20101101150701.3927.88854.stgit@s20.home> In-Reply-To: <20101029162918.26094.69379.stgit@s20.home> References: <20101029162918.26094.69379.stgit@s20.home> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH v2 0/2] Minimal RAM API support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, anthony@codemonkey.ws, blauwirbel@gmail.com Cc: chrisw@redhat.com, alex.williamson@redhat.com, ddutile@redhat.com, kvm@vger.kernel.org, mst@redhat.com v2: - Move to Makefile.objs - Move structures to memory.c and create a callback function - Fix memory leak I haven't moved to the state parameter because there should only be a single instance of this per VM. The state parameter seems like it would add complications in setup and function calling, but maybe point me to an example if I'm off base. Thanks, Alex v1: For VFIO based device assignment, we need to know what guest memory areas are actual RAM. RAMBlocks have long since become a grab bag of misc allocations, so aren't effective for this. Anthony has had a RAM API in mind for a while now that addresses this problem. This implements just enough of it so that we have an interface to get actual guest memory physical addresses to setup the host IOMMU. We can continue building a full RAM API on top of this stub. Anthony, feel free to add copyright to memory.c as it's based on your initial implementation. I had to add something since the file in your branch just copies a header with Frabrice's copywrite. Thanks, Alex --- Alex Williamson (2): RAM API: Make use of it for x86 PC Minimal RAM API support Makefile.objs | 1 + cpu-common.h | 2 + hw/pc.c | 12 +++--- memory.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ memory.h | 18 +++++++++ 5 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 memory.c create mode 100644 memory.h