xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Kashmira. K." <chimnee@yahoo.com>
Cc: winterfi@cisco.com, xen-devel@lists.xensource.com
Subject: Re: Contiguous DMAble memory in Dom0 user space linux process
Date: Wed, 20 Jan 2010 16:42:10 -0500	[thread overview]
Message-ID: <20100120214210.GA13823@phenom.dumpdata.com> (raw)
In-Reply-To: <709670.16467.qm@web50604.mail.re2.yahoo.com>

On Wed, Jan 20, 2010 at 01:10:24PM -0800, Kashmira. K. wrote:
> Hi Konard,
> 
> Thanks you for your reply. 
> 
> On the (non xen) linux system, the hardware was visible to the userspace app. The PCI bars were mapped. So I do need to get the same functionality on xen capable linux.
> 
> I'm still a newbie to the xen internals, but I was wondering if I could write a simple linux kernel driver for a xen capable linux to do the following
> - Map the PCI address (BAR). 
> - Get contiguous memory.
> - Provide user space ioctl call to get the mapped PCI BAR
> - Provide user space ioctl to get pointer to the contiguous memory.
> 
> Will that work?

Sure. I would recommend you look at the 3w-xxxx.c driver for a simple
ioctl subsystem and how to get contiguous memory mapped in. For mmap functionality
hpet.c is pretty simple. Foremost, make sure you get a PDF copy of
"Understanding the Linux Kernel"  as that will answer a lot of your questions.

      reply	other threads:[~2010-01-20 21:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13 21:03 Contiguous DMAble memory in Dom0 user space linux process Kashmira. K.
2010-01-13 21:31 ` Konrad Rzeszutek Wilk
2010-01-15  2:16   ` Kashmira. K.
2010-01-15 16:59     ` Konrad Rzeszutek Wilk
2010-01-20 21:10       ` Kashmira. K.
2010-01-20 21:42         ` 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=20100120214210.GA13823@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=chimnee@yahoo.com \
    --cc=winterfi@cisco.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).