From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [RFC PATCH 0/3] VFIO: capability chains Date: Thu, 17 Dec 2015 19:38:37 -0700 Message-ID: <1450406317.2674.160.camel@redhat.com> References: <20151123202614.18252.41590.stgit@gimli.home> <567369FD.4000100@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Alexey Kardashevskiy Return-path: In-Reply-To: <567369FD.4000100@ozlabs.ru> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, 2015-12-18 at 13:05 +1100, Alexey Kardashevskiy wrote: > On 11/24/2015 07:43 AM, Alex Williamson wrote: > > Please see the commit log and comments in patch 1 for a general > > explanation of the problems that this series tries to address.=C2=A0= =C2=A0The > > general problem is that we have several cases where we want to > > expose > > variable sized information to the user, whether it's sparse mmaps > > for > > a region, as implemented here, or DMA mapping ranges of an IOMMU, > > or > > reserved MSI mapping ranges, etc.=C2=A0=C2=A0Extending data structu= res is > > hard; > > extending them to report variable sized data is really hard.=C2=A0=C2= =A0After > > considering several options, I think the best approach is to copy > > how > > PCI does capabilities.=C2=A0=C2=A0This allows the ioctl to only exp= ose the > > capabilities that are relevant for them, avoids data structures > > that > > are too complicated to parse, and avoids creating a new ioctl each > > time we think of something else that we'd like to report.=C2=A0=C2=A0= This > > method > > also doesn't preclude extensions to the fixed structure since the > > offset of these capabilities is entirely dynamic. > >=20 > > Comments welcome, I'll also follow-up to the QEMU and KVM lists > > with > > an RFC making use of this for mmaps skipping over the MSI-X table. > > Thanks, >=20 > Out of curiosity - could this information be exposed to the userspace > via=20 > /sys/bus/pci/devices/xxxx:xx:xx:x/vfio_xxxx? It seems not to change > after=20 > vfio_pci driver is bound to a device. =46or what purpose? =C2=A0vfio doesn't have a sysfs interface, why star= t one?=20 Thanks, Alex