[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] kmap_atomic issue with SLES11SP1 32bit XEN driver code



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.



On 12/15/2011 10:37 AM, Jan Beulich wrote:
On 15.12.11 at 17:15, "Brace, Don"<dab@xxxxxx>  wrote:
I do not understand what this means:
" That is, we'd be susceptible to this problem only if within a
lazy-mode enabled section k{,un}map_atomic were used
synchronously (which I'd consider a coding mistake)."

Could you elaborate on this?
Not sure what additional explanation is needed. kmap_atomic() is
intended to be used in atomic context, and if you use it elsewhere
that's a mis-use.

Here is what I am trying to do.
I am in a LLD I have bus addresses that are DMA-able that I would normally
DMA to except this driver is emulating hardware in software and so it does
not need to DMA is needs to transfer the data with the CPU.
So this makes clear that what I told you about a possibly missing
translation is likely the culprit. Quoting from your original mail

                  linux_page = __pfn_to_page(physical_address>>  PAGE_SHIFT);

I have to assume that physical_address really isn't a physical address,
but a bus one. Hence you first need to translate it to a physical one
before passing it to __pfn_to_page().

On non-XEN 32bit kernels I use kmap_atomic() and it handles both highmem
addresses and non highmem addresses with no issues.
And so does it on Xen.

When I am running 32bit XEN kernels I run into issues like this:
     "BUG: unable to handle kernel paging request at 9822bf40"
Because you pass in a random struct page *.

Jan


--
Don Brace
SPSN Linux Development
Hewlett-Packard Company

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.