From: Keir Fraser Subject: Re: question about page_to_phys Date: Thu, 1 Sep 2005 10:07:46 +0100 Message-ID: References: <4316598E.4010108@intel.com> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4316598E.4010108@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xiaofeng Ling Cc: xen-devel List-Id: xen-devel@lists.xenproject.org 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