From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: obtaining machine frame number Date: Wed, 24 Aug 2011 16:10:08 -0400 Message-ID: <20110824201008.GA26526@dumpdata.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Eli Cohen Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Sun, Aug 21, 2011 at 06:20:07PM +0300, Eli Cohen wrote: > Hi list, > I am trying to allocate a page at a Linux guest and and obtain the > machine frame number for that page. Then I want to pass the mfn to OK, use the pci_map_page API - that should give you the MFN if you are doing this within a PV guest. > dom0 (I need to use xen store since I have my own mechanism to > communicate between guests and dom0) and obtain a struct page for it > (how?) and then dma map it to a pci device. Can some say if/how can Uh, .. > this be done? Why don't you do what the blkback/blkfront is doing. The blkback is using m2p_add_override to map the local 'struct page' to that MFN and then that 'struct page' has the guests' MFN under it.