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

[Xen-devel] xc_translate_foreign_address() returns mfn??

To: "List: Xen Developers" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] xc_translate_foreign_address() returns mfn??
From: "Jun Koi" <junkoi2004@xxxxxxxxx>
Date: Fri, 19 Dec 2008 19:16:12 +0900
Delivery-date: Fri, 19 Dec 2008 02:16:35 -0800
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:mime-version:content-type:content-transfer-encoding :content-disposition; bh=MCmKrrPb3p9iadG0Eadu8LLbQ77QBLhUshgfHvH68PU=; b=PwknWjSGtNIyBAFY7tkn1RNUi17tpzhqPHfRNSlhpqP0xgsqrpx/zrx+bsefJCoypH it3pSv2P4hyKNXaqVIvRsfdOyu+naWTxwSl4sRXdGqxJ8wPQYLpskxs5nSoxMCHFO/xg Pjvx+gU4mIQgMSuLUMcCPMEcZgIAsHImTxJvA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=bD3kk1rnV3zrbiu1xRu0XnFrPDYIitYKokOvE6wK5/KlRIfKxF6gd2vy3O9Xn2tKgy 8RPcpYj1XVyKKJ8EtBTEOZVsmQKaeVtauIkDouybxwbK0dP0QiT21nmGXFGja5p84qTw iiEKlBPz8yMMTfJmFPBAbwlGrDiLc3VL/HtkM=
Envelope-to: www-data@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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I looked at the function xc_translate_foreign_address(), and see that
it walks the page table of the guest VM. So at best, it should return
the pfn of the guest (?)

We can see taht the Later part of the function is like this:
...
        if (pt_levels >= 3)
            mfn = (pte & L0_PAGETABLE_MASK_PAE) >> PAGE_SHIFT;
        else
            mfn = (pte & L0_PAGETABLE_MASK) >> PAGE_SHIFT;
..
return mfn;

So perhaps I miss something, but the "mfn" here should be "pfn", so
this function should return pfn, not mfn as in the comment of
xenctrl.h.

This makes me very confused now.

Thanks,
Jun

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>