From: "Bryan D. Payne" Subject: convert guest va to ma in xen? Date: Wed, 24 Oct 2007 23:00:05 -0400 Message-ID: <64bddf0e0710242000l3e86c5c1r889b29a2a3d912a6@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org I have a dom0 kernel virtual address in xen. I'd like to convert it to a machine address. What are the best function(s) to use for making this conversion? I've tried the code below, but this only seems to work for hvm guest domains, and not for dom0: mfn = get_mfn_from_gpfn(shadow_gva_to_gfn(current, vaddr); maddr = (mfn << PAGE_SHIFT) + (vaddr & ~PAGE_MASK); Is there equivalent code that will work for virtual addresses from dom0? Thanks, bryan -- Bryan D. Payne Graduate Student, Computer Science Georgia Tech Information Security Center http://www.bryanpayne.org