public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Dominic Eschweiler <eschweiler@fias.uni-frankfurt.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uio_pci_generic does not export memory resources
Date: Fri, 08 Jun 2012 16:28:58 +0200	[thread overview]
Message-ID: <1339165738.3870.18.camel@blech> (raw)
In-Reply-To: <20120608130351.GB1964@redhat.com>

Am Freitag, den 08.06.2012, 16:03 +0300 schrieb Michael S. Tsirkin:
> Why is this needed?
> What's wrong with mapping resources through
>  /sys/bus/pci/devices/XXXXXresourceX
> ?
> 
Mmmh ok, the problem here is, that the UIO documentation states:

"/dev/uioX is used to access the address space of the card. Just use
mmap() to access registers or RAM locations of your card."

and

"From userspace, the different mappings are distinguished by adjusting
the offset parameter of the mmap() call."


This does not work and the "/sys/class/uio/uioX/maps/mapX/" directories
do also not appear. I was very confused when I tried UIO the first time
and it did not behave like it is described in the documentation.

Anyway, the patch adds the described behaviour and I would more than
happy, if it would be accepted for the mainline kernel. 
> 
> uio currently only supports devices which do not
> do DMA.
> 
> DMA from uio controlled devices is a no no unless
> it's behind an IOMMU which can protect us from
> random memory corruptions this could cause.
> 
> In the later case it's OK but we need some code
> to check this and program the IOMMU appropriately. 

OK, I see. Might it be OK if I just remove the DMA stuff from this patch
and resubmit it?

-- 
Gruß
  Dominic

Frankfurt Institute for Advanced Studies (FIAS)
Ruth-Moufang-Straße 1
D-60438 Frankfurt am Main
Germany

Phone:  +49 69 79844114

  parent reply	other threads:[~2012-06-08 14:28 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-08 11:56 [PATCH] uio_pci_generic does not export memory resources Dominic Eschweiler
2012-06-08 13:03 ` Michael S. Tsirkin
2012-06-08 13:16   ` Jan Kiszka
2012-06-08 14:16     ` Alex Williamson
2012-06-08 14:47       ` Dominic Eschweiler
2012-06-08 15:06         ` Alex Williamson
2012-06-08 16:16         ` Andreas Hartmann
2012-06-08 16:41           ` Alex Williamson
2012-06-09  9:28             ` Andreas Hartmann
2012-06-09 14:50               ` Alex Williamson
2012-06-09 16:25                 ` Andreas Hartmann
2012-06-09 16:55                   ` Alex Williamson
2012-06-10  7:21                     ` Andreas Hartmann
2012-06-10 19:12                       ` Andreas Hartmann
2012-06-10 14:12                 ` Michael S. Tsirkin
2012-06-08 16:44           ` Hans J. Koch
2012-06-08 16:59             ` Jan Kiszka
2012-06-08 17:11             ` Alex Williamson
2012-06-10 14:18               ` Michael S. Tsirkin
2012-06-10 16:09                 ` Alex Williamson
2012-06-10 16:44                   ` Michael S. Tsirkin
2012-06-10 17:38                     ` Alex Williamson
2012-06-10 18:43                       ` Michael S. Tsirkin
2012-06-10 19:00                       ` Michael S. Tsirkin
2012-06-10 19:11                         ` Hans J. Koch
2012-06-10 19:16                           ` Michael S. Tsirkin
2012-06-10 20:19                             ` Hans J. Koch
2012-06-10 19:01               ` Hans J. Koch
2012-06-08 14:28   ` Dominic Eschweiler [this message]
2012-06-08 15:18     ` Hans J. Koch
2012-06-08 15:45       ` Dominic Eschweiler
2012-06-08 15:57         ` Hans J. Koch
2012-06-08 16:23           ` Dominic Eschweiler
2012-06-08 16:37             ` Hans J. Koch
2012-06-08 17:07               ` Dominic Eschweiler
2012-06-08 17:11                 ` Hans J. Koch
2012-06-08 16:39             ` Michael S. Tsirkin
2012-06-08 16:07 ` Hans J. Koch

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=1339165738.3870.18.camel@blech \
    --to=eschweiler@fias.uni-frankfurt.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hjk@hansjkoch.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.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