From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: UIO: missing resource mapping Date: Fri, 13 Jul 2012 21:19:53 +0300 Message-ID: <20120713181953.GA11527@redhat.com> References: <4FFE7C1F.7080702@gmx.net> <20120712194432.GA2592@local> <20120712231632.GC9317@redhat.com> <1342166955.6607.5.camel@blech> <20120713132223.GA10959@redhat.com> <1342190571.6607.36.camel@blech> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Hans J. Koch" , Andreas Schallenberg , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , kvm@vger.kernel.org To: Dominic Eschweiler Return-path: Content-Disposition: inline In-Reply-To: <1342190571.6607.36.camel@blech> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Jul 13, 2012 at 04:42:51PM +0200, Dominic Eschweiler wrote: > Am Freitag, den 13.07.2012, 16:22 +0300 schrieb Michael S. Tsirkin: > > Could you give an example of the problem? How do you bind > > both UIO and another driver to the same device?=20 >=20 > Sorry, I'm looking on it from the user-space perspective. Maybe I'm > wrong, but I can give you an example : >=20 > lspci -v > ... > 03:00.0 Network controller: Broadcom Corporation BCM4331 802.11a/b/g/= n > (rev 02) > Subsystem: Apple Inc. AirPort Extreme > Flags: bus master, fast devsel, latency 0, IRQ 17 > Memory at b0600000 (64-bit, non-prefetchable) [size=3D16K] > Capabilities: [40] Power Management version 3 > Capabilities: [58] Vendor Specific Information: Len=3D78 > Capabilities: [48] MSI: Enable- Count=3D1/1 Maskable- 64bit+ > Capabilities: [d0] Express Endpoint, MSI 00 > Capabilities: [100] Advanced Error Reporting > Capabilities: [13c] Virtual Channel > Capabilities: [160] Device Serial Number 85-f2-6d-ff-ff-42-68-a8 > Capabilities: [16c] Power Budgeting > Kernel driver in use: bcma-pci-bridge > ... >=20 > This Device has one 64 Bit Bar. When I look at the related sysfs > entry ... >=20 >=20 > ls /sys/bus/pci/devices/0000:03:00.0 > ... > --w------- 1 root root 4.0K Jul 13 16:35 reset > -r--r--r-- 1 root root 4.0K Jul 12 21:43 resource > -rw------- 1 root root 16K Jul 13 16:35 resource0 > lrwxrwxrwx 1 root root 0 Jul 12 23:41 subsystem > -> ../../../../bus/pci > ... >=20 > ... I can see that it should be possible to map resource0 and directl= y > write into a BAR which is already managed by a kernel drivers.=20 >=20 > Moving this functionality to UIO would only generate those resource > files, if the device is handled by UIO and therefore intended to be > managed from the user-space.=20 UIO has the same property, doesn't it? Multiple users can access device memory through sysfs. > --=20 > Gru=DF > Dominic