From mboxrd@z Thu Jan 1 00:00:00 1970 From: Himanshu Raj Subject: Question regarding behavior of virt_to_bus .... Date: Tue, 04 Oct 2005 03:56:46 -0400 Message-ID: <434235BE.4070908@cc.gatech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Hi Folks, I need some large chunk of physical memory, so I allocate it early using alloc_bootmem_low_pages and use it later (akin to bigphysarea patch). The trouble I am having is the following. Suppose the virtual address for the memory area is 0xc14d6000. After xen_create_contiguous_region call, I do a virt_to_bus and the bus address comes out to be 0x18000000. So far so good. However, later when I try to use this memory in a device driver, the call to virt_to_bus returns 0x14d6000. This result is baffling me, since that's what it would look like in a normal 32-bit i386 world, and not in xenified world. Am I doing something stupid, or is there some technicality of memory subsystem that I don't get. Ofcourse, if I just use pci_alloc_consistent (for a small buffer), everything works fine, since there is no bootmem related contortion involved. I will highly appreciate any input on this. --Himanshu ------------------------------------------------------------------------- Himanshu Raj PhD Student, GaTech (www.cc.gatech.edu/~rhim) I prefer to receive attachments in an open, non-proprietary format. -------------------------------------------------------------------------