From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Accessing guest memory from the host Date: Mon, 02 Feb 2009 15:45:58 +0200 Message-ID: <4986F916.9070000@redhat.com> References: <42c6aeaf0902010754j730db237p5a63762f53919dc1@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: Gioacchino Mendola Return-path: Received: from mx2.redhat.com ([66.187.237.31]:46068 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbZBBNqD (ORCPT ); Mon, 2 Feb 2009 08:46:03 -0500 In-Reply-To: <42c6aeaf0902010754j730db237p5a63762f53919dc1@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Gioacchino Mendola wrote: > hello everyone, > > I'm trying to access guest memory from the host machine (x86_64). > In particular I would like to be able to find > the "physical" memory addresses the host machine allocates for the guest vm. > Is there any function in KVM that allows me to do that? > Could any of you please help me clarify the subject > or point me to some detailed documentation? > There is no direct mapping between guest physical addresses to host physical addresses. kvm allocates memory on demand (when the guest first accesses it), so when a VM is started no memory is allocated to it. Further, kvm can swap guest memory, so the host address can disappear or move. What are you trying to accomplish? -- error compiling committee.c: too many arguments to function