From: Konrad Rzeszutek Wilk Subject: Re: kmap_atomic issue with SLES11SP1 32bit XEN driver code Date: Fri, 16 Dec 2011 11:16:13 -0400 Message-ID: <20111216151613.GA4369@andromeda.dapyr.net> References: <4EDFDF0D.2020104@hp.com> <4EE628D80200007800066F9E@nat28.tlf.novell.com> <20111214213443.GC25896@andromeda.dapyr.net> <4EE9C15602000078000680D3@nat28.tlf.novell.com> <6738613108553D49BEFEFDD59230CCDF011BED93@G4W3300.americas.hpqcorp.net> <4EEA304402000078000684C8@nat28.tlf.novell.com> <4EEA8084.8030208@hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <4EEA8084.8030208@hp.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: dbrace Cc: "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Thu, Dec 15, 2011 at 05:19:32PM -0600, dbrace wrote: > Can you give me some URLs to documentation that can help me understand > my issue? > > Is sounds like I cannot go back to the correct virtual address after I > map it for DMA. Well yes. That assumption that virt_to_phys == phys_to_virt is not valid anymore. The obvious solution to your problem is to carry a _both_ values - the bus address (the one you get from the DMA API), and the virtual address (the one you get from alloc_page). That is how all the drivers do it.