All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with MMAP on Xen kernel
@ 2015-01-16 18:24 Dugger, Donald D
  2015-01-16 18:44 ` David Vrabel
  0 siblings, 1 reply; 6+ messages in thread
From: Dugger, Donald D @ 2015-01-16 18:24 UTC (permalink / raw)
  To: xen-devel@lists.xen.org; +Cc: Ronciak, John, Szwed, Maciej


[-- Attachment #1.1: Type: text/plain, Size: 937 bytes --]

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.

--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
Ph: 303/443-3786


[-- Attachment #1.2: Type: text/html, Size: 4967 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-21 14:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16 18:24 Problem with MMAP on Xen kernel Dugger, Donald D
2015-01-16 18:44 ` David Vrabel
2015-01-20 13:49   ` Szwed, Maciej
2015-01-21 14:38   ` Szwed, Maciej
2015-01-21 14:44     ` David Vrabel
2015-01-21 14:54       ` David Vrabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.