WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: dietmar.hahn@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Mapping hvm guest pages in Dom0
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
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=0JGZXkauJ7jMGx6KwPQM4Nm7b3yuA5qPbw5xyWBO44g=; b=it7qUz5hw2qqc1WWqxOO70E7uhnUm0AnI4IFU/febVP+J2n/CfPqXD+5HKOB7GGV2J hA/uEmoQ7AHctkNerSJjSeTxJLZUkvKOE0D/CQMR/iBqViyj8AlnJH4iIKa/LyFDN/js umKP7liA8i3EehDLZL3IWd5mdh2xGojGMoXKg=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200809290930.46865.dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <acbcf3840809261202i693c21fawbe86ec75f8a995ba@xxxxxxxxxxxxxx> <200809290930.46865.dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx


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
<Prev in Thread] Current Thread [Next in Thread>