Gmane
From: Satya <satyakiran <at> gmail.com>
Subject: Re: Mapping hvm guest pages in Dom0
Newsgroups: gmane.comp.emulators.xen.devel
Date: 2008-10-07 21:14:43 GMT (38 weeks, 4 days, 21 hours and 20 minutes ago)



If you have the gmfn's from the HVM domU (I'am not sure where you get this
from if you want to keep your guest "pure" HVM) and the domU id, you can map
the domU memory into the dom0 kernel memory with

struct vm_struct area;
area = alloc_vm_area(num_pages * PAGE_SIZE);
direct_kernel_remap_pfn_range(((unsigned long)) area->addr, gmfn,
                               PAGE_SIZE*num_pages, prots, domU_id);

I did that but the hypercall from __direct_remap_pfn_range() errors out (-EINVAL) if prots include _PAGE_PRESENT. Without this flag the kernel cannot handle reads and writes to these pages (will essentially page fault). Any thoughts?

./satya

ps: Thanks to everyone for the replies.


_______________________________________________
Xen-devel mailing list
Xen-devel <at> lists.xensource.com
http://lists.xensource.com/xen-devel