From: Dan Magenheimer Subject: RE: guest physical to xen machine copy? Date: Tue, 30 Sep 2008 20:05:56 +0000 (GMT) Message-ID: <110049da-6569-4312-9c87-4971c1928a66@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: 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: Keir Fraser , "Xen-Devel (E-mail)" , "Tian, Kevin" List-Id: xen-devel@lists.xenproject.org Thanks for your help. I finally got all of this working. Interestingly, I think my problem was aliasing: I was writing from one virtual address in the guest and reading from another virtual address in Xen, with both mapped to the same machine address. Adding mb() appropriately seemed to resolve the problem. Thanks, Dan > -----Original Message----- > From: Keir Fraser [mailto:keir.fraser@eu.citrix.com] > Sent: Tuesday, September 30, 2008 12:25 AM > To: Dan Magenheimer; Xen-Devel (E-mail); Tian, Kevin > Subject: Re: [Xen-devel] guest physical to xen machine copy? >=20 >=20 > On 29/9/08 23:30, "Dan Magenheimer"=20 > wrote: >=20 > > Then I gather I need to be passing an mfn to Xen instead > > of a gpfn. To do so, it looks like I call pfn_to_mfn() > > in the paravirtualized guest. But how can this work > > on a 32-bit-PV-on-64-bit-Xen since pfn_to_mfn() returns > > an unsigned long? >=20 > So what? >=20 > > Also, once I've got an (pvguest-translated-gpfn-to-) mfn > > inside of Xen, do I still do a gfn_to_mfn() on it? > > (Shouldn't matter because it just returns the gfn, right?) >=20 > Yes, gfn here means what-the-guest-thinks-is-an-mfn. That's=20 > pfn for an HVM > guest; mfn for a PV guest. >=20 > -- Keir >=20 >=20 >