From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Vivien Bernet-Rollande <vbernetr@gmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Kernel Oops when reading kernel_page_tables debugfs file
Date: Tue, 30 Nov 2010 10:04:21 -0500 [thread overview]
Message-ID: <20101130150421.GA3817@dumpdata.com> (raw)
In-Reply-To: <AANLkTikjs2yzMii6vo1fmv7joA+uyG==nBO7L725Nh3E@mail.gmail.com>
On Tue, Nov 30, 2010 at 10:34:07AM +0100, Vivien Bernet-Rollande wrote:
> On Mon, Nov 29, 2010 at 4:20 PM, Konrad Rzeszutek Wilk
> <konrad.wilk@oracle.com> wrote:
> > On Wed, Nov 24, 2010 at 05:07:49PM +0100, Vivien Bernet-Rollande wrote:
> >> Hi list.
> >> I'm currently trying to get a device driver to work on Xen dom0. The driver
> >> maps PCI space to userland, and for some reason I have yet to figure, it
> >> doesn't work.
> >
> > Did you set VM_IO on your mapping?
> >
>
> The driver doesn't set the VM_IO flag itself. However, it calls
> io_remap_pfn_range(), which is a macro wrapper around
> remap_pfn_range(). The later does :
> vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
>
> So the VM_IO flag is set. I actually corrected the bug by adding the
> _PAGE_IOMAP flag in the vma->vm_pgprot.
Ah, there is a macro for that: vm_get_page_prot, as so:
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
And under Xen the vm_get_page_prot will set _PAGE_IOMAP if it detects VM_IO flag.
>
> Shouldn't remap_pfn_range() set that flag if VM_IO is set ?
Nope. You need to use the above mentioned macro to do it.
prev parent reply other threads:[~2010-11-30 15:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-24 16:07 Kernel Oops when reading kernel_page_tables debugfs file Vivien Bernet-Rollande
2010-11-29 13:41 ` Jan Beulich
2010-11-29 15:20 ` Konrad Rzeszutek Wilk
2010-11-30 9:34 ` Vivien Bernet-Rollande
2010-11-30 15:04 ` Konrad Rzeszutek Wilk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101130150421.GA3817@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=vbernetr@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.