[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Mapping hvm guest pages in Dom0


  • To: dietmar.hahn@xxxxxxxxxxxxxxxxxxx
  • From: Satya <satyakiran@xxxxxxxxx>
  • Date: Tue, 7 Oct 2008 14:14:43 -0700
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 07 Oct 2008 14:15:11 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=vQMebkYwlPEc7hWTao5IY2/2Ddmlud52LkxtEWbfp9t7KxbthdqOdIqlZDvGVXYEoE zmMK8E9eIdWyOKRtaZhXVg019hQYrPjfx/8HjNNz4mSRRzovaTu8bM4rnxL7r0Nh2KRV hmduhX1akiuP9AHdXudp2FcMBmyAokOCdWtNo=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>



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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.