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] question about page_to_phys

To: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
Subject: Re: [Xen-devel] question about page_to_phys
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 1 Sep 2005 10:07:46 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 01 Sep 2005 09:01:08 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4316598E.4010108@xxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4316598E.4010108@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 1 Sep 2005, at 02:29, Xiaofeng Ling wrote:

The page_to_phys is defined as
#define page_to_phys(page) (phys_to_machine(page_to_pseudophys(page)))
so it return machine addresss
while virt_to_phys return psedophys. include/asm-xen/asm-i386/io.h
this is really confusing.
why not define page_to_machine?

page_to_phys() is used only in places where we want to compare machine addresses (e.g., in deciding when to merge I/O requests). It was easier to abuse the macro definition than fix every place that it is used.

 -- Keir


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

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