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

Re: [Xen-devel] Problem with MMAP on Xen kernel



Hi,
Sorry for late response. I will provide required information tomorrow. 

Regards,
Maciej

-----Original Message-----
From: David Vrabel [mailto:david.vrabel@xxxxxxxxxx] 
Sent: Friday, January 16, 2015 7:45 PM
To: Dugger, Donald D; xen-devel@xxxxxxxxxxxxx
Cc: Ronciak, John; Szwed, Maciej
Subject: Re: [Xen-devel] Problem with MMAP on Xen kernel

On 16/01/15 18:24, Dugger, Donald D wrote:
> One of our engineers, Maciek, is working on a driver and stumbled upon 
> what looks like a bug in the Xen kernel.  The report I got was:
> 
>  
> 
> We recently started to provide mmap functionality in our driver for 
> Linux. Function for this:
> 
>  
> 
> /int/
> 
> /NalMmap(/
> 
> /    struct file*                            File,/
> 
> /    struct vm_area_struct*  Vma/
> 
> /    )/
> 
> /{/
> 
> /    if(remap_pfn_range(Vma,/
> 
> /        Vma->vm_start,/
> 
> /        Vma->vm_pgoff,/
> 
> /        Vma->vm_end - Vma->vm_start,/
> 
> /        Vma->vm_page_prot))/
> 
> /    {/
> 
> /        return -EAGAIN;/
> 
> /    }/
> 
> / /
> 
> /    return 0;/
> 
> /}/
> 
>  
> 
> We discovered that this doesn't work for xen kernels (but it doesn't 
> return any error, just does not map). I found that it is suggested to 
> use io_remap_pfn_range instead of remap_pfn_range. After switching 
> function everything still works on standard kernel, but on xen this 
> time it returns error.

Not a lot to go on here.  What kernel version?  What PFNs are you trying to map 
(RAM? MMIO?)  What error do you get?

Can you provide a minimal driver that shows the problem?

David
--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial 
Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | 
Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i 
moze zawierac informacje poufne. W razie przypadkowego otrzymania tej 
wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; 
jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient(s). If you are not the intended recipient, please 
contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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