From mboxrd@z Thu Jan 1 00:00:00 1970 From: PG Subject: Re: Fw: Accessing guest memory from the host Date: Sun, 01 Feb 2009 14:25:47 -0800 Message-ID: <4986216B.5000002@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org, gioacchino.mendola@gmail.com Return-path: Received: from yw-out-2324.google.com ([74.125.46.30]:36428 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391AbZBAWZv (ORCPT ); Sun, 1 Feb 2009 17:25:51 -0500 Received: by yw-out-2324.google.com with SMTP id 9so450247ywe.1 for ; Sun, 01 Feb 2009 14:25:50 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Gioacchino Mendola wrote: > > 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? > > One way is to walk the host's page directory and page tables to map the host linear address to host physical address, assuming you know how to get the host linear address that kvm has allocated to the guest vm. -pg