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

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



>>> 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


_______________________________________________
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®.